[broadcom]: respect the current network namespace when creating netdev (#3896)
https://github.com/Broadcom-Switch/OpenNSL/issues/26 Signed-off-by: Wataru Ishida <ishida@nel-america.com>
This commit is contained in:
parent
b6ad09aa35
commit
ed2d5f8a32
@ -6165,6 +6165,10 @@ bkn_init_ndev(u8 *mac, char *name)
|
||||
strncpy(dev->name, name, IFNAMSIZ-1);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NET_NS
|
||||
dev_net_set(dev, current->nsproxy->net_ns);
|
||||
#endif
|
||||
|
||||
/* Register the kernel Ethernet device */
|
||||
if (register_netdev(dev)) {
|
||||
DBG_WARN(("Error registering Ethernet device.\n"));
|
||||
|
Loading…
Reference in New Issue
Block a user