• Pablo Neira Ayuso's avatar
    netfilter: nf_tables: honor NLM_F_EXCL flag in set element insertion · c016c7e4
    Pablo Neira Ayuso authored
    If the NLM_F_EXCL flag is set, then new elements that clash with an
    existing one return EEXIST. In case you try to add an element whose
    data area differs from what we have, then this returns EBUSY. If no
    flag is specified at all, then this returns success to userspace.
    
    This patch also update the set insert operation so we can fetch the
    existing element that clashes with the one you want to add, we need
    this to make sure the element data doesn't differ.
    Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
    c016c7e4
nft_set_hash.c 9.46 KB