diff options
author | Stefano Brivio <sbrivio@redhat.com> | 2021-03-20 21:11:14 +0100 |
---|---|---|
committer | Stefano Brivio <sbrivio@redhat.com> | 2021-03-20 22:19:15 +0100 |
commit | 9f8049931370426f43d704a288113596ea3ea6e6 (patch) | |
tree | fca7f6df3e587e63a7d0e2170802aa3fb30ca150 | |
parent | 00f3bcea0531f50be49793f9c51bf370756aa55b (diff) | |
download | passt-9f8049931370426f43d704a288113596ea3ea6e6.tar passt-9f8049931370426f43d704a288113596ea3ea6e6.tar.gz passt-9f8049931370426f43d704a288113596ea3ea6e6.tar.bz2 passt-9f8049931370426f43d704a288113596ea3ea6e6.tar.lz passt-9f8049931370426f43d704a288113596ea3ea6e6.tar.xz passt-9f8049931370426f43d704a288113596ea3ea6e6.tar.zst passt-9f8049931370426f43d704a288113596ea3ea6e6.zip |
tcp: Don't dereference IPv4 addresses
...sometimes they're not valid pointers.
Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
-rw-r--r-- | tcp.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -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, }; |