diff options
author | Jan Engelhardt <jengelh@medozas.de> | 2009-07-07 14:42:08 -0400 |
---|---|---|
committer | Jan Engelhardt <jengelh@medozas.de> | 2010-05-11 12:33:37 -0400 |
commit | 62fc8051083a334578c3f4b3488808f210b4565f (patch) | |
tree | 9f48eb26316b19b0b8c010d774f3c936315c1aa1 /net/ipv6 | |
parent | 4b560b447df83368df44bd3712c0c39b1d79ba04 (diff) |
netfilter: xtables: deconstify struct xt_action_param for matches
In future, layer-3 matches will be an xt module of their own, and
need to set the fragoff and thoff fields. Adding more pointers would
needlessy increase memory requirements (esp. so for 64-bit, where
pointers are wider).
Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/netfilter/ip6_tables.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_ah.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_eui64.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_frag.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_hbh.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_ipv6header.c | 2 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_mh.c | 3 | ||||
-rw-r--r-- | net/ipv6/netfilter/ip6t_rt.c | 3 |
8 files changed, 8 insertions, 11 deletions
diff --git a/net/ipv6/netfilter/ip6_tables.c b/net/ipv6/netfilter/ip6_tables.c index c3bc999a8bb6..4549f8d6f88f 100644 --- a/net/ipv6/netfilter/ip6_tables.c +++ b/net/ipv6/netfilter/ip6_tables.c | |||
@@ -2154,7 +2154,7 @@ icmp6_type_code_match(u_int8_t test_type, u_int8_t min_code, u_int8_t max_code, | |||
2154 | } | 2154 | } |
2155 | 2155 | ||
2156 | static bool | 2156 | static bool |
2157 | icmp6_match(const struct sk_buff *skb, const struct xt_action_param *par) | 2157 | icmp6_match(const struct sk_buff *skb, struct xt_action_param *par) |
2158 | { | 2158 | { |
2159 | const struct icmp6hdr *ic; | 2159 | const struct icmp6hdr *ic; |
2160 | struct icmp6hdr _icmph; | 2160 | struct icmp6hdr _icmph; |
diff --git a/net/ipv6/netfilter/ip6t_ah.c b/net/ipv6/netfilter/ip6t_ah.c index 4fe71898381d..c89887f35a46 100644 --- a/net/ipv6/netfilter/ip6t_ah.c +++ b/net/ipv6/netfilter/ip6t_ah.c | |||
@@ -36,8 +36,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert) | |||
36 | return r; | 36 | return r; |
37 | } | 37 | } |
38 | 38 | ||
39 | static bool ah_mt6(const struct sk_buff *skb, | 39 | static bool ah_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
40 | const struct xt_action_param *par) | ||
41 | { | 40 | { |
42 | struct ip_auth_hdr _ah; | 41 | struct ip_auth_hdr _ah; |
43 | const struct ip_auth_hdr *ah; | 42 | const struct ip_auth_hdr *ah; |
diff --git a/net/ipv6/netfilter/ip6t_eui64.c b/net/ipv6/netfilter/ip6t_eui64.c index 2fd2be1795e0..f32fce34145a 100644 --- a/net/ipv6/netfilter/ip6t_eui64.c +++ b/net/ipv6/netfilter/ip6t_eui64.c | |||
@@ -20,7 +20,7 @@ MODULE_LICENSE("GPL"); | |||
20 | MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); | 20 | MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); |
21 | 21 | ||
22 | static bool | 22 | static bool |
23 | eui64_mt6(const struct sk_buff *skb, const struct xt_action_param *par) | 23 | eui64_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
24 | { | 24 | { |
25 | unsigned char eui64[8]; | 25 | unsigned char eui64[8]; |
26 | 26 | ||
diff --git a/net/ipv6/netfilter/ip6t_frag.c b/net/ipv6/netfilter/ip6t_frag.c index 8401aa82ea0b..fcc8c72f218e 100644 --- a/net/ipv6/netfilter/ip6t_frag.c +++ b/net/ipv6/netfilter/ip6t_frag.c | |||
@@ -35,7 +35,7 @@ id_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert) | |||
35 | } | 35 | } |
36 | 36 | ||
37 | static bool | 37 | static bool |
38 | frag_mt6(const struct sk_buff *skb, const struct xt_action_param *par) | 38 | frag_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
39 | { | 39 | { |
40 | struct frag_hdr _frag; | 40 | struct frag_hdr _frag; |
41 | const struct frag_hdr *fh; | 41 | const struct frag_hdr *fh; |
diff --git a/net/ipv6/netfilter/ip6t_hbh.c b/net/ipv6/netfilter/ip6t_hbh.c index d19d5cf47a38..f8aebc098d71 100644 --- a/net/ipv6/netfilter/ip6t_hbh.c +++ b/net/ipv6/netfilter/ip6t_hbh.c | |||
@@ -44,7 +44,7 @@ MODULE_ALIAS("ip6t_dst"); | |||
44 | static struct xt_match hbh_mt6_reg[] __read_mostly; | 44 | static struct xt_match hbh_mt6_reg[] __read_mostly; |
45 | 45 | ||
46 | static bool | 46 | static bool |
47 | hbh_mt6(const struct sk_buff *skb, const struct xt_action_param *par) | 47 | hbh_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
48 | { | 48 | { |
49 | struct ipv6_opt_hdr _optsh; | 49 | struct ipv6_opt_hdr _optsh; |
50 | const struct ipv6_opt_hdr *oh; | 50 | const struct ipv6_opt_hdr *oh; |
diff --git a/net/ipv6/netfilter/ip6t_ipv6header.c b/net/ipv6/netfilter/ip6t_ipv6header.c index 8e88bb8311de..54bd9790603f 100644 --- a/net/ipv6/netfilter/ip6t_ipv6header.c +++ b/net/ipv6/netfilter/ip6t_ipv6header.c | |||
@@ -27,7 +27,7 @@ MODULE_DESCRIPTION("Xtables: IPv6 header types match"); | |||
27 | MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); | 27 | MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>"); |
28 | 28 | ||
29 | static bool | 29 | static bool |
30 | ipv6header_mt6(const struct sk_buff *skb, const struct xt_action_param *par) | 30 | ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
31 | { | 31 | { |
32 | const struct ip6t_ipv6header_info *info = par->matchinfo; | 32 | const struct ip6t_ipv6header_info *info = par->matchinfo; |
33 | unsigned int temp; | 33 | unsigned int temp; |
diff --git a/net/ipv6/netfilter/ip6t_mh.c b/net/ipv6/netfilter/ip6t_mh.c index 4a60788873fd..eb1c3d65271a 100644 --- a/net/ipv6/netfilter/ip6t_mh.c +++ b/net/ipv6/netfilter/ip6t_mh.c | |||
@@ -32,8 +32,7 @@ type_match(u_int8_t min, u_int8_t max, u_int8_t type, bool invert) | |||
32 | return (type >= min && type <= max) ^ invert; | 32 | return (type >= min && type <= max) ^ invert; |
33 | } | 33 | } |
34 | 34 | ||
35 | static bool mh_mt6(const struct sk_buff *skb, | 35 | static bool mh_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
36 | const struct xt_action_param *par) | ||
37 | { | 36 | { |
38 | struct ip6_mh _mh; | 37 | struct ip6_mh _mh; |
39 | const struct ip6_mh *mh; | 38 | const struct ip6_mh *mh; |
diff --git a/net/ipv6/netfilter/ip6t_rt.c b/net/ipv6/netfilter/ip6t_rt.c index 793c27200881..ee584693ee35 100644 --- a/net/ipv6/netfilter/ip6t_rt.c +++ b/net/ipv6/netfilter/ip6t_rt.c | |||
@@ -36,8 +36,7 @@ segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert) | |||
36 | return r; | 36 | return r; |
37 | } | 37 | } |
38 | 38 | ||
39 | static bool rt_mt6(const struct sk_buff *skb, | 39 | static bool rt_mt6(const struct sk_buff *skb, struct xt_action_param *par) |
40 | const struct xt_action_param *par) | ||
41 | { | 40 | { |
42 | struct ipv6_rt_hdr _route; | 41 | struct ipv6_rt_hdr _route; |
43 | const struct ipv6_rt_hdr *rh; | 42 | const struct ipv6_rt_hdr *rh; |