diff options
Diffstat (limited to 'net/ipv4/ip_forward.c')
-rw-r--r-- | net/ipv4/ip_forward.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/net/ipv4/ip_forward.c b/net/ipv4/ip_forward.c index a22d11d2911c..c3ea0cd2e584 100644 --- a/net/ipv4/ip_forward.c +++ b/net/ipv4/ip_forward.c | |||
@@ -4,15 +4,15 @@ | |||
4 | * interface as the means of communication with the user level. | 4 | * interface as the means of communication with the user level. |
5 | * | 5 | * |
6 | * The IP forwarding functionality. | 6 | * The IP forwarding functionality. |
7 | * | 7 | * |
8 | * Version: $Id: ip_forward.c,v 1.48 2000/12/13 18:31:48 davem Exp $ | 8 | * Version: $Id: ip_forward.c,v 1.48 2000/12/13 18:31:48 davem Exp $ |
9 | * | 9 | * |
10 | * Authors: see ip.c | 10 | * Authors: see ip.c |
11 | * | 11 | * |
12 | * Fixes: | 12 | * Fixes: |
13 | * Many : Split from ip.c , see ip_input.c for | 13 | * Many : Split from ip.c , see ip_input.c for |
14 | * history. | 14 | * history. |
15 | * Dave Gregorich : NULL ip_rt_put fix for multicast | 15 | * Dave Gregorich : NULL ip_rt_put fix for multicast |
16 | * routing. | 16 | * routing. |
17 | * Jos Vos : Add call_out_firewall before sending, | 17 | * Jos Vos : Add call_out_firewall before sending, |
18 | * use output device for accounting. | 18 | * use output device for accounting. |
@@ -69,14 +69,14 @@ int ip_forward(struct sk_buff *skb) | |||
69 | goto drop; | 69 | goto drop; |
70 | 70 | ||
71 | skb->ip_summed = CHECKSUM_NONE; | 71 | skb->ip_summed = CHECKSUM_NONE; |
72 | 72 | ||
73 | /* | 73 | /* |
74 | * According to the RFC, we must first decrease the TTL field. If | 74 | * According to the RFC, we must first decrease the TTL field. If |
75 | * that reaches zero, we must reply an ICMP control message telling | 75 | * that reaches zero, we must reply an ICMP control message telling |
76 | * that the packet's lifetime expired. | 76 | * that the packet's lifetime expired. |
77 | */ | 77 | */ |
78 | if (skb->nh.iph->ttl <= 1) | 78 | if (skb->nh.iph->ttl <= 1) |
79 | goto too_many_hops; | 79 | goto too_many_hops; |
80 | 80 | ||
81 | if (!xfrm4_route_forward(skb)) | 81 | if (!xfrm4_route_forward(skb)) |
82 | goto drop; | 82 | goto drop; |
@@ -107,16 +107,16 @@ int ip_forward(struct sk_buff *skb) | |||
107 | ip_forward_finish); | 107 | ip_forward_finish); |
108 | 108 | ||
109 | sr_failed: | 109 | sr_failed: |
110 | /* | 110 | /* |
111 | * Strict routing permits no gatewaying | 111 | * Strict routing permits no gatewaying |
112 | */ | 112 | */ |
113 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_SR_FAILED, 0); | 113 | icmp_send(skb, ICMP_DEST_UNREACH, ICMP_SR_FAILED, 0); |
114 | goto drop; | 114 | goto drop; |
115 | 115 | ||
116 | too_many_hops: | 116 | too_many_hops: |
117 | /* Tell the sender its packet died... */ | 117 | /* Tell the sender its packet died... */ |
118 | IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); | 118 | IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); |
119 | icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0); | 119 | icmp_send(skb, ICMP_TIME_EXCEEDED, ICMP_EXC_TTL, 0); |
120 | drop: | 120 | drop: |
121 | kfree_skb(skb); | 121 | kfree_skb(skb); |
122 | return NET_RX_DROP; | 122 | return NET_RX_DROP; |