Re: [PATCH RFC v3 2/2] br_netfilter: per-netns copy of structure for sysctl flags

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Vasily Averin schreef op 12/05/2014 18:32:
pernet_operations creates per-netns copy of common structure for sysctl flags
and initialize it values taken from init_brnf_net.

Signed-off-by: Vasily Averin <vvs@xxxxxxxxxx>

+static int __net_init brnf_net_init(struct net *net)
+{
+	struct brnf_net *bn = brnf_net(net);
+
+	memcpy(bn, &init_brnf_net, sizeof(struct brnf_net));
+	bn->net = net;
+	return brnf_sysctl_net_register(bn);

This does introduce a bit of backwards incompatibility (easily fixed by adapting scripts), but this is really unavoidable when transforming an existing global configuration to a per-netns configuration. I'm ok with it.

cheers,
Bart

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux