]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/netfilter/ip6t_rt.c
Merge branch 'drm-next' of git://git.kernel.org/pub/scm/linux/kernel/git/airlied...
[linux-2.6-omap-h63xx.git] / net / ipv6 / netfilter / ip6t_rt.c
index 81aaf7aaaabfc719597c921ace184de47ea18beb..356b8d6f6baa4151b16aa53d0282cc77e7be815d 100644 (file)
@@ -36,14 +36,11 @@ segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
        return r;
 }
 
-static bool
-rt_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 rt_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
 {
        struct ipv6_rt_hdr _route;
        const struct ipv6_rt_hdr *rh;
-       const struct ip6t_rt *rtinfo = matchinfo;
+       const struct ip6t_rt *rtinfo = par->matchinfo;
        unsigned int temp;
        unsigned int ptr;
        unsigned int hdrlen = 0;
@@ -55,13 +52,13 @@ rt_mt6(const struct sk_buff *skb, const struct net_device *in,
        err = ipv6_find_hdr(skb, &ptr, NEXTHDR_ROUTING, NULL);
        if (err < 0) {
                if (err != -ENOENT)
-                       *hotdrop = true;
+                       *par->hotdrop = true;
                return false;
        }
 
        rh = skb_header_pointer(skb, ptr, sizeof(_route), &_route);
        if (rh == NULL) {
-               *hotdrop = true;
+               *par->hotdrop = true;
                return false;
        }
 
@@ -189,13 +186,9 @@ rt_mt6(const struct sk_buff *skb, const struct net_device *in,
        return false;
 }
 
-/* Called when user tries to insert an entry of this type. */
-static bool
-rt_mt6_check(const char *tablename, const void *entry,
-             const struct xt_match *match, void *matchinfo,
-             unsigned int hook_mask)
+static bool rt_mt6_check(const struct xt_mtchk_param *par)
 {
-       const struct ip6t_rt *rtinfo = matchinfo;
+       const struct ip6t_rt *rtinfo = par->matchinfo;
 
        if (rtinfo->invflags & ~IP6T_RT_INV_MASK) {
                pr_debug("ip6t_rt: unknown flags %X\n", rtinfo->invflags);
@@ -214,7 +207,7 @@ rt_mt6_check(const char *tablename, const void *entry,
 
 static struct xt_match rt_mt6_reg __read_mostly = {
        .name           = "rt",
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .match          = rt_mt6,
        .matchsize      = sizeof(struct ip6t_rt),
        .checkentry     = rt_mt6_check,