Re: Weird module dependencies in some netfilter modules

From: Keith Owens (kaos@ocs.com.au)
Date: Thu Sep 07 2000 - 23:56:49 EST


On Thu, 7 Sep 2000 23:39:11 -0300,
Cesar Eduardo Barros <cesarb@nitnet.com.br> wrote:
>My modules.dep has the following lines:
>
>/lib/modules/2.4.0-test8-pre1/kernel/net/ipv4/netfilter/ip_nat_ftp.o: /lib/modules/2.4.0-test8-pre1/kernel/net/ipv4/netfilter/iptable_nat.o \
> /lib/modules/2.4.0-test8-pre1/kernel/net/ipv4/netfilter/ipchains.o \
> /lib/modules/2.4.0-test8-pre1/kernel/net/ipv4/netfilter/ip_conntrack.o

Forget about running "nm -A" on the modules, MEC has already done it.
ipchains does not export any symbols, nor does it suppress symbol
export so the default is export everything. This results in duplicate
exported symbols which confuses depmod. This patch appears to fix the
problem.

Index: 0-test8-pre6.4/net/ipv4/netfilter/ipchains_core.c
--- 0-test8-pre6.4/net/ipv4/netfilter/ipchains_core.c Fri, 26 May 2000 13:10:01 +1000 kaos (linux-2.4/g/2_ipchains_c 1.1 644)
+++ 0-test8-pre6.4(w)/net/ipv4/netfilter/ipchains_core.c Fri, 08 Sep 2000 15:27:43 +1100 kaos (linux-2.4/g/2_ipchains_c 1.1 644)
@@ -67,6 +67,8 @@
  * This software is provided ``AS IS'' without any warranties of any kind. */
 
 #include <linux/config.h>
+#include <linux/module.h>
+EXPORT_NO_SYMBOLS;
 
 #include <asm/uaccess.h>
 #include <asm/system.h>

Advance warning. Starting with kernel/modutils 2.5, the default on
module symbols will be changed from "export everything unless
explicitly suppressed" to "export nothing unless explicitly requested".
That will probably break a few modules, but that is what development
kernels are for.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Sep 15 2000 - 21:00:10 EST