patch-1.3.86 linux/net/ipv4/ip_input.c
Next file: linux/net/ipv4/ip_masq.c
Previous file: linux/net/ipv4/ip_fw.c
Back to the patch index
Back to the overall index
- Lines: 16
- Date:
Tue Apr 9 14:36:31 1996
- Orig file:
v1.3.85/linux/net/ipv4/ip_input.c
- Orig date:
Mon Apr 8 19:01:47 1996
diff -u --recursive --new-file v1.3.85/linux/net/ipv4/ip_input.c linux/net/ipv4/ip_input.c
@@ -447,6 +447,15 @@
return 0;
skb->dev = dev;
iph=skb->h.iph;
+#ifdef CONFIG_IP_MASQUERADE
+ if (ip_fw_demasquerade(&skb,dev))
+ {
+ struct iphdr *iph=skb->h.iph;
+ if (ip_forward(skb, dev, IPFWD_MASQUERADED, iph->daddr))
+ kfree_skb(skb, FREE_WRITE);
+ return 0;
+ }
+#endif
}
/*
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this