diff options
author | Raju Rangoju <rajur@chelsio.com> | 2017-05-31 08:36:58 +0200 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-06-01 23:03:02 +0200 |
commit | 98b80a2a73a26f0e259632da519ccedb0cf37617 (patch) | |
tree | b8f889dc657525cfd23376c967bdce605b40675f /drivers/infiniband/hw/cxgb4 | |
parent | RDMA/iw_cxgb4: calculate t4_eq_status_entries properly (diff) | |
download | linux-98b80a2a73a26f0e259632da519ccedb0cf37617.tar.xz linux-98b80a2a73a26f0e259632da519ccedb0cf37617.zip |
RDMA/iw_cxgb4: fix the calculation of ipv6 header size
Take care of ipv6 checks while computing header length for deducing mtu
size of ipv6 servers. Due to the incorrect header length computation for
ipv6 servers, wrong mss is reported to the peer (client).
Signed-off-by: Raju Rangoju <rajur@chelsio.com>
Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com>
Acked-by: Steve Wise <swise@opengridcomputing.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/cxgb4')
-rw-r--r-- | drivers/infiniband/hw/cxgb4/cm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c index 06b110213e92..0910faf3587b 100644 --- a/drivers/infiniband/hw/cxgb4/cm.c +++ b/drivers/infiniband/hw/cxgb4/cm.c @@ -2521,7 +2521,8 @@ static int pass_accept_req(struct c4iw_dev *dev, struct sk_buff *skb) goto reject; } - hdrs = sizeof(struct iphdr) + sizeof(struct tcphdr) + + hdrs = ((iptype == 4) ? sizeof(struct iphdr) : sizeof(struct ipv6hdr)) + + sizeof(struct tcphdr) + ((enable_tcp_timestamps && req->tcpopt.tstamp) ? 12 : 0); if (peer_mss && child_ep->mtu > (peer_mss + hdrs)) child_ep->mtu = peer_mss + hdrs; |