diff options
author | Pravin B Shelar <pshelar@nicira.com> | 2012-02-22 22:58:59 -0500 |
---|---|---|
committer | Jesse Gross <jesse@nicira.com> | 2012-08-22 17:48:55 -0400 |
commit | 46df7b814548849deee01f50bc75f8f5ae8cd767 (patch) | |
tree | 1663fa6ae46edcba3787c0a4ff839365bb52bcbe /net/openvswitch/vport-netdev.c | |
parent | 0d7614f09c1ebdbaa1599a5aba7593f147bf96ee (diff) |
openvswitch: Add support for network namespaces.
Following patch adds support for network namespace to openvswitch.
Since it must release devices when namespaces are destroyed, a
side effect of this patch is that the module no longer keeps a
refcount but instead cleans up any state when it is unloaded.
Signed-off-by: Pravin B Shelar <pshelar@nicira.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Diffstat (limited to 'net/openvswitch/vport-netdev.c')
-rw-r--r-- | net/openvswitch/vport-netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/openvswitch/vport-netdev.c b/net/openvswitch/vport-netdev.c index 6ea3551cc78c..3c1e58ba714b 100644 --- a/net/openvswitch/vport-netdev.c +++ b/net/openvswitch/vport-netdev.c | |||
@@ -83,7 +83,7 @@ static struct vport *netdev_create(const struct vport_parms *parms) | |||
83 | 83 | ||
84 | netdev_vport = netdev_vport_priv(vport); | 84 | netdev_vport = netdev_vport_priv(vport); |
85 | 85 | ||
86 | netdev_vport->dev = dev_get_by_name(&init_net, parms->name); | 86 | netdev_vport->dev = dev_get_by_name(ovs_dp_get_net(vport->dp), parms->name); |
87 | if (!netdev_vport->dev) { | 87 | if (!netdev_vport->dev) { |
88 | err = -ENODEV; | 88 | err = -ENODEV; |
89 | goto error_free_vport; | 89 | goto error_free_vport; |