diff options
Diffstat (limited to 'net/netfilter/xt_mac.c')
-rw-r--r-- | net/netfilter/xt_mac.c | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/net/netfilter/xt_mac.c b/net/netfilter/xt_mac.c index 6ff4479ca63..7d89863a78b 100644 --- a/net/netfilter/xt_mac.c +++ b/net/netfilter/xt_mac.c | |||
@@ -25,14 +25,9 @@ MODULE_ALIAS("ipt_mac"); | |||
25 | MODULE_ALIAS("ip6t_mac"); | 25 | MODULE_ALIAS("ip6t_mac"); |
26 | 26 | ||
27 | static bool | 27 | static bool |
28 | match(const struct sk_buff *skb, | 28 | mac_mt(const struct sk_buff *skb, const struct net_device *in, |
29 | const struct net_device *in, | 29 | const struct net_device *out, const struct xt_match *match, |
30 | const struct net_device *out, | 30 | const void *matchinfo, int offset, unsigned int protoff, bool *hotdrop) |
31 | const struct xt_match *match, | ||
32 | const void *matchinfo, | ||
33 | int offset, | ||
34 | unsigned int protoff, | ||
35 | bool *hotdrop) | ||
36 | { | 31 | { |
37 | const struct xt_mac_info *info = matchinfo; | 32 | const struct xt_mac_info *info = matchinfo; |
38 | 33 | ||
@@ -44,11 +39,11 @@ match(const struct sk_buff *skb, | |||
44 | ^ info->invert); | 39 | ^ info->invert); |
45 | } | 40 | } |
46 | 41 | ||
47 | static struct xt_match xt_mac_match[] __read_mostly = { | 42 | static struct xt_match mac_mt_reg[] __read_mostly = { |
48 | { | 43 | { |
49 | .name = "mac", | 44 | .name = "mac", |
50 | .family = AF_INET, | 45 | .family = AF_INET, |
51 | .match = match, | 46 | .match = mac_mt, |
52 | .matchsize = sizeof(struct xt_mac_info), | 47 | .matchsize = sizeof(struct xt_mac_info), |
53 | .hooks = (1 << NF_INET_PRE_ROUTING) | | 48 | .hooks = (1 << NF_INET_PRE_ROUTING) | |
54 | (1 << NF_INET_LOCAL_IN) | | 49 | (1 << NF_INET_LOCAL_IN) | |
@@ -58,7 +53,7 @@ static struct xt_match xt_mac_match[] __read_mostly = { | |||
58 | { | 53 | { |
59 | .name = "mac", | 54 | .name = "mac", |
60 | .family = AF_INET6, | 55 | .family = AF_INET6, |
61 | .match = match, | 56 | .match = mac_mt, |
62 | .matchsize = sizeof(struct xt_mac_info), | 57 | .matchsize = sizeof(struct xt_mac_info), |
63 | .hooks = (1 << NF_INET_PRE_ROUTING) | | 58 | .hooks = (1 << NF_INET_PRE_ROUTING) | |
64 | (1 << NF_INET_LOCAL_IN) | | 59 | (1 << NF_INET_LOCAL_IN) | |
@@ -67,15 +62,15 @@ static struct xt_match xt_mac_match[] __read_mostly = { | |||
67 | }, | 62 | }, |
68 | }; | 63 | }; |
69 | 64 | ||
70 | static int __init xt_mac_init(void) | 65 | static int __init mac_mt_init(void) |
71 | { | 66 | { |
72 | return xt_register_matches(xt_mac_match, ARRAY_SIZE(xt_mac_match)); | 67 | return xt_register_matches(mac_mt_reg, ARRAY_SIZE(mac_mt_reg)); |
73 | } | 68 | } |
74 | 69 | ||
75 | static void __exit xt_mac_fini(void) | 70 | static void __exit mac_mt_exit(void) |
76 | { | 71 | { |
77 | xt_unregister_matches(xt_mac_match, ARRAY_SIZE(xt_mac_match)); | 72 | xt_unregister_matches(mac_mt_reg, ARRAY_SIZE(mac_mt_reg)); |
78 | } | 73 | } |
79 | 74 | ||
80 | module_init(xt_mac_init); | 75 | module_init(mac_mt_init); |
81 | module_exit(xt_mac_fini); | 76 | module_exit(mac_mt_exit); |