Re: [RFC PATCH] net/ipv4/ipip: add support to move between network namespaces
From: Joe Perches <joe@perches.com>
Date: 2012-07-09 16:00:55
On Mon, 2012-07-09 at 17:41 +0200, Christian Franke wrote:
Below there is a first attempt at adding support for IPIP tunnels to be moved across network namespaces. This allows e.g. for tunnel setups where the inner network is completely isolated from the outer transport network.
trivia:
quoted hunk ↗ jump to hunk
diff --git a/net/ipv4/ipip.c b/net/ipv4/ipip.c
[]
quoted hunk ↗ jump to hunk
@@ -652,6 +660,9 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) break; case SIOCADDTUNNEL: + /* New Tunnels will be created in the current namespace */
New tunnels
quoted hunk ↗ jump to hunk
@@ -701,6 +712,15 @@ ipip_tunnel_ioctl (struct net_device *dev, struct ifreq *ifr, int cmd) t->parms.iph.tos = p.iph.tos; t->parms.iph.frag_off = p.iph.frag_off; if (t->parms.link != p.link) { + if (!net_eq(dev_net(dev), + target_net(dev))) { + pr_info_once("%s: rebinding " + "cross ns device " + "is not supported\n", + __func__);
Please coalesce format strings.
pr_info_once("%s: rebinding cross ns device is not supported\n",
__func__);
shouldn't "cross ns device" be "different ns devices"?