]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - net/ipv6/netfilter/ip6t_ipv6header.c
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6-omap-h63xx.git] / net / ipv6 / netfilter / ip6t_ipv6header.c
index 3a940171f8297ac47669e658d2f8c80e5f5945ed..14e6724d5672a7ff291ced4de556da7a7d920d29 100644 (file)
@@ -27,12 +27,9 @@ MODULE_DESCRIPTION("Xtables: IPv6 header types match");
 MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
 
 static bool
-ipv6header_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)
+ipv6header_mt6(const struct sk_buff *skb, const struct xt_match_param *par)
 {
-       const struct ip6t_ipv6header_info *info = matchinfo;
+       const struct ip6t_ipv6header_info *info = par->matchinfo;
        unsigned int temp;
        int len;
        u8 nexthdr;
@@ -49,7 +46,8 @@ ipv6header_mt6(const struct sk_buff *skb, const struct net_device *in,
        temp = 0;
 
        while (ip6t_ext_hdr(nexthdr)) {
-               struct ipv6_opt_hdr _hdr, *hp;
+               const struct ipv6_opt_hdr *hp;
+               struct ipv6_opt_hdr _hdr;
                int hdrlen;
 
                /* Is there enough space for the next ext header? */
@@ -120,12 +118,9 @@ ipv6header_mt6(const struct sk_buff *skb, const struct net_device *in,
        }
 }
 
-static bool
-ipv6header_mt6_check(const char *tablename, const void *ip,
-                     const struct xt_match *match, void *matchinfo,
-                     unsigned int hook_mask)
+static bool ipv6header_mt6_check(const struct xt_mtchk_param *par)
 {
-       const struct ip6t_ipv6header_info *info = matchinfo;
+       const struct ip6t_ipv6header_info *info = par->matchinfo;
 
        /* invflags is 0 or 0xff in hard mode */
        if ((!info->modeflag) && info->invflags != 0x00 &&
@@ -137,7 +132,7 @@ ipv6header_mt6_check(const char *tablename, const void *ip,
 
 static struct xt_match ipv6header_mt6_reg __read_mostly = {
        .name           = "ipv6header",
-       .family         = AF_INET6,
+       .family         = NFPROTO_IPV6,
        .match          = ipv6header_mt6,
        .matchsize      = sizeof(struct ip6t_ipv6header_info),
        .checkentry     = ipv6header_mt6_check,