Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp978549ybx; Thu, 7 Nov 2019 05:32:59 -0800 (PST) X-Google-Smtp-Source: APXvYqwLCewH1N2eM2xPh196UlvFEO4WQMq5wwg/8s/YUvdSGMKfyvsc+cXCEx7284a7FEaaT1Hc X-Received: by 2002:a05:6402:70e:: with SMTP id w14mr3508747edx.95.1573133579393; Thu, 07 Nov 2019 05:32:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573133579; cv=none; d=google.com; s=arc-20160816; b=sK3pqMcL41kqSM75pcEHVbr6nze6NQS0fL6u6s3ObZNUpzeRxsxo4mKs/nc8MoJps0 mKN+VcaMQzoHQDl2QrIpyvxIHamPatQEYKYlt8A7mUpiETt9DkCJIItNZ1IullLaenUA 8+xibCqOBmjT0Iv0SuWRUekHPEqlwDl/yRSkr0r36DACcC028/lDYN7nae6Xxe3dGFks T5gyJUAAuAR2/UJ7Qh0tGFtAUOAwRbam8TS2qJ011KKv06vjlxaWdTQNxSEuCYfCNLWE jdaeNFLscw+z725V38kdz8j+lyJSbVX1vsl829KAl8TowG1zLB556WTGoXZbd3oYpyRu /BNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=otw/LMNaCwhQgMmtphcj9FWjbVudliiaHCPb5fKJ7oY=; b=ef7Z8oTaStP529CmY9XmasHUpAUc2xEZ64N8cBe3GtqBjzH6S0P/3g50fRnBnJdllF DSOD6TNZK9/GexcU/P432hsCcmSBYbFfxQRGP34KIvdiKA9dJCkTwb3T21xnrS5nssGQ NCxohy0/oDoz8uamBgLKa3IE3bmGc5qxmAUXoeJFT1hSuWKlvlP/Qi7Tm6izOs7E1zUI LGLPHpcVLk9twf6mIAxQB5VBEcXZWY+LWO9N6NUYnJr96LAyCdDYHnGD/AIwiQdKD8/l mRjDmyIUDoAdV27J3GH5xM3QdIIHnXn6uTrS7ik3uwTNLJ1bg4FrVsH2cutUj9Bowt9R dR1g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@norrbonn-se.20150623.gappssmtp.com header.s=20150623 header.b=o9DFkbSg; 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 h6si817918ejt.227.2019.11.07.05.32.36; Thu, 07 Nov 2019 05:32:59 -0800 (PST) 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; dkim=pass header.i=@norrbonn-se.20150623.gappssmtp.com header.s=20150623 header.b=o9DFkbSg; 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 S2388954AbfKGN2B (ORCPT + 99 others); Thu, 7 Nov 2019 08:28:01 -0500 Received: from mail-lf1-f53.google.com ([209.85.167.53]:46264 "EHLO mail-lf1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726810AbfKGN2A (ORCPT ); Thu, 7 Nov 2019 08:28:00 -0500 Received: by mail-lf1-f53.google.com with SMTP id 19so1574835lft.13 for ; Thu, 07 Nov 2019 05:27:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=norrbonn-se.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=otw/LMNaCwhQgMmtphcj9FWjbVudliiaHCPb5fKJ7oY=; b=o9DFkbSgfcONILRXfz2vEJwroONNdr/qnLpSEg2Ki5GZW3ZAp2fGK9f8iEMBkObjtI A784rbh5Zdb1R3CbMZr2gn4z2+F4iqs/B3zgPUJtzq5xDr2rsTzs+k2Sn49S7kEjjUlI /shcDaMltMxTtRhx3q8jtyAcOtl3TZWRlG2dDVXn6SzAuOlSkd6IHy/e2IxX+6lsewtk jov5+9zUPw5WgkfEKzByYoRLz2JwIRYBJUYeyTSN9DQ3SvGreYzpHxXGVYARg7/noQBK eOmeS9qKO6cjBQy7S4HM2SxsdBG4m1YHEIj1F52RmqHV581u+CqH5vrnFDKq4tIYd3r0 97pQ== 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:mime-version :content-transfer-encoding; bh=otw/LMNaCwhQgMmtphcj9FWjbVudliiaHCPb5fKJ7oY=; b=GIMv7/kZ36DiIAq7QjbJHDkvC/uiwk0wlJb+i+hGafxJJ9yxpf9Gf+J6tZE6R9vQtz LfSgKkZa1Xm5R76zkcpehq8oY2o37ZyLE2NL2rKHTaA4IO+V+9a3EBwThZoI6nXfXFx+ YECqzIfvAQa9eEdp1npxxXEzTafiLhARPMVkdB0uXfIP5tqOedMYHvi6c4hx48v45NTi PAMC5LVlvVfrKg57DjT4105xhW3azw/wXCyVct8sMXhOzmlN7lUlthxkmm8835Btxchk LKAOCDqbQTCnB3GYOEScuhjs8vnbTfRGTexmxZtYkCEo9CedOz76tJs79ms7DxEarwAS o/SQ== X-Gm-Message-State: APjAAAX5gfdEL+z4crGqWZVh9KEKgBAzj8MekLWDfqHxaWQ9mW4E1ziK 3tVq/P+t402cBcGMHR14b0P4K0BEt/o= X-Received: by 2002:a19:6d12:: with SMTP id i18mr2456723lfc.153.1573133278543; Thu, 07 Nov 2019 05:27:58 -0800 (PST) Received: from mimer.lan (h-137-65.A159.priv.bahnhof.se. [81.170.137.65]) by smtp.gmail.com with ESMTPSA id y20sm3151507ljd.99.2019.11.07.05.27.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Nov 2019 05:27:57 -0800 (PST) From: Jonas Bonn To: nicolas.dichtel@6wind.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Cc: davem@davemloft.net, Jonas Bonn Subject: [PATCH v3 0/6] Add namespace awareness to Netlink methods Date: Thu, 7 Nov 2019 14:27:49 +0100 Message-Id: <20191107132755.8517-1-jonas@norrbonn.se> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Changed in v3: - added patch 6 for setting IPv6 address outside current namespace - address checkpatch warnings - address comment from Nicolas Changed in v2: - address comment from Nicolas - add accumulated ACK's Currently, Netlink has partial support for acting outside of the current namespace. It appears that the intention was to extend this to all the methods eventually, but it hasn't been done to date. With this series RTM_SETLINK, RTM_NEWLINK, RTM_NEWADDR, and RTM_NEWNSID are extended to respect the selection of the namespace to work in. /Jonas Jonas Bonn (6): rtnetlink: allow RTM_SETLINK to reference other namespaces rtnetlink: skip namespace change if already effect rtnetlink: allow RTM_NEWLINK to act upon interfaces in arbitrary namespaces net: ipv4: allow setting address on interface outside current namespace net: namespace: allow setting NSIDs outside current namespace net: ipv6: allow setting address on interface outside current namespace net/core/net_namespace.c | 19 ++++++++++ net/core/rtnetlink.c | 80 ++++++++++++++++++++++++++++++++++------ net/ipv4/devinet.c | 61 ++++++++++++++++++++++-------- net/ipv6/addrconf.c | 13 +++++++ 4 files changed, 145 insertions(+), 28 deletions(-) -- 2.20.1