mirror of
https://passt.top/passt
synced 2025-01-22 04:05:22 +00:00
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:
parent
00f3bcea05
commit
9f80499313
2
tcp.c
2
tcp.c
@ -866,7 +866,7 @@ static uint32_t tcp_seq_init(struct ctx *c, int af, void *addr,
|
|||||||
} __attribute__((__packed__)) in = {
|
} __attribute__((__packed__)) in = {
|
||||||
.src = *(struct in_addr *)addr,
|
.src = *(struct in_addr *)addr,
|
||||||
.srcport = srcport,
|
.srcport = srcport,
|
||||||
.dst = *(struct in_addr *)c->addr4,
|
.dst = { c->addr4 },
|
||||||
.dstport = dstport,
|
.dstport = dstport,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user