netlink: only do not deliver to tap when both sides are kernel sks
authorDaniel Borkmann <dborkman@redhat.com>
Mon, 23 Dec 2013 13:35:55 +0000 (14:35 +0100)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Dec 2013 19:31:43 +0000 (14:31 -0500)
commit73bfd370c878d3feb3c3111cc17af066dc1f455b
tree960d9bac33fcc8406831ba09e0c662fa65ef1114
parent89ba52bd933898e8da78d4a3469dc23cb8acbecd
netlink: only do not deliver to tap when both sides are kernel sks

We should also deliver packets to nlmon devices when we are in
netlink_unicast_kernel(), and only one of the {src,dst} sockets
is user sk and the other one kernel sk. That's e.g. the case in
netlink diag, netlink route, etc. Still, forbid to deliver messages
from kernel to kernel sks.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: Jakub Zawadzki <darkjames-ws@darkjames.pl>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/netlink/af_netlink.c