Skip to content

Commit

Permalink
mellanox: fix the dport endianness in call of __inet6_lookup_establis…
Browse files Browse the repository at this point in the history
…hed()

__inet6_lookup_established() expect th->dport passed in host-endian,
not net-endian.  The reason is microoptimization in __inet6_lookup(),
but if you use the lower-level helpers, you have to play by their
rules...

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Al Viro authored and David S. Miller committed Aug 6, 2018
1 parent 9814670 commit be1459d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ static int tls_update_resync_sn(struct net_device *netdev,

sk = __inet6_lookup_established(dev_net(netdev), &tcp_hashinfo,
&ipv6h->saddr, th->source,
&ipv6h->daddr, th->dest,
&ipv6h->daddr, ntohs(th->dest),
netdev->ifindex, 0);
#endif
}
Expand Down

0 comments on commit be1459d

Please sign in to comment.