IP_FORWARD config option...

Johnny Stenback (jst@uwasa.fi)
Thu, 6 Jun 1996 13:32:56 +0300 (EET DST)


Hi

I just tested compiling 1.99.12 with

CONFIG_FIREWALL=y
CONFIG_INET=y
CONFIG_IP_FIREWALL=y
CONFIG_IP_FIREWALL_VERBOSE=y
CONFIG_IP_MASQUERADE=y

and

CONFIG_IP_FORWARD unset.

This setup won't compile due to a call to ip_forward in
net/ipv4/ip_input.c:547, I tested commenting it out and then it
compiled but will probably not work.

1) -- The line in ip_input.c (547) should probably be surrounden by
#ifdef CONFIG_IP_FORWARD but I have no idea where to put it so I won't
even try.

2) -- OR maby the above is completely stupid/impossible, should the
config-scripts be changed so that CONFIG_IP_MASQUERADE isn't settable
if CONFIG_IP_FORWARD is not set (I think so, sounds kind of logical to
me), I tested this and then it compiled. Below follows a patch that
fixes this but I DO NOT KNOW if this is correct allthough it seems
correct to me. This patch atleast prevents people from configuring the
kernel in a way that they wont get it compiled...

-- 
Johnny Stenback, programmer / University of Vaasa, Computer Centre 
E-Mail jst@uwasa.fi, Phone +358 61 3248 387, +358 50 5575 094

diff -ru linux/net/ipv4/Config.in linux-test/net/ipv4/Config.in --- linux/net/ipv4/Config.in Fri May 31 13:46:27 1996 +++ linux-test/net/ipv4/Config.in Thu Jun 6 13:02:12 1996 @@ -8,7 +8,9 @@ if [ "$CONFIG_IP_FIREWALL" = "y" ]; then bool 'IP: firewall packet logging' CONFIG_IP_FIREWALL_VERBOSE if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - bool 'IP: masquerading (EXPERIMENTAL)' CONFIG_IP_MASQUERADE + if [ "$CONFIG_IP_FORWARD" = "y" ]; then + bool 'IP: masquerading (EXPERIMENTAL)' CONFIG_IP_MASQUERADE + fi bool 'IP: transparent proxy support (EXPERIMENTAL)' CONFIG_IP_TRANSPARENT_PROXY fi bool 'IP: always defragment' CONFIG_IP_ALWAYS_DEFRAG