All of lore.kernel.org
 help / color / mirror / Atom feed
From: Friedrich Lobenstock <fl@fl.priv.at>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: latest pom: base/connlimit breaks kernel 2.4.25 compile (+possible fix)
Date: Sat, 10 Apr 2004 17:03:09 +0200	[thread overview]
Message-ID: <40780CAD.6080305@fl.priv.at> (raw)

[-- 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);

             reply	other threads:[~2004-04-10 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-10 15:03 Friedrich Lobenstock [this message]
2004-04-10 16:52 ` latest pom: base/connlimit breaks kernel 2.4.25 compile (+possible fix) 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=40780CAD.6080305@fl.priv.at \
    --to=fl@fl.priv.at \
    --cc=netfilter-devel@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.