diff options
author | Kris Katterjohn <kjak@users.sourceforge.net> | 2006-01-09 19:01:43 -0500 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2006-01-10 15:54:28 -0500 |
commit | d3f4a687f683f536506d0aa6b22e6cb3e79639ce (patch) | |
tree | d1f5fb7177d1dd254e63189cb89e51a86a24f171 /net/ipv4 | |
parent | 770cfbcffdf0011ecf3a12435ecb5604c4c97a19 (diff) |
[NET]: Change memcmp(,,ETH_ALEN) to compare_ether_addr()
This changes some memcmp(one,two,ETH_ALEN) to compare_ether_addr(one,two).
Signed-off-by: Kris Katterjohn <kjak@users.sourceforge.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv4')
-rw-r--r-- | net/ipv4/netfilter/ipt_mac.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/netfilter/ipt_mac.c b/net/ipv4/netfilter/ipt_mac.c index 11a459e33f25..1b9bb4559f80 100644 --- a/net/ipv4/netfilter/ipt_mac.c +++ b/net/ipv4/netfilter/ipt_mac.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/skbuff.h> | 12 | #include <linux/skbuff.h> |
13 | #include <linux/if_ether.h> | 13 | #include <linux/if_ether.h> |
14 | #include <linux/etherdevice.h> | ||
14 | 15 | ||
15 | #include <linux/netfilter_ipv4/ipt_mac.h> | 16 | #include <linux/netfilter_ipv4/ipt_mac.h> |
16 | #include <linux/netfilter_ipv4/ip_tables.h> | 17 | #include <linux/netfilter_ipv4/ip_tables.h> |
@@ -33,8 +34,8 @@ match(const struct sk_buff *skb, | |||
33 | return (skb->mac.raw >= skb->head | 34 | return (skb->mac.raw >= skb->head |
34 | && (skb->mac.raw + ETH_HLEN) <= skb->data | 35 | && (skb->mac.raw + ETH_HLEN) <= skb->data |
35 | /* If so, compare... */ | 36 | /* If so, compare... */ |
36 | && ((memcmp(eth_hdr(skb)->h_source, info->srcaddr, ETH_ALEN) | 37 | && ((!compare_ether_addr(eth_hdr(skb)->h_source, info->srcaddr)) |
37 | == 0) ^ info->invert)); | 38 | ^ info->invert)); |
38 | } | 39 | } |
39 | 40 | ||
40 | static int | 41 | static int |