summaryrefslogtreecommitdiff
path: root/dissector_netlink.c
AgeCommit message (Expand)AuthorFilesLines
2016-08-05netsniff-ng: Allow to compile without libnlVadim Kochan1-1/+1
2014-06-16dissector: Get rid of now unnecessary HAVE_DISSECTOR_PROTOSTobias Klauser1-5/+0
2014-05-28netsniff-ng: Add netlink dissectorTobias Klauser1-0/+33
next.git/patch/?id=d1a6cba576fc7c43e476538fe5aa72fe04bd80e1'>patch) treef587b5b46936d84c4bcd12ac4b314cbafaa6381b parent5210d393ef84e5d2a4854671a9af2d97fd1b8dd4 (diff)
netfilter: nft_chain_route: re-route before skb is queued to userspace
Imagine such situation, user add the following nft rules, and queue the packets to userspace for further check: # ip rule add fwmark 0x0/0x1 lookup eth0 # ip rule add fwmark 0x1/0x1 lookup eth1 # nft add table filter # nft add chain filter output {type route hook output priority 0 \;} # nft add rule filter output mark set 0x1 # nft add rule filter output queue num 0 But after we reinject the skbuff, the packet will be sent via the wrong route, i.e. in this case, the packet will be routed via eth0 table, not eth1 table. Because we skip to do re-route when verdict is NF_QUEUE, even if the mark was changed. Acctually, we should not touch sk_buff if verdict is NF_DROP or NF_STOLEN, and when re-route fails, return NF_DROP with error code. This is consistent with the mangle table in iptables. Signed-off-by: Liping Zhang <liping.zhang@spreadtrum.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat