tcp: Don't dereference IPv4 addresses

...sometimes they're not valid pointers.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-03-20 21:11:14 +01:00
parent 00f3bcea05
commit 9f80499313

2
tcp.c
View file

@ -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,
};