• Pablo Neira Ayuso's avatar
    netfilter: nf_ct_helper: bail out on duplicated helpers · 893e093c
    Pablo Neira Ayuso authored
    Don't allow registration of helpers using the same tuple:
    
    	{ l3proto, l4proto, src-port }
    
    We lookup for the helper from the packet path using this tuple through
    __nf_ct_helper_find(). Therefore, we have to avoid having two helpers
    with the same tuple to ensure predictible behaviour.
    
    Don't compare the helper string names anymore since it is valid to
    register two helpers with the same name, but using different tuples.
    This is also implicitly fixing up duplicated helper registration via
    ports= modparam since the name comparison was defeating the tuple
    duplication validation.
    Reported-by: default avatarFeng Gao <gfree.wind@gmail.com>
    Reported-by: default avatarTaehee Yoo <ap420073@gmail.com>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    893e093c
nf_conntrack_helper.c 13 KB