From 8a53c03eb6cfa213f9dc2c8e831ce902421b9921 Mon Sep 17 00:00:00 2001 From: bol-van Date: Tue, 20 Aug 2024 17:13:02 +0300 Subject: [PATCH] nfqws: use BSD udphdr --- nfq/desync.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nfq/desync.c b/nfq/desync.c index c2b4af6..e7fb31f 100644 --- a/nfq/desync.c +++ b/nfq/desync.c @@ -367,9 +367,9 @@ static uint8_t ct_new_postnat_fix(const t_ctrack *ctrack, struct ip *ip, struct if (proto==IPPROTO_UDP && udp && len_pkt) { // make malformed udp packet with zero length and invalid checksum - udp->len = 0; // invalid length. must be >=8 + udp->uh_ulen = 0; // invalid length. must be >=8 udp_fix_checksum(udp,sizeof(struct udphdr),ip,ip6); - udp->check ^= htons(0xBEAF); + udp->uh_sum ^= htons(0xBEAF); // truncate packet *len_pkt = (uint8_t*)udp - (ip ? (uint8_t*)ip : (uint8_t*)ip6) + sizeof(struct udphdr); if (ip)