]> git.baikalelectronics.ru Git - kernel.git/commit
netlink: don't send unknown nsid
authorNicolas Dichtel <nicolas.dichtel@6wind.com>
Thu, 1 Jun 2017 08:00:07 +0000 (10:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 15:49:39 +0000 (11:49 -0400)
commitdf74c5f784162c1a40d3797515990c5d003115f7
tree26a869f3de07346f8b17219b4da34dbfedb8324f
parent90ca33c0a374e374426ae8a52f1d5c009c18aced
netlink: don't send unknown nsid

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 is assigned to the socket netns, NETNSA_NSID_NOT_ASSIGNED is
reported to the userland. This value is confusing and useless.
After this patch, only valid nsid are sent to userland.

Reported-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c