Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0df7be2a authored by Sridhar Ancha's avatar Sridhar Ancha
Browse files

net: netfilter: support for multiple MASQUERADE



This change allow support for same multiple MASQUERADE rule.
without this change if we add multiple MASQUERADE rule then BUG_ON
was causing kernel panic. Replaced BUG_ON to WARN_ON_ONCE to give
only one time warning

Change-Id: I25852e60a5ea2962b5d98c3150eace00db554651
Signed-off-by: default avatarSridhar Ancha <sancha@codeaurora.org>
parent cc957303
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -388,7 +388,14 @@ nf_nat_setup_info(struct nf_conn *ct,

	NF_CT_ASSERT(maniptype == NF_NAT_MANIP_SRC ||
		     maniptype == NF_NAT_MANIP_DST);
#if defined(CONFIG_IP_NF_TARGET_NATTYPE_MODULE)
	if (nf_nat_initialized(ct, maniptype)) {
		WARN_ON_ONCE(1);
		return NF_ACCEPT;
	}
#else
	BUG_ON(nf_nat_initialized(ct, maniptype));
#endif

	/* What we've got will look like inverse of reply. Normally
	 * this is what is in the conntrack, except for prior