Commit 586d5a8b authored by Florian Westphal's avatar Florian Westphal Committed by Pablo Neira Ayuso

netfilter: x_tables: reduce xt_action_param by 8 byte

The fragment offset in ipv4/ipv6 is a 16bit field, so use
u16 instead of unsigned int.

On 64bit: 40 bytes to 32 bytes. By extension this also reduces
nft_pktinfo (56 to 48 byte).
Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
parent e0241ae6
...@@ -36,8 +36,8 @@ struct xt_action_param { ...@@ -36,8 +36,8 @@ struct xt_action_param {
const void *matchinfo, *targinfo; const void *matchinfo, *targinfo;
}; };
const struct nf_hook_state *state; const struct nf_hook_state *state;
int fragoff;
unsigned int thoff; unsigned int thoff;
u16 fragoff;
bool hotdrop; bool hotdrop;
}; };
......
...@@ -51,7 +51,7 @@ ip6_packet_match(const struct sk_buff *skb, ...@@ -51,7 +51,7 @@ ip6_packet_match(const struct sk_buff *skb,
const char *outdev, const char *outdev,
const struct ip6t_ip6 *ip6info, const struct ip6t_ip6 *ip6info,
unsigned int *protoff, unsigned int *protoff,
int *fragoff, bool *hotdrop) u16 *fragoff, bool *hotdrop)
{ {
unsigned long ret; unsigned long ret;
const struct ipv6hdr *ipv6 = ipv6_hdr(skb); const struct ipv6hdr *ipv6 = ipv6_hdr(skb);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment