Re: [PATCH net] netlink: don't send unknown nsid

2017-06-09 Thread Flavio Leitner
On Thu, Jun 08, 2017 at 10:31:53AM +0200, Nicolas Dichtel wrote: > Le 07/06/2017 à 21:14, Flavio Leitner a écrit : > > Let's say the app is restarted, or another monitoring app is executed > > with enough perms. How will it identify the error condition? > Your app wants to monitor a subset of

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-08 Thread Nicolas Dichtel
Le 07/06/2017 à 21:14, Flavio Leitner a écrit : > On Mon, Jun 05, 2017 at 10:40:24AM +0200, Nicolas Dichtel wrote: >>> Let me ask this instead: How do you think userspace should behave when >>> netnsid allocation fails? >>> >> There is two ways to assign a nsid: >> - manually with netlink ('ip

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-07 Thread Flavio Leitner
On Mon, Jun 05, 2017 at 10:40:24AM +0200, Nicolas Dichtel wrote: > > Let me ask this instead: How do you think userspace should behave when > > netnsid allocation fails? > > > There is two ways to assign a nsid: > - manually with netlink ('ip netns set'). In this case, the error is reported >

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-05 Thread Nicolas Dichtel
Le 02/06/2017 à 00:44, Flavio Leitner a écrit : > On Thu, Jun 01, 2017 at 10:42:13PM +0200, Nicolas Dichtel wrote: >> Le 01/06/2017 à 19:02, Flavio Leitner a écrit : [snip] >>> On the other hand, with the original patch, if the socket and the >>> device are in the same netns, we don't need to

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-01 Thread Flavio Leitner
On Thu, Jun 01, 2017 at 10:42:13PM +0200, Nicolas Dichtel wrote: > Le 01/06/2017 à 19:02, Flavio Leitner a écrit : > > On Thu, Jun 01, 2017 at 10:00:07AM +0200, Nicolas Dichtel wrote: > >> The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a > >> nsid assigned into the netns

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-01 Thread Nicolas Dichtel
Le 01/06/2017 à 19:02, Flavio Leitner a écrit : > On Thu, Jun 01, 2017 at 10:00:07AM +0200, Nicolas Dichtel wrote: >> The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a >> nsid assigned into the netns where the netlink socket is opened. >> The nsid is sent as metadata to

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-01 Thread Flavio Leitner
On Thu, Jun 01, 2017 at 10:00:07AM +0200, Nicolas Dichtel wrote: > The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a > nsid assigned into the netns where the netlink socket is opened. > The nsid is sent as metadata to userland, but the existence of this nsid is > checked

Re: [PATCH net] netlink: don't send unknown nsid

2017-06-01 Thread David Miller
From: Nicolas Dichtel Date: Thu, 1 Jun 2017 10:00:07 +0200 > The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a > nsid assigned into the netns where the netlink socket is opened. > The nsid is sent as metadata to userland, but the existence of

[PATCH net] netlink: don't send unknown nsid

2017-06-01 Thread Nicolas Dichtel
The NETLINK_F_LISTEN_ALL_NSID otion enables to listen all netns that have a nsid assigned into the netns where the netlink socket is opened. The nsid is sent as metadata to userland, but the existence of this nsid is checked only for netns that are different from the socket netns. Thus, if no nsid