]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Fix wrong formatting of 0.0.0.0/X table records in ipfw(8).
authormelifaro <melifaro@FreeBSD.org>
Sat, 17 May 2014 13:45:03 +0000 (13:45 +0000)
committermelifaro <melifaro@FreeBSD.org>
Sat, 17 May 2014 13:45:03 +0000 (13:45 +0000)
commitf4783a05e9466a8805fae966e8fd9d592f053eeb
tree6eb29755a6cdb47ca08b2f95992839b1c7f88dda
parente21a2ccdb6e9010cd9b69be7937fb38cb299f2a8
Fix wrong formatting of 0.0.0.0/X table records in ipfw(8).

Add `flags` u16 field to the hole in ipfw_table_xentry structure.
Kernel has been guessing address family for supplied record based
on xent length size.
Userland, however, has been getting fixed-size ipfw_table_xentry structures
guessing address family by checking address by IN6_IS_ADDR_V4COMPAT().

Fix this behavior by providing specific IPFW_TCF_INET flag for IPv4 records.

PR: bin/189471
Submitted by: Dennis Yusupoff <dyr@smartspb.net>
MFC after: 2 weeks
sbin/ipfw/ipfw2.c
sys/netinet/ip_fw.h
sys/netpfil/ipfw/ip_fw_table.c