From 9f8049931370426f43d704a288113596ea3ea6e6 Mon Sep 17 00:00:00 2001
From: Stefano Brivio <sbrivio@redhat.com>
Date: Sat, 20 Mar 2021 21:11:14 +0100
Subject: tcp: Don't dereference IPv4 addresses

...sometimes they're not valid pointers.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
---
 tcp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tcp.c b/tcp.c
index 7561460..a7b9dbc 100644
--- a/tcp.c
+++ b/tcp.c
@@ -866,7 +866,7 @@ static uint32_t tcp_seq_init(struct ctx *c, int af, void *addr,
 		} __attribute__((__packed__)) in = {
 			.src = *(struct in_addr *)addr,
 			.srcport = srcport,
-			.dst = *(struct in_addr *)c->addr4,
+			.dst = { c->addr4 },
 			.dstport = dstport,
 		};
 
-- 
cgit v1.2.3