• Pablo Neira Ayuso's avatar
    netfilter: conntrack: make conntrack userspace helpers work again · ee04805f
    Pablo Neira Ayuso authored
    Florian Westphal says:
    
    "Problem is that after the helper hook was merged back into the confirm
    one, the queueing itself occurs from the confirm hook, i.e. we queue
    from the last netfilter callback in the hook-list.
    
    Therefore, on return, the packet bypasses the confirm action and the
    connection is never committed to the main conntrack table.
    
    To fix this there are several ways:
    1. revert the 'Fixes' commit and have a extra helper hook again.
       Works, but has the drawback of adding another indirect call for
       everyone.
    
    2. Special case this: split the hooks only when userspace helper
       gets added, so queueing occurs at a lower priority again,
       and normal enqueue reinject would eventually call the last hook.
    
    3. Extend the existing nf_queue ct update hook to allow a forced
       confirmation (plus run the seqadj code).
    
    This goes for 3)."
    
    Fixes: 827318fe ("netfilter: conntrack: remove helper hook again")
    Reviewed-by: default avatarFlorian Westphal <fw@strlen.de>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    ee04805f
nf_conntrack_core.c 71.2 KB