Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62fc8051 authored by Jan Engelhardt's avatar Jan Engelhardt
Browse files

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: default avatarJan Engelhardt <jengelh@medozas.de>
parent 4b560b44
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -288,7 +288,7 @@ struct xt_match {
	   non-linear skb, using skb_header_pointer and
	   skb_ip_make_writable. */
	bool (*match)(const struct sk_buff *skb,
		      const struct xt_action_param *);
		      struct xt_action_param *);

	/* Called when user tries to insert an entry of this type. */
	int (*checkentry)(const struct xt_mtchk_param *);
+1 −1
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@
#include <linux/netfilter_bridge/ebt_802_3.h>

static bool
ebt_802_3_mt(const struct sk_buff *skb, const struct xt_action_param *par)
ebt_802_3_mt(const struct sk_buff *skb, struct xt_action_param *par)
{
	const struct ebt_802_3_info *info = par->matchinfo;
	const struct ebt_802_3_hdr *hdr = ebt_802_3_hdr(skb);
+1 −1
Original line number Diff line number Diff line
@@ -129,7 +129,7 @@ static int get_ip_src(const struct sk_buff *skb, __be32 *addr)
}

static bool
ebt_among_mt(const struct sk_buff *skb, const struct xt_action_param *par)
ebt_among_mt(const struct sk_buff *skb, struct xt_action_param *par)
{
	const struct ebt_among_info *info = par->matchinfo;
	const char *dmac, *smac;
+1 −1
Original line number Diff line number Diff line
@@ -16,7 +16,7 @@
#include <linux/netfilter_bridge/ebt_arp.h>

static bool
ebt_arp_mt(const struct sk_buff *skb, const struct xt_action_param *par)
ebt_arp_mt(const struct sk_buff *skb, struct xt_action_param *par)
{
	const struct ebt_arp_info *info = par->matchinfo;
	const struct arphdr *ah;
+1 −1
Original line number Diff line number Diff line
@@ -25,7 +25,7 @@ struct tcpudphdr {
};

static bool
ebt_ip_mt(const struct sk_buff *skb, const struct xt_action_param *par)
ebt_ip_mt(const struct sk_buff *skb, struct xt_action_param *par)
{
	const struct ebt_ip_info *info = par->matchinfo;
	const struct iphdr *ih;
Loading