Skip to content

Commit

Permalink
vlan: partially enable SIOCSHWTSTAMP in container
Browse files Browse the repository at this point in the history
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: 873017a ("vlan: disable SIOCSHWTSTAMP in container")
Signed-off-by: Vadim Fedorenko <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Vadim Fedorenko authored and davem330 committed Mar 17, 2023
1 parent e05c518 commit 731b73d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/8021q/vlan_dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 731b73d

Please sign in to comment.