diff options
author | Matt Johnston <matt@codeconstruct.com.au> | 2021-07-29 05:20:52 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-07-29 17:06:50 +0300 |
commit | 03f2bbc4ee57ca53b2fa1d9caabc5006e0b8f375 (patch) | |
tree | 488ab5b5447c4a2ca15c455f56e76f7485b1ba31 /net/mctp/device.c | |
parent | 26ab3fcaf23568cc8fc06aeb9306f3544969f252 (diff) | |
download | linux-03f2bbc4ee57ca53b2fa1d9caabc5006e0b8f375.tar.xz |
mctp: Allow per-netns default networks
Currently we have a compile-time default network
(MCTP_INITIAL_DEFAULT_NET). This change introduces a default_net field
on the net namespace, allowing future configuration for new interfaces.
Signed-off-by: Matt Johnston <matt@codeconstruct.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/mctp/device.c')
-rw-r--r-- | net/mctp/device.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/mctp/device.c b/net/mctp/device.c index aa049590acda..b9f38e765f61 100644 --- a/net/mctp/device.c +++ b/net/mctp/device.c @@ -267,7 +267,7 @@ static struct mctp_dev *mctp_add_dev(struct net_device *dev) spin_lock_init(&mdev->addrs_lock); - mdev->net = MCTP_INITIAL_DEFAULT_NET; + mdev->net = mctp_default_net(dev_net(dev)); /* associate to net_device */ rcu_assign_pointer(dev->mctp_ptr, mdev); |