]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/netfilter/xt_tcpudp.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/aegl/linux-2.6
[karo-tx-linux.git] / net / netfilter / xt_tcpudp.c
index 9d01f07ceb652d190c32f3ae5b91610104c50233..1b61dac9c873f2d82ec29812f96f6d134b8bfc67 100644 (file)
@@ -74,6 +74,7 @@ static int
 tcp_match(const struct sk_buff *skb,
          const struct net_device *in,
          const struct net_device *out,
+         const struct xt_match *match,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
@@ -138,6 +139,7 @@ tcp_match(const struct sk_buff *skb,
 static int
 tcp_checkentry(const char *tablename,
               const void *info,
+              const struct xt_match *match,
               void *matchinfo,
               unsigned int matchsize,
               unsigned int hook_mask)
@@ -152,6 +154,7 @@ static int
 udp_match(const struct sk_buff *skb,
          const struct net_device *in,
          const struct net_device *out,
+         const struct xt_match *match,
          const void *matchinfo,
          int offset,
          unsigned int protoff,
@@ -185,6 +188,7 @@ udp_match(const struct sk_buff *skb,
 static int
 udp_checkentry(const char *tablename,
               const void *info,
+              const struct xt_match *match,
               void *matchinfo,
               unsigned int matchsize,
               unsigned int hook_mask)
@@ -200,6 +204,7 @@ static struct xt_match tcp_matchstruct = {
        .match          = tcp_match,
        .matchsize      = sizeof(struct xt_tcp),
        .proto          = IPPROTO_TCP,
+       .family         = AF_INET,
        .checkentry     = tcp_checkentry,
        .me             = THIS_MODULE,
 };
@@ -209,6 +214,7 @@ static struct xt_match tcp6_matchstruct = {
        .match          = tcp_match,
        .matchsize      = sizeof(struct xt_tcp),
        .proto          = IPPROTO_TCP,
+       .family         = AF_INET6,
        .checkentry     = tcp_checkentry,
        .me             = THIS_MODULE,
 };
@@ -218,6 +224,7 @@ static struct xt_match udp_matchstruct = {
        .match          = udp_match,
        .matchsize      = sizeof(struct xt_udp),
        .proto          = IPPROTO_UDP,
+       .family         = AF_INET,
        .checkentry     = udp_checkentry,
        .me             = THIS_MODULE,
 };
@@ -226,47 +233,48 @@ static struct xt_match udp6_matchstruct = {
        .match          = udp_match,
        .matchsize      = sizeof(struct xt_udp),
        .proto          = IPPROTO_UDP,
+       .family         = AF_INET6,
        .checkentry     = udp_checkentry,
        .me             = THIS_MODULE,
 };
 
-static int __init init(void)
+static int __init xt_tcpudp_init(void)
 {
        int ret;
-       ret = xt_register_match(AF_INET, &tcp_matchstruct);
+       ret = xt_register_match(&tcp_matchstruct);
        if (ret)
                return ret;
 
-       ret = xt_register_match(AF_INET6, &tcp6_matchstruct);
+       ret = xt_register_match(&tcp6_matchstruct);
        if (ret)
                goto out_unreg_tcp;
 
-       ret = xt_register_match(AF_INET, &udp_matchstruct);
+       ret = xt_register_match(&udp_matchstruct);
        if (ret)
                goto out_unreg_tcp6;
        
-       ret = xt_register_match(AF_INET6, &udp6_matchstruct);
+       ret = xt_register_match(&udp6_matchstruct);
        if (ret)
                goto out_unreg_udp;
 
        return ret;
 
 out_unreg_udp:
-       xt_unregister_match(AF_INET, &tcp_matchstruct);
+       xt_unregister_match(&tcp_matchstruct);
 out_unreg_tcp6:
-       xt_unregister_match(AF_INET6, &tcp6_matchstruct);
+       xt_unregister_match(&tcp6_matchstruct);
 out_unreg_tcp:
-       xt_unregister_match(AF_INET, &tcp_matchstruct);
+       xt_unregister_match(&tcp_matchstruct);
        return ret;
 }
 
-static void __exit fini(void)
+static void __exit xt_tcpudp_fini(void)
 {
-       xt_unregister_match(AF_INET6, &udp6_matchstruct);
-       xt_unregister_match(AF_INET, &udp_matchstruct);
-       xt_unregister_match(AF_INET6, &tcp6_matchstruct);
-       xt_unregister_match(AF_INET, &tcp_matchstruct);
+       xt_unregister_match(&udp6_matchstruct);
+       xt_unregister_match(&udp_matchstruct);
+       xt_unregister_match(&tcp6_matchstruct);
+       xt_unregister_match(&tcp_matchstruct);
 }
 
-module_init(init);
-module_exit(fini);
+module_init(xt_tcpudp_init);
+module_exit(xt_tcpudp_fini);