summaryrefslogtreecommitdiff
path: root/net/hsr
diff options
context:
space:
mode:
authorJakub Kicinski <kuba@kernel.org>2025-10-16 20:53:13 +0300
committerJakub Kicinski <kuba@kernel.org>2025-10-23 20:53:08 +0300
commit2b7553db91f8ec446248fd59884f4b40452a3c3e (patch)
treea80c3d2f0ae3b95020249f2ae9ae49a7dbb50ef5 /net/hsr
parent61b7ade9ba8c3b16867e25411b5f7cf1abe35879 (diff)
parentab431bc39741e9d9bd3102688439e1864c857a74 (diff)
downloadlinux-2b7553db91f8ec446248fd59884f4b40452a3c3e.tar.xz
Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net
Cross-merge networking fixes after downstream PR (net-6.18-rc3). No conflicts or adjacent changes. Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/hsr')
-rw-r--r--net/hsr/hsr_netlink.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/net/hsr/hsr_netlink.c b/net/hsr/hsr_netlink.c
index 851187130755..db0b0af7a692 100644
--- a/net/hsr/hsr_netlink.c
+++ b/net/hsr/hsr_netlink.c
@@ -34,12 +34,18 @@ static int hsr_newlink(struct net_device *dev,
struct netlink_ext_ack *extack)
{
struct net *link_net = rtnl_newlink_link_net(params);
+ struct net_device *link[2], *interlink = NULL;
struct nlattr **data = params->data;
enum hsr_version proto_version;
unsigned char multicast_spec;
u8 proto = HSR_PROTOCOL_HSR;
- struct net_device *link[2], *interlink = NULL;
+ if (!net_eq(link_net, dev_net(dev))) {
+ NL_SET_ERR_MSG_MOD(extack,
+ "HSR slaves/interlink must be on the same net namespace than HSR link");
+ return -EINVAL;
+ }
+
if (!data) {
NL_SET_ERR_MSG_MOD(extack, "No slave devices specified");
return -EINVAL;