From patchwork Wed Mar 15 15:33:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vadim Fedorenko X-Patchwork-Id: 13176176 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 958B3C61DA4 for ; Wed, 15 Mar 2023 15:33:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231663AbjCOPdm (ORCPT ); Wed, 15 Mar 2023 11:33:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232142AbjCOPdl (ORCPT ); Wed, 15 Mar 2023 11:33:41 -0400 Received: from mx0a-00082601.pphosted.com (mx0a-00082601.pphosted.com [67.231.145.42]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABA4620A17 for ; Wed, 15 Mar 2023 08:33:39 -0700 (PDT) Received: from pps.filterd (m0148461.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 32F6cstg007526; Wed, 15 Mar 2023 08:33:30 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=meta.com; h=from : to : cc : subject : date : message-id : mime-version : content-transfer-encoding : content-type; s=s2048-2021-q4; bh=zqbBSTjIgFSrqIcRh2XbbVZ5cAMYZZ9id2g4i7olwNU=; b=WBNjFrAwwhlc2cKf4YLoLcWZt6KdjGr0epIhcgBle4h2+7UqBlPz8/GEUZIhyM7kGtHC d2fdPb/WMd0vb4WUw/aoGY0ApNfq9m1Xs9kG6f1lt46L19LhW8bCp+BCXV3UOlgUuCq7 lHXtg7RYQySDp3Yk7Ax0Jzp3meWYrxLbCRTCh0BHRg4tMORKeixwwQckTz12u5re3tsa m08x7MRFf/fal/TPnIvFGkvcu/H3nw/T+fYNkBJKhaJc3Ulfk7032wdl00S4Uyr1CLU0 JqcB/3R4SkWjBi89NKOeWsVQ6HsDyyEhCjcKmVNS5/4Vl7vNPpmtwaUh5OBtRtJDNsJl nQ== Received: from maileast.thefacebook.com ([163.114.130.16]) by mx0a-00082601.pphosted.com (PPS) with ESMTPS id 3pb2c64uyk-5 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Wed, 15 Mar 2023 08:33:29 -0700 Received: from devvm1736.cln0.facebook.com (2620:10d:c0a8:1b::d) by mail.thefacebook.com (2620:10d:c0a8:83::6) with Microsoft SMTP Server id 15.1.2507.17; Wed, 15 Mar 2023 08:33:19 -0700 From: Vadim Fedorenko To: Jakub Kicinski , Hangbin Liu , Richard Cochran , Paolo Abeni , Eric Dumazet CC: Vadim Fedorenko , Subject: [PATCH net] vlan: partially enable SIOCSHWTSTAMP in container Date: Wed, 15 Mar 2023 08:33:02 -0700 Message-ID: <20230315153302.1472902-1-vadfed@meta.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-Originating-IP: [2620:10d:c0a8:1b::d] X-Proofpoint-GUID: MkUckES7AsZkx237l5qROr1HNx-RM62m X-Proofpoint-ORIG-GUID: MkUckES7AsZkx237l5qROr1HNx-RM62m X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-03-15_08,2023-03-15_01,2023-02-09_01 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org From: Vadim Fedorenko 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 --- 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: