summaryrefslogtreecommitdiff
path: root/net/netfilter/nft_set_bitmap.c
diff options
context:
space:
mode:
authorLiping Zhang <zlpnobody@gmail.com>2017-04-15 14:27:42 +0300
committerPablo Neira Ayuso <pablo@netfilter.org>2017-04-24 21:05:05 +0300
commit66e5a6b18bd09d0431e97cd3c162e76c5c2aebba (patch)
tree714658b27589cc748808483734f81aa792964dd6 /net/netfilter/nft_set_bitmap.c
parentcf5d70918877c6a6655dc1e92e2ebb661ce904fd (diff)
downloadlinux-66e5a6b18bd09d0431e97cd3c162e76c5c2aebba.tar.xz
netfilter: nf_ct_helper: permit cthelpers with different names via nfnetlink
cthelpers added via nfnetlink may have the same tuple, i.e. except for the l3proto and l4proto, other fields are all zero. So even with the different names, we will also fail to add them: # nfct helper add ssdp inet udp # nfct helper add tftp inet udp nfct v1.4.3: netlink error: File exists So in order to avoid unpredictable behaviour, we should: 1. cthelpers can be selected by nft ct helper obj or xt_CT target, so report error if duplicated { name, l3proto, l4proto } tuple exist. 2. cthelpers can be selected by nf_ct_tuple_src_mask_cmp when nf_ct_auto_assign_helper is enabled, so also report error if duplicated { l3proto, l4proto, src-port } tuple exist. Also note, if the cthelper is added from userspace, then the src-port will always be zero, it's invalid for nf_ct_auto_assign_helper, so there's no need to check the second point listed above. Fixes: 893e093c786c ("netfilter: nf_ct_helper: bail out on duplicated helpers") Signed-off-by: Liping Zhang <zlpnobody@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'net/netfilter/nft_set_bitmap.c')
0 files changed, 0 insertions, 0 deletions