Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 14 Jun 1996 09:56:47 +1000
From:      Bruce Evans <bde@zeta.org.au>
To:        gpalmer@FreeBSD.org, roberto@keltia.freenix.fr
Cc:        freebsd-current@FreeBSD.org
Subject:   Re: #include opt_ipfw.h problem for lkm
Message-ID:  <199606132356.JAA32106@godzilla.zeta.org.au>

next in thread | raw e-mail | index | archive | help
>> sys/netinet/ip_fw.c includes  "opt_ipfw.h" when compiling the kernel (which
>> is fine) but includes it also when compiling as lkm (which is bad). 

Including it conditionally is the wrong fix.  lkms must not depend on any
options, since their behaviour must be the same as the statically configured
versions.  I think the conditional include doesn't do much damage because
option IPFIREWALL isn't used.  Only the option IPFIREWALL_VERBOSE is used.
Other bugs: option IPFIREWALL_VERBOSE_LIMIT isn't in the options file, and
lkm ipfw and option file opt_ipfw.h have hard to remember names - `ip' is
followed by `_' in all other ip file names.

There is a potentially much more serious problem in the use of the option
IPFIREWALL in ip_input.c.  I think this isn't actually a problem, because
the option is only used to control the initialization of ip_fw, and this
initialization gets done in another way if ip_^Hfw is an lkm.  Why isn't
PSEUDO_SET() used to do the initialization transparently like it is for
other lkm's?  I guess there are ordering problems.

Bruce



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199606132356.JAA32106>