Skip to contentSkip to conversation

vlan: partially enable SIOCSHWTSTAMP in container

PATCH Applied Vadim Fedorenko 2 participants 2 messages Mar 15, 2023 – Mar 17, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 vlan: partially enable SIOCSHWTSTAMP in container

From: Vadim Fedorenko <[email protected]>

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")
---
 net/8021q/vlan_dev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/8021q/vlan_dev.c +1 -1
index 296d0145932f..5920544e93e8 100644
@@ -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:
Signature · 1 line
2.34.1
#1 lore raw
This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (main) by David S. Miller <[email protected]>:

Quoted 10 lines · On Wed, 15 Mar 2023 08:33:02 -0700 you wrote:

From: Vadim Fedorenko <[email protected]>

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")

[...]

Here is the summary with links:
- [net] vlan: partially enable SIOCSHWTSTAMP in container

    https://git.kernel.org/netdev/net-next/c/731b73dba359

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html