summaryrefslogtreecommitdiff
path: root/pfinet/linux-src/net/ipv4/ip_forward.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2000-02-05 12:21:17 +0000
committerRoland McGrath <roland@gnu.org>2000-02-05 12:21:17 +0000
commit11282e4f068cacd7d08e61c5372b560f4656df87 (patch)
tree7330691c769e4cddf13fb86e58b80b61cd71ce2a /pfinet/linux-src/net/ipv4/ip_forward.c
parenta60df9686250648ac13f559e98ebdc1422146494 (diff)
parente5f75e8ece5d1a8d3c17bd0156082caf153d3779 (diff)
Merge from vendor branch Linux:
Import of Linux 2.2.14 subset (ipv4 stack and related)
Diffstat (limited to 'pfinet/linux-src/net/ipv4/ip_forward.c')
-rw-r--r--pfinet/linux-src/net/ipv4/ip_forward.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/pfinet/linux-src/net/ipv4/ip_forward.c b/pfinet/linux-src/net/ipv4/ip_forward.c
index 08ebbc2f..fd8c0435 100644
--- a/pfinet/linux-src/net/ipv4/ip_forward.c
+++ b/pfinet/linux-src/net/ipv4/ip_forward.c
@@ -5,11 +5,12 @@
*
* The IP forwarding functionality.
*
- * Version: $Id: ip_forward.c,v 1.43 1999/03/21 05:22:37 davem Exp $
+ * Version: $Id: ip_forward.c,v 1.43.2.1 1999/11/16 06:33:43 davem Exp $
*
* Authors: see ip.c
*
* Fixes:
+ * Joseph Gooch : Removed maddr selection for ip_masq, now done in ip_masq.c
* Many : Split from ip.c , see ip_input.c for
* history.
* Dave Gregorich : NULL ip_rt_put fix for multicast
@@ -168,7 +169,6 @@ int ip_forward(struct sk_buff *skb)
* and skip the firewall checks
*/
if (iph->protocol == IPPROTO_ICMP) {
- __u32 maddr;
#ifdef CONFIG_IP_MASQUERADE_ICMP
struct icmphdr *icmph = (struct icmphdr *)((char*)iph + (iph->ihl << 2));
if ((icmph->type==ICMP_DEST_UNREACH)||
@@ -176,8 +176,7 @@ int ip_forward(struct sk_buff *skb)
(icmph->type==ICMP_TIME_EXCEEDED))
{
#endif
- maddr = inet_select_addr(dev2, rt->rt_gateway, RT_SCOPE_UNIVERSE);
- fw_res = ip_fw_masq_icmp(&skb, maddr);
+ fw_res = ip_fw_masquerade(&skb, 0);
if (fw_res < 0) {
kfree_skb(skb);
return -1;
@@ -187,7 +186,7 @@ int ip_forward(struct sk_buff *skb)
/* ICMP matched - skip firewall */
goto skip_call_fw_firewall;
#ifdef CONFIG_IP_MASQUERADE_ICMP
- }
+ }
#endif
}
if (rt->rt_flags&RTCF_MASQ)
@@ -219,15 +218,11 @@ skip_call_fw_firewall:
*/
if (!(IPCB(skb)->flags&IPSKB_MASQUERADED) &&
(fw_res==FW_MASQUERADE || rt->rt_flags&RTCF_MASQ)) {
- u32 maddr;
+ u32 maddr = 0;
#ifdef CONFIG_IP_ROUTE_NAT
maddr = (rt->rt_flags&RTCF_MASQ) ? rt->rt_src_map : 0;
-
- if (maddr == 0)
#endif
- maddr = inet_select_addr(dev2, rt->rt_gateway, RT_SCOPE_UNIVERSE);
-
if (ip_fw_masquerade(&skb, maddr) < 0) {
kfree_skb(skb);
return -1;