Skip to contentSkip to conversation

ip_nat_core.c - fix compiler warning

PATCH New [email protected] 1 participant 1 message Jun 9, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ip_nat_core.c - fix compiler warning

If netfilter is build w/o CONFIG_IP_NF_NAT_LOCAL, gcc will complain that do_extra_mangle() is not used. So only compile the function when IP_NF_NAT_LOCAL is defined. Patch is against 2.4.19-pre10.

Rob.

net/ipv4/netfilter/ip_nat_core.c +2 -0
@@ -198,6 +198,7 @@
 		return NULL;
 }
 
+#ifdef CONFIG_IP_NF_NAT_LOCAL
 /* If it's really a local destination manip, it may need to do a
    source manip too. */
 static int
@@ -216,6 +217,7 @@
 	ip_rt_put(rt);
 	return 1;
 }
+#endif
 
 /* Simple way to iterate through all. */
 static inline int fake_cmp(const struct ip_nat_hash *i,