Skip to content

Commit

Permalink
[broadcom]: respect the current network namespace when creating netdev (
Browse files Browse the repository at this point in the history
  • Loading branch information
ishidawataru authored and abdosi committed Apr 27, 2020
1 parent 8c43dea commit 674f72e
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6161,6 +6161,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"));
Expand Down

0 comments on commit 674f72e

Please sign in to comment.