]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/netfilter/ip6t_frag.c
[PARISC] ROUND_UP macro cleanup in arch/parisc
[linux-2.6-omap-h63xx.git] / net / ipv6 / netfilter / ip6t_frag.c
index 06768c84bd3110993f570dbf54809fa27581b921..5a5da71321b6f5f6962ece60cf52997df3e3cedc 100644 (file)
@@ -14,6 +14,7 @@
 #include <net/checksum.h>
 #include <net/ipv6.h>
 
+#include <linux/netfilter/x_tables.h>
 #include <linux/netfilter_ipv6/ip6_tables.h>
 #include <linux/netfilter_ipv6/ip6t_frag.h>
 
@@ -52,9 +53,14 @@ match(const struct sk_buff *skb,
        struct frag_hdr _frag, *fh;
        const struct ip6t_frag *fraginfo = matchinfo;
        unsigned int ptr;
+       int err;
 
-       if (ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL) < 0)
+       err = ipv6_find_hdr(skb, &ptr, NEXTHDR_FRAGMENT, NULL);
+       if (err < 0) {
+               if (err != -ENOENT)
+                       *hotdrop = 1;
                return 0;
+       }
 
        fh = skb_header_pointer(skb, ptr, sizeof(_frag), &_frag);
        if (fh == NULL) {
@@ -119,7 +125,6 @@ checkentry(const char *tablename,
           const void *ip,
           const struct xt_match *match,
           void *matchinfo,
-          unsigned int matchinfosize,
           unsigned int hook_mask)
 {
        const struct ip6t_frag *fraginfo = matchinfo;
@@ -131,8 +136,9 @@ checkentry(const char *tablename,
        return 1;
 }
 
-static struct ip6t_match frag_match = {
+static struct xt_match frag_match = {
        .name           = "frag",
+       .family         = AF_INET6,
        .match          = match,
        .matchsize      = sizeof(struct ip6t_frag),
        .checkentry     = checkentry,
@@ -141,12 +147,12 @@ static struct ip6t_match frag_match = {
 
 static int __init ip6t_frag_init(void)
 {
-       return ip6t_register_match(&frag_match);
+       return xt_register_match(&frag_match);
 }
 
 static void __exit ip6t_frag_fini(void)
 {
-       ip6t_unregister_match(&frag_match);
+       xt_unregister_match(&frag_match);
 }
 
 module_init(ip6t_frag_init);