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

Commit f54e9367 authored by Alexey Dobriyan's avatar Alexey Dobriyan Committed by Patrick McHardy
Browse files

netfilter: xtables: add struct xt_mtdtor_param::net



Add ->net to match destructor list like ->net in constructor list.

Make sure it's set in ebtables/iptables/ip6tables, this requires to
propagate netns up to *_unregister_table().

Signed-off-by: default avatarAlexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>
parent a83d8e8d
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -216,6 +216,7 @@ struct xt_mtchk_param {

/* Match destructor parameters */
struct xt_mtdtor_param {
	struct net *net;
	const struct xt_match *match;
	void *matchinfo;
	u_int8_t family;
+1 −1
Original line number Diff line number Diff line
@@ -289,7 +289,7 @@ struct ebt_table {
		     ~(__alignof__(struct ebt_replace)-1))
extern struct ebt_table *ebt_register_table(struct net *net,
					    const struct ebt_table *table);
extern void ebt_unregister_table(struct ebt_table *table);
extern void ebt_unregister_table(struct net *net, struct ebt_table *table);
extern unsigned int ebt_do_table(unsigned int hook, struct sk_buff *skb,
   const struct net_device *in, const struct net_device *out,
   struct ebt_table *table);
+1 −1
Original line number Diff line number Diff line
@@ -242,7 +242,7 @@ extern void ipt_init(void) __init;
extern struct xt_table *ipt_register_table(struct net *net,
					   const struct xt_table *table,
					   const struct ipt_replace *repl);
extern void ipt_unregister_table(struct xt_table *table);
extern void ipt_unregister_table(struct net *net, struct xt_table *table);

/* Standard entry. */
struct ipt_standard {
+1 −1
Original line number Diff line number Diff line
@@ -300,7 +300,7 @@ extern void ip6t_init(void) __init;
extern struct xt_table *ip6t_register_table(struct net *net,
					    const struct xt_table *table,
					    const struct ip6t_replace *repl);
extern void ip6t_unregister_table(struct xt_table *table);
extern void ip6t_unregister_table(struct net *net, struct xt_table *table);
extern unsigned int ip6t_do_table(struct sk_buff *skb,
				  unsigned int hook,
				  const struct net_device *in,
+1 −1
Original line number Diff line number Diff line
@@ -71,7 +71,7 @@ static int __net_init broute_net_init(struct net *net)

static void __net_exit broute_net_exit(struct net *net)
{
	ebt_unregister_table(net->xt.broute_table);
	ebt_unregister_table(net, net->xt.broute_table);
}

static struct pernet_operations broute_net_ops = {
Loading