mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-11-07 04:36:52 -10:00
ipfilter: Fix checksum update for NAT_DIVERTOUT
When taking a snapshot of the before ip_len (s1) for comparison with the after-translated ip_len (s2), we must convert it from network to host byte order before we can use it. Add the missing ntohs() call. PR: 296944 MFC after: 3 days
This commit is contained in:
1 parent
31f9f09bf7
commit
c08a97fa27
1 file changed
+1
-1
@@ -5147,7 +5147,7 @@ ipf_nat_out(fr_info_t *fin, nat_t *nat, int natadd, u_32_t nflags)
|
||||
ip_fillid(ip, V_ip_random_id);
|
||||
s2 = ntohs(ip->ip_id);
|
||||
|
||||
s1 = ip->ip_len;
|
||||
s1 = ntohs(ip->ip_len);
|
||||
ip->ip_len = ntohs(ip->ip_len);
|
||||
ip->ip_len += fin->fin_plen;
|
||||
ip->ip_len = htons(ip->ip_len);
|
||||
|
||||
Reference in new issue
Block a user