[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230315153302.1472902-1-vadfed@meta.com>
Date: Wed, 15 Mar 2023 08:33:02 -0700
From: Vadim Fedorenko <vadfed@...a.com>
To: Jakub Kicinski <kuba@...nel.org>,
Hangbin Liu <liuhangbin@...il.com>,
Richard Cochran <richardcochran@...il.com>,
Paolo Abeni <pabeni@...hat.com>,
Eric Dumazet <edumazet@...gle.com>
CC: Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
<netdev@...r.kernel.org>
Subject: [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container
From: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
Setting timestamp filter was explicitly disabled on vlan devices in
containers because it might affect other processes on the host. But it's
absolutely legit in case when real device is in the same namespace.
Fixes: 873017af7784 ("vlan: disable SIOCSHWTSTAMP in container")
Signed-off-by: Vadim Fedorenko <vadim.fedorenko@...ux.dev>
---
net/8021q/vlan_dev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index 296d0145932f..5920544e93e8 100644
--- a/net/8021q/vlan_dev.c
+++ b/net/8021q/vlan_dev.c
@@ -365,7 +365,7 @@ static int vlan_dev_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
switch (cmd) {
case SIOCSHWTSTAMP:
- if (!net_eq(dev_net(dev), &init_net))
+ if (!net_eq(dev_net(dev), dev_net(real_dev)))
break;
fallthrough;
case SIOCGMIIPHY:
--
2.34.1
Powered by blists - more mailing lists