netfilter and modules

Rusty Russell rusty@linuxcare.com.au
Mon, 10 Jul 2000 12:06:41 +1000


In message <Pine.LNX.4.10.10007071554210.8428-100000@iris.unipress.waw.pl> you 
write:
> I have just tried to compile 2.3.99-pre9 with netfilter and have found
> that if I disable modules support in the kernel netfilter refuses to
> load, or at least iptables reports that netfilter is not there. If modules

Hi Stan!

Old, known bug which has been fixed since; if you really don't want to
upgrade, try the patch below.

Rusty.

diff -urN -X /tmp/fileXpPx0Z --minimal tmp/Makefile working-2.4.0-test1/Makefile
--- tmp/Makefile	Thu May 25 01:29:47 2000
+++ working-2.4.0-test1/Makefile	Wed Jun  7 16:37:51 2000
@@ -118,7 +118,7 @@
 #export RAMDISK = -DRAMDISK=512
 
 CORE_FILES	=kernel/kernel.o mm/mm.o fs/fs.o ipc/ipc.o
-NETWORKS	=net/network.a
+NETWORKS	=net/network.o
 DRIVERS		=drivers/block/block.a \
 		 drivers/char/char.o \
 		 drivers/misc/misc.o \
diff -urN -X /tmp/fileXpPx0Z --minimal tmp/net/Makefile working-2.4.0-test1/net/Makefile
--- tmp/net/Makefile	Thu May 25 12:41:52 2000
+++ working-2.4.0-test1/net/Makefile	Thu Jun  8 17:16:22 2000
@@ -7,6 +7,7 @@
 #
 # Note 2! The CFLAGS definition is now in the main makefile...
 
+O_TARGET := network.o
 MOD_SUB_DIRS := ipv4
 ALL_SUB_DIRS := 802 ax25 bridge core ethernet ipv4 ipv6 ipx unix appletalk \
 		netrom rose lapb x25 wanrouter netlink sched packet sunrpc \
@@ -195,27 +196,17 @@
   endif
 endif
 
-# We must attach netsyms.o to socket.o, as otherwise there is nothing
-# to pull the object file from the archive.
+O_OBJS := socket.o protocols.o $(join $(SUB_DIRS), $(patsubst %,/%.o,$(notdir $(SUB_DIRS))))
 
-SOCK         := socket.o
 ifeq ($(CONFIG_NET),y)
 ifeq ($(CONFIG_MODULES),y)
-O_TARGET     := sock_n_syms.o
-O_OBJS       := socket.o
-OX_OBJS      := netsyms.o
-SOCK         := $(O_TARGET)
+OX_OBJS += netsyms.o
 endif
 endif
 
-L_TARGET     := network.a
-L_OBJS	     := $(SOCK) protocols.o $(join $(SUB_DIRS), $(patsubst %,/%.o,$(notdir $(SUB_DIRS))))
-
-M_OBJS	     :=
-
 ifeq ($(CONFIG_SYSCTL),y)
 ifeq ($(CONFIG_NET),y)
-L_OBJS += sysctl_net.o
+O_OBJS += sysctl_net.o
 endif
 endif
 

--
Hacking time.