All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Don't export common symbols from ipfwadm.ko
@ 2004-10-07 13:42 Olaf Kirch
  0 siblings, 0 replies; only message in thread
From: Olaf Kirch @ 2004-10-07 13:42 UTC (permalink / raw)
  To: netfilter-devel

[-- Attachment #1: Type: text/plain, Size: 560 bytes --]

Hi all,

As of 2.6.9-rc2, two symbols additional symbols (ip_conntrack_count and
ip_conntrack_tcp_update). These are exported from conntrack*c files
linked into both ip_conntrack.ko and ipfwadm.ko, so the symbols show
up both in ip_conntrack.ko and ipfwadm.ko, causing bogus dependencies
in modules.dep. The patch below moves the EXPORT_SYMBOL() statements
to ip_conntrack_standalone.c.

Cheers
Olaf
-- 
Olaf Kirch     | Things that make Monday morning interesting, #1:
okir@suse.de   |        "I want to use NFS over AX25, can you help me?"
---------------+ 

[-- Attachment #2: ipfwadm-symbol-cleanup --]
[-- Type: text/plain, Size: 2061 bytes --]


Exported kernel symbols ip_conntrack_count and ip_conntrack_tcp_update were
showing up both in ip_conntrack.ko and ipfwadm.ko, causing bogus dependencies
in modules.dep. The patch below moves the EXPORT_SYMBOL() statements to
ip_conntrack_standalone.c.

Signed-off-by: Olaf Kirch <okir@suse.de>

Index: linux-2.6.8/net/ipv4/netfilter/ip_conntrack_core.c
===================================================================
--- linux-2.6.8.orig/net/ipv4/netfilter/ip_conntrack_core.c	2004-09-30 13:35:33.000000000 +0200
+++ linux-2.6.8/net/ipv4/netfilter/ip_conntrack_core.c	2004-10-06 11:28:59.000000000 +0200
@@ -62,7 +62,6 @@
 
 /* ip_conntrack_standalone needs this */
 atomic_t ip_conntrack_count = ATOMIC_INIT(0);
-EXPORT_SYMBOL(ip_conntrack_count);
 
 void (*ip_conntrack_destroyed)(struct ip_conntrack *conntrack) = NULL;
 LIST_HEAD(ip_conntrack_expect_list);
Index: linux-2.6.8/net/ipv4/netfilter/ip_conntrack_proto_tcp.c
===================================================================
--- linux-2.6.8.orig/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2004-09-30 13:35:24.000000000 +0200
+++ linux-2.6.8/net/ipv4/netfilter/ip_conntrack_proto_tcp.c	2004-10-06 11:29:53.000000000 +0200
@@ -737,7 +737,6 @@
 	return 1;
 }
  
-EXPORT_SYMBOL(ip_conntrack_tcp_update);
 #endif
 
 #define	TH_FIN	0x01
Index: linux-2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c
===================================================================
--- linux-2.6.8.orig/net/ipv4/netfilter/ip_conntrack_standalone.c	2004-09-30 13:35:33.000000000 +0200
+++ linux-2.6.8/net/ipv4/netfilter/ip_conntrack_standalone.c	2004-10-06 11:30:34.000000000 +0200
@@ -46,6 +46,14 @@
 MODULE_LICENSE("GPL");
 
 extern atomic_t ip_conntrack_count;
+/* We export these symbols here rather than where they're defined
+ * to prevent them from showing up in ipfwadm.ko
+ */
+EXPORT_SYMBOL(ip_conntrack_count);
+#ifdef CONFIG_IP_NF_NAT_NEEDED
+EXPORT_SYMBOL(ip_conntrack_tcp_update);
+#endif
+
 DECLARE_PER_CPU(struct ip_conntrack_stat, ip_conntrack_stat);
 
 unsigned int ip_ct_log_invalid = 0;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2004-10-07 13:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-07 13:42 [PATCH] Don't export common symbols from ipfwadm.ko Olaf Kirch

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.