aboutsummaryrefslogtreecommitdiffstats
path: root/net/8021q/vlan_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/8021q/vlan_netlink.c')
-rw-r--r--net/8021q/vlan_netlink.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/8021q/vlan_netlink.c b/net/8021q/vlan_netlink.c
index 6cdd1e015e2d..0996185e2ed5 100644
--- a/net/8021q/vlan_netlink.c
+++ b/net/8021q/vlan_netlink.c
@@ -11,6 +11,7 @@
11#include <linux/kernel.h> 11#include <linux/kernel.h>
12#include <linux/netdevice.h> 12#include <linux/netdevice.h>
13#include <linux/if_vlan.h> 13#include <linux/if_vlan.h>
14#include <net/net_namespace.h>
14#include <net/netlink.h> 15#include <net/netlink.h>
15#include <net/rtnetlink.h> 16#include <net/rtnetlink.h>
16#include "vlan.h" 17#include "vlan.h"
@@ -112,7 +113,7 @@ static int vlan_newlink(struct net_device *dev,
112 113
113 if (!tb[IFLA_LINK]) 114 if (!tb[IFLA_LINK])
114 return -EINVAL; 115 return -EINVAL;
115 real_dev = __dev_get_by_index(nla_get_u32(tb[IFLA_LINK])); 116 real_dev = __dev_get_by_index(&init_net, nla_get_u32(tb[IFLA_LINK]));
116 if (!real_dev) 117 if (!real_dev)
117 return -ENODEV; 118 return -ENODEV;
118 119