Signed-off-by: Vasily Averin <vvs@xxxxxxxxxx> --- include/net/netfilter/ipv4/nf_defrag_ipv4.h | 13 +++++++++++++ 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/include/net/netfilter/ipv4/nf_defrag_ipv4.h b/include/net/netfilter/ipv4/nf_defrag_ipv4.h index f01ef20..2a433ba 100644 --- a/include/net/netfilter/ipv4/nf_defrag_ipv4.h +++ b/include/net/netfilter/ipv4/nf_defrag_ipv4.h @@ -3,4 +3,17 @@ void nf_defrag_ipv4_enable(void); +static inline void inc_br_defrag_ipv4_users_count(struct net *net) +{ + if (atomic_inc_return(&net->br_defrag_ipv4_users_count) == 1) + pr_info("net %p: bridge ipv4 defragmentation is enabled\n", + net); +} + +static inline void dec_br_defrag_ipv4_users_count(struct net *net) +{ + if (atomic_dec_and_test(&net->br_defrag_ipv4_users_count)) + pr_info("net %p: bridge ipv4 defragmentation is disabled\n", + net); +} #endif /* _NF_DEFRAG_IPV4_H */ -- 1.7.5.4 -- To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html