Netfilter: Fixes for NATTYPE module compilation
These changes allow for proper compilation of
NATTYPE module.
Acked-by: Vinisha Varre <vvarre@qti.qualcomm.com>
Signed-off-by: Justin Tee <justint@codeaurora.org>
Change-Id: I0d172ea7ce3280716653cfa551d27639e0032f08
diff --git a/net/ipv4/netfilter/ipt_NATTYPE.c b/net/ipv4/netfilter/ipt_NATTYPE.c
index bed569f8..34dc925 100644
--- a/net/ipv4/netfilter/ipt_NATTYPE.c
+++ b/net/ipv4/netfilter/ipt_NATTYPE.c
@@ -98,7 +98,8 @@
/* 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 @@
* 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 @@
* found the entry.
*/
if (!nattype_refresh_timer((unsigned long)nte,
- ct->timeout.expires))
+ ct->timeout))
break;
/* netfilter NATTYPE
@@ -473,8 +474,8 @@
/* 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;
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 255a797..f0fe6ee 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -1508,7 +1508,7 @@
#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:
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c
index 1ce25f5..3c37253 100644
--- a/net/netfilter/nf_conntrack_netlink.c
+++ b/net/netfilter/nf_conntrack_netlink.c
@@ -1555,7 +1555,7 @@
#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;
}