]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: nft_fib: Fix existence check support
authorPhil Sutter <phil@nwl.cc>
Wed, 15 May 2019 18:15:32 +0000 (20:15 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 21 May 2019 14:10:38 +0000 (16:10 +0200)
commit5d056e899a5d3e4a727f5acaa00a5d34683f2698
tree20b9a690f78aad5c43b12e7569cf3e0e26a44169
parent991c76be3561d6bc568a9d29458d000d32b45ff8
netfilter: nft_fib: Fix existence check support

NFTA_FIB_F_PRESENT flag was not always honored since eval functions did
not call nft_fib_store_result in all cases.

Given that in all callsites there is a struct net_device pointer
available which holds the interface data to be stored in destination
register, simplify nft_fib_store_result() to just accept that pointer
instead of the nft_pktinfo pointer and interface index. This also
allows to drop the index to interface lookup previously needed to get
the name associated with given index.

Fixes: 357ab3fffc0b3 ("netfilter: nft_fib: Support existence check")
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/net/netfilter/nft_fib.h
net/ipv4/netfilter/nft_fib_ipv4.c
net/ipv6/netfilter/nft_fib_ipv6.c
net/netfilter/nft_fib.c