]> err.no Git - linux-2.6/blobdiff - net/netfilter/xt_mac.c
[NETFILTER]: nfnetlink_log: remove fallback to group 0
[linux-2.6] / net / netfilter / xt_mac.c
index 425fc21e31f54f95013382007075c12d35f8a709..1d3a1d98b885e49357a9bb03e12a181afa9198ec 100644 (file)
@@ -14,6 +14,7 @@
 #include <linux/etherdevice.h>
 
 #include <linux/netfilter_ipv4.h>
+#include <linux/netfilter_ipv6.h>
 #include <linux/netfilter/xt_mac.h>
 #include <linux/netfilter/x_tables.h>
 
@@ -36,8 +37,8 @@ match(const struct sk_buff *skb,
     const struct xt_mac_info *info = matchinfo;
 
     /* Is mac pointer valid? */
-    return (skb->mac.raw >= skb->head
-           && (skb->mac.raw + ETH_HLEN) <= skb->data
+    return (skb_mac_header(skb) >= skb->head &&
+           (skb_mac_header(skb) + ETH_HLEN) <= skb->data
            /* If so, compare... */
            && ((!compare_ether_addr(eth_hdr(skb)->h_source, info->srcaddr))
                ^ info->invert));
@@ -59,9 +60,9 @@ static struct xt_match xt_mac_match[] = {
                .family         = AF_INET6,
                .match          = match,
                .matchsize      = sizeof(struct xt_mac_info),
-               .hooks          = (1 << NF_IP_PRE_ROUTING) |
-                                 (1 << NF_IP_LOCAL_IN) |
-                                 (1 << NF_IP_FORWARD),
+               .hooks          = (1 << NF_IP6_PRE_ROUTING) |
+                                 (1 << NF_IP6_LOCAL_IN) |
+                                 (1 << NF_IP6_FORWARD),
                .me             = THIS_MODULE,
        },
 };