patch-2.0.23 linux/net/ipv4/ip_forward.c

Next file: linux/net/ipv4/tcp.c
Previous file: linux/net/ipv4/af_inet.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.0.22/linux/net/ipv4/ip_forward.c linux/net/ipv4/ip_forward.c
@@ -264,8 +264,12 @@
 		if (iph->protocol == IPPROTO_ICMP)
 		{
 			if ((fw_res = ip_fw_masq_icmp(&skb, dev2)) < 0)
+			{
+				if (rt)
+					ip_rt_put(rt);
 				/* Problem - ie bad checksum */
 				return -1;
+			}
 
 			if (fw_res)
 				/* ICMP matched - skip firewall */

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov