git: DragonFly_RELEASE_6_2 ipfw - Fix broken mixed network and host IP specifications in ip tables

Matthew Dillon dillon at crater.dragonflybsd.org
Sat Mar 12 18:22:14 PST 2022


commit 5b0ac3347670948a0cd6944462639b844a05a523
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Fri Mar 11 17:09:48 2022 -0800

    ipfw - Fix broken mixed network and host IP specifications in ip tables
    
    * ipfw improperly assumes that the netmask sin_len is pre-zero'd, but
      prior table entries on the same command line which specify a network
      mask will leave the field non-zero for later host entries also specified
      on the command line:
    
            ipfw table 1 add 10.0.0.0/8 192.0.2.1     # 2^24 + 1 addresses
    
    	# ipfw table 1 print
    	10.0.0.0/8
    	192.0.0.0/8	<--- wrong
    
    * Fix the issue by properly initializing netmask.sin_len to 0 when a
      host IP is specified.
    
    Submitted-by: Martin Neitzel <neitzel at marshlabs.gaertner.de>

Summary of changes:
 sbin/ipfw/ipfw2.c | 3 +++
 1 file changed, 3 insertions(+)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/5b0ac3347670948a0cd6944462639b844a05a523


-- 
DragonFly BSD source repository


More information about the Commits mailing list