Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1382029imm; Sun, 2 Sep 2018 21:41:00 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ+xv8B170oDvfz1fXbmA9SumZA17P3qER9k/wGuNr1BAFOAg3oqzrh9yvRuxGb9dQIVMMR X-Received: by 2002:a62:411a:: with SMTP id o26-v6mr27832378pfa.111.1535949660138; Sun, 02 Sep 2018 21:41:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535949660; cv=none; d=google.com; s=arc-20160816; b=Yt/LhhjcEUtF/6hwQTpPUxObNqpQjaYsAyJFby3dZ0euCVTnZ19A/J8E6K+kHP8vdX sog2SLuijlXK/yekVD+j7O4Aer0KNExf9Z1eVgRN/sPrBVlg7KSJIBAjJ95Ecc0/BlZP l+lI/17Xi0EDQIaoXUKPiSOGIE+al+xyNBIFQLLUzumoXpb+FVKxDpEQnSYSIBIFaZed HXN4T51otKoZK1ORTcMB/lLfnSH7YLecjl/K4UecKcI1DT7rkEQ3zRklt9uq5OBZuNIw pp9NWxRcDSz4b4C18NdwvKfoNIIrNHsb9B+2oOzTa9XvfdEa/ItECXfaEXT8QU5fRGu5 AyLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=MAXfVGzsIqmA+wyo0wYzYx18bQFQuNziqTws7Do2Ntk=; b=f+FU52pMbR/oMSuL/qgtOYEmC+ztqvTG9ITaVb0vUnmHOfVdzc34FuzeL1+Ryhkwil J5BA+V9ltddLG4ZPKoseaBojBMCsV/hVpR1xSciPaFK/5zIkb+6xcSaj0sEumzPEZP9y 6Pm2j7rE1/Vie6mcB9jPO4tDf2lwcHlOPziwv7GDgnSMhl4NksdKD9Itb4EAxwnz5sMU yj3n8KOUl0R/9qCgX5FiGrHU3esygahd9OwAp/bd0ezj1aw4B3WS0YvjDtLxHfFmcsCl ZXso6UeWrcbkCGMpLGVjah3+N41cTusaNXBVTEJWBIKqAk3hnrqVi0kNm+FXWwNw8YwR HXqg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l5-v6si17573114pgh.451.2018.09.02.21.40.45; Sun, 02 Sep 2018 21:41:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727100AbeICI5o (ORCPT + 99 others); Mon, 3 Sep 2018 04:57:44 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:46871 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725892AbeICI5n (ORCPT ); Mon, 3 Sep 2018 04:57:43 -0400 Received: by mail-wr1-f67.google.com with SMTP id a108-v6so16324221wrc.13; Sun, 02 Sep 2018 21:39:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MAXfVGzsIqmA+wyo0wYzYx18bQFQuNziqTws7Do2Ntk=; b=BYg+OB5tBUl4UqWgvE/1Z8Wgj6h7AFfnsuzDCKCil8bciAAmaeOtkrwmzIOcYrab33 l+TrVM2r60C4N16bJUt5jipnQuFvJ37iyqw787r+nzsbevm5Hzj9NAzNVLjwPHU5TmrF KxXcHEnZcBSJFj7gXxYINX5I2NZQZdE3DN3zFOHo4NgZ9e0W/2WJAl61joM0OaJtzN/x ZYrwlIeKc4UTKTsvYFfdWkgPNjW8mGRZE7xTK1zWZdK/kLlYdU9XzJLuKzU0BDTF1vBv Y5KYRU9iNYzqNcV9b05OhHkl5TrzqcuK1VMSazuqHX0W0+CkZFTiyGNze6L65JYVau1q Ujbw== X-Gm-Message-State: APzg51DL3qbsyu1h9vvHio9JFpIL4eKKV+FaVlcOOM184SmjcO4JkfeO St000UHhNKfiBFSKd/XlX7srRqf+aCY6hw== X-Received: by 2002:adf:9404:: with SMTP id 4-v6mr18765323wrq.129.1535949558463; Sun, 02 Sep 2018 21:39:18 -0700 (PDT) Received: from localhost.localdomain ([88.128.81.0]) by smtp.gmail.com with ESMTPSA id j66-v6sm22453364wrj.28.2018.09.02.21.39.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Sep 2018 21:39:17 -0700 (PDT) From: Christian Brauner To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org, pombredanne@nexb.com, kstewart@linuxfoundation.org, gregkh@linuxfoundation.org, dsahern@gmail.com, fw@strlen.de, ktkhai@virtuozzo.com, lucien.xin@gmail.com, jakub.kicinski@netronome.com, jbenc@redhat.com, nicolas.dichtel@6wind.com, Christian Brauner Subject: [PATCH net-next v1 2/5] if_addr: add IFA_IF_NETNSID Date: Mon, 3 Sep 2018 06:37:14 +0200 Message-Id: <20180903043717.20136-3-christian@brauner.io> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180903043717.20136-1-christian@brauner.io> References: <20180903043717.20136-1-christian@brauner.io> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds a new IFA_IF_NETNSID property to be used by address families such as PF_INET and PF_INET6. The IFA_IF_NETNSID property can be used to send a network namespace identifier as part of a request. If a IFA_IF_NETNSID property is identified it will be used to retrieve the target network namespace in which the request is to be made. Signed-off-by: Christian Brauner Cc: Jiri Benc Cc: Nicolas Dichtel --- v0->v1: - unchanged Note, I did not change the property name to IFA_TARGET_NSID as there was no clear agreement what would be preferred. My personal preference is to keep the IFA_IF_NETNSID name because it aligns naturally with the IFLA_IF_NETNSID property for RTM_*LINK requests. Jiri seems to prefer this name too. However, if there is agreement that another property name makes more sense I'm happy to send a v2 that changes this. --- include/uapi/linux/if_addr.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_addr.h b/include/uapi/linux/if_addr.h index ebaf5701c9db..0e0cd588cac0 100644 --- a/include/uapi/linux/if_addr.h +++ b/include/uapi/linux/if_addr.h @@ -34,6 +34,7 @@ enum { IFA_MULTICAST, IFA_FLAGS, IFA_RT_PRIORITY, /* u32, priority/metric for prefix route */ + IFA_IF_NETNSID, __IFA_MAX, }; -- 2.17.1