• Kevin Cernekee's avatar
    netfilter: ctnetlink: Fix regression in CTA_STATUS processing · a963d710
    Kevin Cernekee authored
    The libnetfilter_conntrack userland library always sets IPS_CONFIRMED
    when building a CTA_STATUS attribute.  If this toggles the bit from
    0->1, the parser will return an error.  On Linux 4.4+ this will cause any
    NFQA_EXP attribute in the packet to be ignored.  This breaks conntrackd's
    userland helpers because they operate on unconfirmed connections.
    
    Instead of returning -EBUSY if the user program asks to modify an
    unchangeable bit, simply ignore the change.
    
    Also, fix the logic so that user programs are allowed to clear
    the bits that they are allowed to change.
    Signed-off-by: default avatarKevin Cernekee <cernekee@chromium.org>
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    a963d710
nf_conntrack_netlink.c 83.2 KB