aboutgitcodebugslistschat
diff options
context:
space:
mode:
-rw-r--r--tcp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tcp.c b/tcp.c
index 1e4d2fa..108006e 100644
--- a/tcp.c
+++ b/tcp.c
@@ -2533,7 +2533,7 @@ int tcp_tap_handler(struct ctx *c, uint8_t pif, int af,
optlen = MIN(optlen, ((1UL << 4) /* from doff width */ - 6) * 4UL);
opts = packet_get(p, idx, sizeof(*th), optlen, NULL);
- conn = tcp_hash_lookup(c, af, daddr, htons(th->source), htons(th->dest));
+ conn = tcp_hash_lookup(c, af, daddr, ntohs(th->source), ntohs(th->dest));
/* New connection from tap */
if (!conn) {