All of lore.kernel.org
 help / color / mirror / Atom feed
* latest pom: base/connlimit breaks kernel 2.4.25 compile (+possible fix)
@ 2004-04-10 15:03 Friedrich Lobenstock
  2004-04-10 16:52 ` Pablo Neira
  0 siblings, 1 reply; 10+ messages in thread
From: Friedrich Lobenstock @ 2004-04-10 15:03 UTC (permalink / raw)
  To: Netfilter Development Mailinglist

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

Hi!

Applying the latest pom-20040409 to kernel 2.4.25 breaks the compile:

gcc -D__KERNEL__ -I/data/build/tmp/linux-2.4.25/include -Wall 
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-fomit-frame-pointer  -pipe -mpreferred-stack-boundary=2 -march
=i586 -DMODULE -DMODVERSIONS -include 
/data/build/tmp/linux-2.4.25/include/linux/modversions.h  -nostdinc 
-iwithprefix include -DKBUILD_BASENAME=ipt_connlimit  -c -o ipt_connlimit.o 
ipt_connlimit.c
ipt_connlimit.c: In function `init':
ipt_connlimit.c:219: error: `ip_conntrack_module' undeclared (first use in 
this function)
ipt_connlimit.c:219: error: (Each undeclared identifier is reported only once
ipt_connlimit.c:219: error: for each function it appears in.)
ipt_connlimit.c:220: warning: value computed is not used
ipt_connlimit.c: In function `fini':
ipt_connlimit.c:227: error: `ip_conntrack_module' undeclared (first use in 
this function)
ipt_connlimit.c:228: warning: value computed is not used
make[3]: *** [ipt_connlimit.o] Error 1
make[3]: Leaving directory `/data/build/tmp/linux-2.4.25/net/ipv4/netfilter'
make[2]: *** [_modsubdir_ipv4/netfilter] Error 2
make[2]: Leaving directory `/data/build/tmp/linux-2.4.25/net'
make[1]: *** [_mod_net] Error 2
make[1]: Leaving directory `/data/build/tmp/linux-2.4.25'

I was woundering if the correct way to fix this is to create the
   struct module *ip_connlimit_module
variable in ipt_connlimit.c and use it instead of the undefined
variable "ip_conntrack_module". See also attached patch for how
I think I would do it.

What do you think?

-- 
MfG / Regards
Friedrich Lobenstock

[-- Attachment #2: patch-broken-ipt_connlimit.c --]
[-- Type: text/plain, Size: 956 bytes --]

--- linux-2.4.25/net/ipv4/netfilter/ipt_connlimit.c.broken	2004-04-10 17:01:40.000000000 +0200
+++ linux-2.4.25/net/ipv4/netfilter/ipt_connlimit.c	2004-04-10 17:02:18.000000000 +0200
@@ -23,6 +23,8 @@
 
 MODULE_LICENSE("GPL");
 
+struct module *ip_connlimit_module = THIS_MODULE;
+
 /* we'll save the tuples of all connections we care about */
 struct ipt_connlimit_conn
 {
@@ -215,17 +217,17 @@
 
 static int __init init(void)
 {
-	/* NULL if ip_conntrack not a module */
-	if (ip_conntrack_module)
-		__MOD_INC_USE_COUNT(ip_conntrack_module);
+	/* NULL if ip_connlimit not a module */
+	if (ip_connlimit_module)
+		__MOD_INC_USE_COUNT(ip_connlimit_module);
 	return ipt_register_match(&connlimit_match);
 }
 
 static void __exit fini(void)
 {
 	ipt_unregister_match(&connlimit_match);
-	if (ip_conntrack_module)
-		__MOD_DEC_USE_COUNT(ip_conntrack_module);
+	if (ip_connlimit_module)
+		__MOD_DEC_USE_COUNT(ip_connlimit_module);
 }
 
 module_init(init);

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2004-04-12  2:16 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-10 15:03 latest pom: base/connlimit breaks kernel 2.4.25 compile (+possible fix) Friedrich Lobenstock
2004-04-10 16:52 ` Pablo Neira
2004-04-10 19:17   ` Friedrich Lobenstock
2004-04-10 23:58     ` Henrik Nordstrom
2004-04-11  0:04       ` Friedrich Lobenstock
2004-04-11 10:39         ` Henrik Nordstrom
2004-04-11 11:17           ` Friedrich Lobenstock
2004-04-11 20:47             ` Henrik Nordstrom
2004-04-11 21:00               ` Friedrich Lobenstock
2004-04-12  2:16                 ` Henrik Nordstrom

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.