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
From: Jonas Bonn <[email protected]>
Date: Thu, 7 Nov 2019 14:27:49 +0100
> 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.
This patch series does not apply cleanly to net-next, please respin.
I think v2 had this problem too.
On Thu, Nov 7, 2019 at 5:30 AM Jonas Bonn <[email protected]> wrote:
>
> 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.
>
This is nice, is there a plan to update userspace commands using this?
> /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
>
On 11/7/19 1:40 PM, Mahesh Bandewar (महेश बंडेवार) wrote:
> On Thu, Nov 7, 2019 at 5:30 AM Jonas Bonn <[email protected]> wrote:
>>
>> 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.
>>
> This is nice, is there a plan to update userspace commands using this?
I'm hoping for an iproute2 update and test cases to validate the changes.
On 07/11/2019 22:11, David Ahern wrote:
> On 11/7/19 1:40 PM, Mahesh Bandewar (महेश बंडेवार) wrote:
>> On Thu, Nov 7, 2019 at 5:30 AM Jonas Bonn <[email protected]> wrote:
>>>
>>> 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.
>>>
>> This is nice, is there a plan to update userspace commands using this?
>
> I'm hoping for an iproute2 update and test cases to validate the changes.
>
I'm looking into it. The change to iproute2 to support
(namespace,index) pairs instead of just (index) to identify interfaces
looks to be invasive. The rest of it looks like trivial changes.
I've got all these kernel patches tested against my own "namespace aware
network manager" that I'm writing for a customer with a particular use
case. iproute2 wasn't actually in play here.
/Jonas
On Fri, Nov 8, 2019 at 7:36 AM Jonas Bonn <[email protected]> wrote:
>
>
>
> On 07/11/2019 22:11, David Ahern wrote:
> > On 11/7/19 1:40 PM, Mahesh Bandewar (महेश बंडेवार) wrote:
> >> On Thu, Nov 7, 2019 at 5:30 AM Jonas Bonn <[email protected]> wrote:
> >>>
> >>> 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.
> >>>
> >> This is nice, is there a plan to update userspace commands using this?
> >
> > I'm hoping for an iproute2 update and test cases to validate the changes.
> >
>
> I'm looking into it. The change to iproute2 to support
> (namespace,index) pairs instead of just (index) to identify interfaces
> looks to be invasive. The rest of it looks like trivial changes.
>
> I've got all these kernel patches tested against my own "namespace aware
> network manager" that I'm writing for a customer with a particular use
> case. iproute2 wasn't actually in play here.
>
I'll echo David's comment for iproute2 as well as tests to ensure this
new behavior is usable and healthy.
> /Jonas