diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 14:38:13 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-11 14:38:13 -0500 |
commit | cb18eccff48ef3986d1072964590bce6fec705fb (patch) | |
tree | 777fb1d15e0281341e1e02c9803d989538d346f2 /net/ipv4/ip_forward.c | |
parent | c827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff) | |
parent | 5ef213f6842277ee1df5659f59fac0ffc9beb411 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (45 commits)
[IPV4]: Restore multipath routing after rt_next changes.
[XFRM] IPV6: Fix outbound RO transformation which is broken by IPsec tunnel patch.
[NET]: Reorder fields of struct dst_entry
[DECNET]: Convert decnet route to use the new dst_entry 'next' pointer
[IPV6]: Convert ipv6 route to use the new dst_entry 'next' pointer
[IPV4]: Convert ipv4 route to use the new dst_entry 'next' pointer
[NET]: Introduce union in struct dst_entry to hold 'next' pointer
[DECNET]: fix misannotation of linkinfo_dn
[DECNET]: FRA_{DST,SRC} are le16 for decnet
[UDP]: UDP can use sk_hash to speedup lookups
[NET]: Fix whitespace errors.
[NET] XFRM: Fix whitespace errors.
[NET] X25: Fix whitespace errors.
[NET] WANROUTER: Fix whitespace errors.
[NET] UNIX: Fix whitespace errors.
[NET] TIPC: Fix whitespace errors.
[NET] SUNRPC: Fix whitespace errors.
[NET] SCTP: Fix whitespace errors.
[NET] SCHED: Fix whitespace errors.
[NET] RXRPC: Fix whitespace errors.
...
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; |