|
List Info
Thread: WARNING: "ipt_unregister_match"
|
|
| WARNING:
"ipt_unregister_match" |

|
2007-04-07 11:55:53 |
Hello!
I am getting the following error when using linux-2.6.21 or
any resent git tree:
WARNING: "ipt_unregister_match"
[net/ipv4/netfilter/ipt_connlimit.ko] undefined!
I searched google a bit, and I see I am not the only one.
Only problem is I can't really find someone smashing the
hammer as of
how I can fix this error
Any help would be appriciated!
Thanks,
Patrick
|
|
| Re: WARNING:
"ipt_unregister_match" |
  Germany |
2007-04-07 13:45:28 |
On Apr 7 2007 18:55, Patrick Ale wrote:
> Hello!
> I am getting the following error when using
linux-2.6.21 or any resent git
> tree:
> WARNING: "ipt_unregister_match"
[net/ipv4/netfilter/ipt_connlimit.ko]
> undefined!
>
> I searched google a bit, and I see I am not the only
one.
> Only problem is I can't really find someone smashing
the hammer as of
> how I can fix this error
>
> Any help would be appriciated!
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_connlimit.c
============================================================
=======
---
linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_connlimit.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_connlimit.c
 -291,8
+291,9  static void destroy(
kfree(info->data);
}
-static struct ipt_match connlimit_match = {
+static struct xt_match connlimit_match = {
.name = "connlimit",
+ .family = AF_INET,
.match = &match,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
.matchsize = sizeof(struct ipt_connlimit_info),
 -304,12
+305,12  static struct ipt_match connlimit_match
static int __init init(void)
{
- return ipt_register_match(&connlimit_match);
+ return xt_register_match(&connlimit_match);
}
static void __exit fini(void)
{
- ipt_unregister_match(&connlimit_match);
+ xt_unregister_match(&connlimit_match);
}
module_init(init);
|
|
| Compile fixes for 2.6.21 |
  Germany |
2007-04-07 13:48:48 |
Here's a bunch of patches to fix some pom/external targets.
(I am loosing all nerves because icewm screws up, so excuse
if descriptions are sparse.)
|
|
| ipt_ACCOUNT compile fix for 2.6.21 |
  Germany |
2007-04-07 13:49:11 |
Fixes compilation of ipt_ACCOUNT.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_ACCOUNT.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_ACCOUNT.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_ACCOUNT.c
 -1051,8
+1051,9  static int ipt_acc_get_ctl(struct sock *
return ret;
}
-static struct ipt_target ipt_acc_reg = {
+static struct xt_target ipt_acc_reg = {
.name = "ACCOUNT",
+ .family = AF_INET,
.target = ipt_acc_target,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
.targetsize = sizeof(struct ipt_acc_info),
 -1106,7
+1107,7  static int __init init(void)
goto error_cleanup;
}
- if (ipt_register_target(&ipt_acc_reg))
+ if (xt_register_target(&ipt_acc_reg))
goto error_cleanup;
return 0;
 -1124,7
+1125,7  error_cleanup:
static void __exit fini(void)
{
- ipt_unregister_target(&ipt_acc_reg);
+ xt_unregister_target(&ipt_acc_reg);
nf_unregister_sockopt(&ipt_acc_sockopts);
|
|
| ipt_SYSRQ compile fix for 2.6.21 |
  Germany |
2007-04-07 13:49:33 |
Fixes compilation of ipt_SYSRQ.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_SYSRQ.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_SYSRQ.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_SYSRQ.c
 -9,10
+9,9 
#include <linux/netfilter_ipv4/ip_tables.h>
-#include "rsysrq.h"
-
-#include "sha1.c"
-#include "rsysrq_protocol.c"
+#include "ipt_sysrq_g.h"
+#include "ipt_sysrq_sha1.c"
+#include "ipt_sysrq_protocol.c"
static char *passwd = "";
module_param(passwd,charp,0);
 -38,12
+37,7  static int target_do( char *buf, int len
if( (c=rsysrq_extract((struct
rsysrq_s*)buf,passwd,now.tv_sec,tolerance))==0 )
return(0);
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- handle_sysrq(c, NULL, NULL, NULL );
-#else
- handle_sysrq(c, NULL, NULL );
-#endif
-
+ handle_sysrq(c, NULL);
return(1);
}
 -64,8
+58,7  target(struct sk_buff **pskb,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
const struct xt_target *target,
#endif
- const void *targinfo,
- void *userinfo)
+ const void *targinfo)
#endif
{
const struct iphdr *iph = (*pskb)->nh.iph;
 -101,14
+94,14  checkentry(const char *tablename,
const struct ipt_entry *e,
#endif
void *targinfo,
- unsigned int targinfosize,
unsigned int hook_mask)
{
return 1;
}
-static struct ipt_target ipt_sysrq_reg = {
+static struct xt_target ipt_sysrq_reg = {
.name = "SYSRQ",
+ .family = AF_INET,
.target = target,
.checkentry = checkentry,
.me = THIS_MODULE,
 -120,7
+113,7  static struct ipt_target ipt_sysrq_reg =
static int __init init(void)
{
- if (ipt_register_target(&ipt_sysrq_reg))
+ if (xt_register_target(&ipt_sysrq_reg))
return -EINVAL;
return 0;
 -128,7
+121,7  static int __init init(void)
static void __exit fini(void)
{
- ipt_unregister_target(&ipt_sysrq_reg);
+ xt_unregister_target(&ipt_sysrq_reg);
}
module_init(init);
|
|
| ipt_TARPIT compile fix for 2.6.21 |
  Germany |
2007-04-07 13:49:48 |
Fixes compilation of ipt_TARPIT.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_TARPIT.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_TARPIT.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_TARPIT.c
 -100,7
+100,7  static void tarpit_tcp(struct sk_buff *o
return;
/* Check checksum. */
- if (tcp_v4_check(otcph, otcplen,
oskb->nh.iph->saddr,
+ if (tcp_v4_check(otcplen, oskb->nh.iph->saddr,
oskb->nh.iph->daddr,
csum_partial((char *)otcph, otcplen, 0)) != 0)
return;
 -158,7
+158,7  static void tarpit_tcp(struct sk_buff *o
/* Adjust TCP checksum */
ntcph->check = 0;
- ntcph->check = tcp_v4_check(ntcph, sizeof(struct
tcphdr),
+ ntcph->check = tcp_v4_check(sizeof(struct tcphdr),
nskb->nh.iph->saddr,
nskb->nh.iph->daddr,
csum_partial((char *)ntcph,
 -269,8
+269,9  static int check(const char *tablename,
return 1;
}
-static struct ipt_target ipt_tarpit_reg = {
+static struct xt_target ipt_tarpit_reg = {
.name = "TARPIT",
+ .family = AF_INET,
.target = tarpit,
.checkentry = check,
.me = THIS_MODULE
 -278,12
+279,12  static struct ipt_target ipt_tarpit_reg
static int __init init(void)
{
- return ipt_register_target(&ipt_tarpit_reg);
+ return xt_register_target(&ipt_tarpit_reg);
}
static void __exit fini(void)
{
- ipt_unregister_target(&ipt_tarpit_reg);
+ xt_unregister_target(&ipt_tarpit_reg);
}
module_init(init);
|
|
| ipt_connlimit compile fix for 2.6.21 |
  Germany |
2007-04-07 13:49:58 |
Fix compilation of ipt_connlimit.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_connlimit.c
============================================================
=======
---
linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_connlimit.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_connlimit.c
 -291,8
+291,9  static void destroy(
kfree(info->data);
}
-static struct ipt_match connlimit_match = {
+static struct xt_match connlimit_match = {
.name = "connlimit",
+ .family = AF_INET,
.match = &match,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
.matchsize = sizeof(struct ipt_connlimit_info),
 -304,12
+305,12  static struct ipt_match connlimit_match
static int __init init(void)
{
- return ipt_register_match(&connlimit_match);
+ return xt_register_match(&connlimit_match);
}
static void __exit fini(void)
{
- ipt_unregister_match(&connlimit_match);
+ xt_unregister_match(&connlimit_match);
}
module_init(init);
|
|
| ipt_ipp2p compile fix for 2.6.21 |
  Germany |
2007-04-07 13:50:10 |
Fix compilation of ipt_ipp2p.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_ipp2p.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_ipp2p.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_ipp2p.c
 -831,7
+831,6  checkentry(const char *tablename,
const struct xt_match *match,
#endif
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
/* Must specify -p tcp */
 -845,36
+844,27  checkentry(const char *tablename,
-static struct ipt_match ipp2p_match = {
-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
- { NULL, NULL },
- "ipp2p",
- &match,
- &checkentry,
- NULL,
- THIS_MODULE
-#endif
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)
+static struct xt_match ipp2p_match = {
.name = "ipp2p",
.match = &match,
+ .family = AF_INET,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
.matchsize = sizeof(struct ipt_p2p_info),
#endif
.checkentry = &checkentry,
.me = THIS_MODULE,
-#endif
};
static int __init init(void)
{
printk(KERN_INFO "IPP2P v%s loadingn",
IPP2P_VERSION);
- return ipt_register_match(&ipp2p_match);
+ return xt_register_match(&ipp2p_match);
}
static void __exit fini(void)
{
- ipt_unregister_match(&ipp2p_match);
+ xt_unregister_match(&ipp2p_match);
printk(KERN_INFO "IPP2P v%s unloadedn",
IPP2P_VERSION);
}
|
|
| ipt_time compile fix for 2.6.21 |
  Germany |
2007-04-07 13:50:22 |
Fix compilation of ipt_time.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_time.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_time.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_time.c
 -97,7
+97,6  checkentry(const char *tablename,
const struct xt_match *match,
#endif
void *matchinfo,
- unsigned int matchsize,
unsigned int hook_mask)
{
struct ipt_time_info *info = matchinfo; /* match info
for rule */
 -127,9
+126,10  checkentry(const char *tablename,
return 1;
}
-static struct ipt_match time_match = {
+static struct xt_match time_match = {
.name = "time",
.match = &match,
+ .family = AF_INET,
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
.matchsize = sizeof(struct ipt_time_info),
#endif
 -140,12
+140,12  static struct ipt_match time_match = {
static int __init init(void)
{
printk("ipt_time loadingn");
- return ipt_register_match(&time_match);
+ return xt_register_match(&time_match);
}
static void __exit fini(void)
{
- ipt_unregister_match(&time_match);
+ xt_unregister_match(&time_match);
printk("ipt_time unloadedn");
}
|
|
| ipt_u32 compile fix for 2.6.21 |
  Germany |
2007-04-07 13:50:33 |
Fix compilation of ipt_u32.
Signed-off-by: Jan Engelhardt <jengelh gmx.de>
Index: linux-2.6.21-rc5/net/ipv4/netfilter/ipt_u32.c
============================================================
=======
--- linux-2.6.21-rc5.orig/net/ipv4/netfilter/ipt_u32.c
+++ linux-2.6.21-rc5/net/ipv4/netfilter/ipt_u32.c
 -201,35
+201,22  match(const struct sk_buff *skb,
return 1;
}
-static int
-checkentry(const char *tablename,
- const void *ip,
- const struct xt_match *match,
- void *matchinfo,
- unsigned int matchsize,
- unsigned int hook_mask)
-{
- if (matchsize != IPT_ALIGN(sizeof(struct ipt_u32)))
- return 0;
- return 1;
-}
-
-static struct ipt_match u32_match = {
+static struct xt_match u32_match = {
.name = "u32",
+ .family = AF_INET,
.match = &match,
.matchsize = sizeof(struct ipt_u32),
- .checkentry = &checkentry,
.me = THIS_MODULE
};
static int __init init(void)
{
- return ipt_register_match(&u32_match);
+ return xt_register_match(&u32_match);
}
static void __exit fini(void)
{
- ipt_unregister_match(&u32_match);
+ xt_unregister_match(&u32_match);
}
module_init(init);
|
|
[1-10]
|
|