]> git.karo-electronics.de Git - karo-tx-linux.git/commit
netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails
authorPablo Neira Ayuso <pablo@netfilter.org>
Wed, 23 Mar 2016 11:58:01 +0000 (12:58 +0100)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 28 Mar 2016 15:59:20 +0000 (17:59 +0200)
commit931401137f60fc299256bbc221c0b756be31c32c
tree38569c3447dc6cd3b7557ef9d105ef03f42ec779
parent54d83fc74aa9ec72794373cb47432c5f7fb1a309
netfilter: nfnetlink_queue: honor NFQA_CFG_F_FAIL_OPEN when netlink unicast fails

When netlink unicast fails to deliver the message to userspace, we
should also check if the NFQA_CFG_F_FAIL_OPEN flag is set so we reinject
the packet back to the stack.

I think the user expects no packet drops when this flag is set due to
queueing to userspace errors, no matter if related to the internal queue
or when sending the netlink message to userspace.

The userspace application will still get the ENOBUFS error via recvmsg()
so the user still knows that, with the current configuration that is in
place, the userspace application is not consuming the messages at the
pace that the kernel needs.

Reported-by: "Yigal Reiss (yreiss)" <yreiss@cisco.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Tested-by: "Yigal Reiss (yreiss)" <yreiss@cisco.com>
net/netfilter/nfnetlink_queue.c