From: Al Viro <viro@ZenIV.linux.org.uk>
To: Boris Pismenny <borisp@mellanox.com>
Cc: David Miller <davem@davemloft.net>, netdev@vger.kernel.org
Subject: [PATCH] mellanox: fix the dport endianness in call of __inet6_lookup_established()
Date: Sat, 4 Aug 2018 21:41:27 +0100 [thread overview]
Message-ID: <20180804204127.GC15082@ZenIV.linux.org.uk> (raw)
__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>
---
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c
index 92d37459850e..be137d4a9169 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_accel/tls_rxtx.c
@@ -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
}
next reply other threads:[~2018-08-04 22:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-08-04 20:41 Al Viro [this message]
2018-08-06 0:27 ` [PATCH] mellanox: fix the dport endianness in call of __inet6_lookup_established() David Miller
2018-08-06 9:23 ` Boris Pismenny
2018-08-06 17:32 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180804204127.GC15082@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=borisp@mellanox.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).