aboutgitcodebugslistschat
path: root/flow.h
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2023-12-07 16:53:50 +1100
committerStefano Brivio <sbrivio@redhat.com>2023-12-27 19:29:45 +0100
commit89fcb563fc63229aeac374a0aed057e467ba7f0a (patch)
tree061a138081ab1c6704ab9650029ee5918213706c /flow.h
parenta672705e4d8441b44b7523dd8228cfd9ebfb2df9 (diff)
downloadpasst-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar.gz
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar.bz2
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar.lz
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar.xz
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.tar.zst
passt-89fcb563fc63229aeac374a0aed057e467ba7f0a.zip
tcp: Fix conceptually incorrect byte-order switch in tcp_tap_handler()
tcp_hash_lookup() expects the port numbers in host order, but the TCP header, of course, has them in network order, so we need to switch them. However we call htons() (host to network) instead of ntohs() (network to host). This works because those do the same thing in practice (they only wouldn't on very strange theoretical platforms which are neither big nor little endian). But, having this the "wrong" way around is misleading, so switch it around. Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
Diffstat (limited to 'flow.h')
0 files changed, 0 insertions, 0 deletions