netfilter: xtables: move extension arguments into compound structure (1/6)
[deliverable/linux.git] / net / ipv6 / netfilter / ip6t_mh.c
index dd876274ff6e446cad5beefc8a68818224d2c106..2803258b6d076a7c9d1bbb56837e525624bbf72e 100644 (file)
@@ -37,32 +37,29 @@ type_match(u_int8_t min, u_int8_t max, u_int8_t type, bool invert)
        return (type >= min && type <= max) ^ invert;
 }
 
-static bool
-mh_mt6(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, bool *hotdrop)
+static bool mh_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
 {
        struct ip6_mh _mh;
        const struct ip6_mh *mh;
-       const struct ip6t_mh *mhinfo = matchinfo;
+       const struct ip6t_mh *mhinfo = par->matchinfo;
 
        /* Must not be a fragment. */
-       if (offset)
+       if (par->fragoff != 0)
                return false;
 
-       mh = skb_header_pointer(skb, protoff, sizeof(_mh), &_mh);
+       mh = skb_header_pointer(skb, par->thoff, sizeof(_mh), &_mh);
        if (mh == NULL) {
                /* We've been asked to examine this packet, and we
                   can't.  Hence, no choice but to drop. */
                duprintf("Dropping evil MH tinygram.\n");
-               *hotdrop = true;
+               *par->hotdrop = true;
                return false;
        }
 
        if (mh->ip6mh_proto != IPPROTO_NONE) {
                duprintf("Dropping invalid MH Payload Proto: %u\n",
                         mh->ip6mh_proto);
-               *hotdrop = true;
+               *par->hotdrop = true;
                return false;
        }
 
This page took 0.029778 seconds and 5 git commands to generate.