]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/ipv6/netfilter/ip6t_frag.c
[IPV6] IP6TUNNEL: Delete all tunnel device when unloading module.
[karo-tx-linux.git] / net / ipv6 / netfilter / ip6t_frag.c
index 4c41e14823d5ba942230bf0e2b326c67169c6f2f..cd22eaaccdca9547a90d9679dd299d971938c795 100644 (file)
@@ -52,9 +52,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 +124,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;
@@ -139,15 +143,15 @@ static struct ip6t_match frag_match = {
        .me             = THIS_MODULE,
 };
 
-static int __init init(void)
+static int __init ip6t_frag_init(void)
 {
        return ip6t_register_match(&frag_match);
 }
 
-static void __exit cleanup(void)
+static void __exit ip6t_frag_fini(void)
 {
        ip6t_unregister_match(&frag_match);
 }
 
-module_init(init);
-module_exit(cleanup);
+module_init(ip6t_frag_init);
+module_exit(ip6t_frag_fini);