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>
This commit is contained in:
@ -2154,7 +2154,7 @@ icmp6_type_code_match(u_int8_t test_type, u_int8_t min_code, u_int8_t max_code,
|
||||
}
|
||||
|
||||
static bool
|
||||
icmp6_match(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
icmp6_match(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
const struct icmp6hdr *ic;
|
||||
struct icmp6hdr _icmph;
|
||||
|
@ -36,8 +36,7 @@ spi_match(u_int32_t min, u_int32_t max, u_int32_t spi, bool invert)
|
||||
return r;
|
||||
}
|
||||
|
||||
static bool ah_mt6(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
static bool ah_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
struct ip_auth_hdr _ah;
|
||||
const struct ip_auth_hdr *ah;
|
||||
|
@ -20,7 +20,7 @@ MODULE_LICENSE("GPL");
|
||||
MODULE_AUTHOR("Andras Kis-Szabo <kisza@sch.bme.hu>");
|
||||
|
||||
static bool
|
||||
eui64_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
eui64_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
unsigned char eui64[8];
|
||||
|
||||
|
@ -35,7 +35,7 @@ id_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
|
||||
}
|
||||
|
||||
static bool
|
||||
frag_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
frag_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
struct frag_hdr _frag;
|
||||
const struct frag_hdr *fh;
|
||||
|
@ -44,7 +44,7 @@ MODULE_ALIAS("ip6t_dst");
|
||||
static struct xt_match hbh_mt6_reg[] __read_mostly;
|
||||
|
||||
static bool
|
||||
hbh_mt6(const struct sk_buff *skb, const struct xt_action_param *par)
|
||||
hbh_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
struct ipv6_opt_hdr _optsh;
|
||||
const struct ipv6_opt_hdr *oh;
|
||||
|
@ -27,7 +27,7 @@ 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 xt_action_param *par)
|
||||
ipv6header_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
const struct ip6t_ipv6header_info *info = par->matchinfo;
|
||||
unsigned int temp;
|
||||
|
@ -32,8 +32,7 @@ type_match(u_int8_t min, u_int8_t max, u_int8_t type, bool invert)
|
||||
return (type >= min && type <= max) ^ invert;
|
||||
}
|
||||
|
||||
static bool mh_mt6(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
static bool mh_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
struct ip6_mh _mh;
|
||||
const struct ip6_mh *mh;
|
||||
|
@ -36,8 +36,7 @@ segsleft_match(u_int32_t min, u_int32_t max, u_int32_t id, bool invert)
|
||||
return r;
|
||||
}
|
||||
|
||||
static bool rt_mt6(const struct sk_buff *skb,
|
||||
const struct xt_action_param *par)
|
||||
static bool rt_mt6(const struct sk_buff *skb, struct xt_action_param *par)
|
||||
{
|
||||
struct ipv6_rt_hdr _route;
|
||||
const struct ipv6_rt_hdr *rh;
|
||||
|
Reference in New Issue
Block a user