• Joe Perches's avatar
    netfilter: Convert FWINV<[foo]> macros and uses to NF_INVF · c37a2dfa
    Joe Perches authored
    netfilter uses multiple FWINV #defines with identical form that hide a
    specific structure variable and dereference it with a invflags member.
    $ git grep "#define FWINV"
    include/linux/netfilter_bridge/ebtables.h:#define FWINV(bool,invflg) ((bool) ^ !!(info->invflags & invflg))
    net/bridge/netfilter/ebtables.c:#define FWINV2(bool, invflg) ((bool) ^ !!(e->invflags & invflg))
    net/ipv4/netfilter/arp_tables.c:#define FWINV(bool, invflg) ((bool) ^ !!(arpinfo->invflags & (invflg)))
    net/ipv4/netfilter/ip_tables.c:#define FWINV(bool, invflg) ((bool) ^ !!(ipinfo->invflags & (invflg)))
    net/ipv6/netfilter/ip6_tables.c:#define FWINV(bool, invflg) ((bool) ^ !!(ip6info->invflags & (invflg)))
    net/netfilter/xt_tcpudp.c:#define FWINVTCP(bool, invflg) ((bool) ^ !!(tcpinfo->invflags & (invflg)))
    Consolidate these macros into a single NF_INVF macro.
    o Neaten the alignment around these uses
    o A few lines are > 80 columns for intelligibility
    Signed-off-by: 's avatarJoe Perches <joe@perches.com>
    Signed-off-by: 's avatarPablo Neira Ayuso <pablo@netfilter.org>
Last commit
Last update
ebt_802_3.h Loading commit data...
ebtables.h Loading commit data...