summaryrefslogtreecommitdiffstats
path: root/net/8021q
diff options
context:
space:
mode:
authorVadim Fedorenko <vadim.fedorenko@linux.dev>2023-03-15 08:33:02 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-11 23:03:18 +0900
commitc3ee3540a133039507da934af0673cf5445a0972 (patch)
treea395b6b39378d0b631e2bc9302368c9085cc5cce /net/8021q
parent07782db81e080989b24b634741eed20d2bf161c5 (diff)
downloadlinux-stable-c3ee3540a133039507da934af0673cf5445a0972.tar.gz
linux-stable-c3ee3540a133039507da934af0673cf5445a0972.tar.bz2
linux-stable-c3ee3540a133039507da934af0673cf5445a0972.zip
vlan: partially enable SIOCSHWTSTAMP in container
[ Upstream commit 731b73dba359e3ff00517c13aa0daa82b34ff466 ] 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@linux.dev> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'net/8021q')
-rw-r--r--net/8021q/vlan_dev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/8021q/vlan_dev.c b/net/8021q/vlan_dev.c
index e1bb41a443c4..07e86d03d4ba 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: