netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container
@ 2023-03-15 15:33 Vadim Fedorenko
  2023-03-17  8:30 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Vadim Fedorenko @ 2023-03-15 15:33 UTC (permalink / raw)
  To: Jakub Kicinski, Hangbin Liu, Richard Cochran, Paolo Abeni,
	Eric Dumazet
  Cc: Vadim Fedorenko, netdev

From: Vadim Fedorenko <vadim.fedorenko@linux.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@linux.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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container
  2023-03-15 15:33 [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container Vadim Fedorenko
@ 2023-03-17  8:30 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2023-03-17  8:30 UTC (permalink / raw)
  To: Vadim Fedorenko
  Cc: kuba, liuhangbin, richardcochran, pabeni, edumazet,
	vadim.fedorenko, netdev

Hello:

This patch was applied to netdev/net-next.git (main)
by David S. Miller <davem@davemloft.net>:

On Wed, 15 Mar 2023 08:33:02 -0700 you wrote:
> From: Vadim Fedorenko <vadim.fedorenko@linux.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@linux.dev>
> 
> [...]

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!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-17  8:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-03-15 15:33 [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container Vadim Fedorenko
2023-03-17  8:30 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).