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

Commit d3083bdd authored by Justin Tee's avatar Justin Tee Committed by Gerrit - the friendly Code Review server
Browse files

Netfilter: Fixes for NATTYPE module compilation



These changes allow for proper compilation of
NATTYPE module.

Acked-by: default avatarVinisha Varre <vvarre@qti.qualcomm.com>
Signed-off-by: default avatarJustin Tee <justint@codeaurora.org>
Change-Id: I0d172ea7ce3280716653cfa551d27639e0032f08
parent 7e3149cb
Loading
Loading
Loading
Loading
+6 −5
Original line number Diff line number Diff line
@@ -98,7 +98,8 @@ static void nattype_free(struct ipt_nattype *nte)
/* netfilter NATTYPE nattype_refresh_timer()
 * Refresh the timer for this object.
 */
bool nattype_refresh_timer(unsigned long nat_type, unsigned long timeout_value)
bool nattype_refresh_timer_impl(unsigned long nat_type,
				unsigned long timeout_value)
{
	struct ipt_nattype *nte = (struct ipt_nattype *)nat_type;

@@ -154,7 +155,7 @@ static bool nattype_packet_in_match(const struct ipt_nattype *nte,
	 * further.
	 */
	if (nte->proto != iph->protocol) {
		DEBUGP("nattype_packet_in_match: protocol failed: nte proto:"
		DEBUGP("nattype_packet_in_match: protocol failed: nte proto:");
		DEBUGP(" %d, packet proto: %d\n",
		       nte->proto, iph->protocol);
		return false;
@@ -375,7 +376,7 @@ static unsigned int nattype_forward(struct sk_buff *skb,
			 * found the entry.
			 */
			if (!nattype_refresh_timer((unsigned long)nte,
						   ct->timeout.expires))
						   ct->timeout))
				break;

			/* netfilter NATTYPE
@@ -473,8 +474,8 @@ static unsigned int nattype_forward(struct sk_buff *skb,
	/* netfilter NATTYPE
	 * Add the new entry to the list.
	 */
	nte->timeout_value = ct->timeout.expires;
	nte->timeout.expires = ct->timeout.expires + jiffies;
	nte->timeout_value = ct->timeout;
	nte->timeout.expires = ct->timeout + jiffies;
	add_timer(&nte->timeout);
	list_add(&nte->list, &nattype_list);
	ct->nattype_entry = (unsigned long)nte;
+1 −1
Original line number Diff line number Diff line
@@ -1508,7 +1508,7 @@ void __nf_ct_refresh_acct(struct nf_conn *ct,
#if defined(CONFIG_IP_NF_TARGET_NATTYPE_MODULE)
	nattype_ref_timer = rcu_dereference(nattype_refresh_timer);
	if (nattype_ref_timer)
		nattype_ref_timer(ct->nattype_entry, ct->timeout.expires);
		nattype_ref_timer(ct->nattype_entry, ct->timeout);
#endif

acct:
+1 −1
Original line number Diff line number Diff line
@@ -1555,7 +1555,7 @@ static int ctnetlink_change_timeout(struct nf_conn *ct,
#if defined(CONFIG_IP_NF_TARGET_NATTYPE_MODULE)
	nattype_ref_timer = rcu_dereference(nattype_refresh_timer);
	if (nattype_ref_timer)
		nattype_ref_timer(ct->nattype_entry, ct->timeout.expires);
		nattype_ref_timer(ct->nattype_entry, ct->timeout);
#endif
	return 0;
}