diff options
Diffstat (limited to 'net/ipv4/ip_input.c')
-rw-r--r-- | net/ipv4/ip_input.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/net/ipv4/ip_input.c b/net/ipv4/ip_input.c index 212734ca238f..f38e97647ac0 100644 --- a/net/ipv4/ip_input.c +++ b/net/ipv4/ip_input.c | |||
@@ -15,7 +15,7 @@ | |||
15 | * Stefan Becker, <stefanb@yello.ping.de> | 15 | * Stefan Becker, <stefanb@yello.ping.de> |
16 | * Jorge Cwik, <jorge@laser.satlink.net> | 16 | * Jorge Cwik, <jorge@laser.satlink.net> |
17 | * Arnt Gulbrandsen, <agulbra@nvg.unit.no> | 17 | * Arnt Gulbrandsen, <agulbra@nvg.unit.no> |
18 | * | 18 | * |
19 | * | 19 | * |
20 | * Fixes: | 20 | * Fixes: |
21 | * Alan Cox : Commented a couple of minor bits of surplus code | 21 | * Alan Cox : Commented a couple of minor bits of surplus code |
@@ -98,13 +98,13 @@ | |||
98 | * Jos Vos : Do accounting *before* call_in_firewall | 98 | * Jos Vos : Do accounting *before* call_in_firewall |
99 | * Willy Konynenberg : Transparent proxying support | 99 | * Willy Konynenberg : Transparent proxying support |
100 | * | 100 | * |
101 | * | 101 | * |
102 | * | 102 | * |
103 | * To Fix: | 103 | * To Fix: |
104 | * IP fragmentation wants rewriting cleanly. The RFC815 algorithm is much more efficient | 104 | * IP fragmentation wants rewriting cleanly. The RFC815 algorithm is much more efficient |
105 | * and could be made very efficient with the addition of some virtual memory hacks to permit | 105 | * and could be made very efficient with the addition of some virtual memory hacks to permit |
106 | * the allocation of a buffer that can then be 'grown' by twiddling page tables. | 106 | * the allocation of a buffer that can then be 'grown' by twiddling page tables. |
107 | * Output fragmentation wants updating along with the buffer management to use a single | 107 | * Output fragmentation wants updating along with the buffer management to use a single |
108 | * interleaved copy algorithm so that fragmenting has a one copy overhead. Actual packet | 108 | * interleaved copy algorithm so that fragmenting has a one copy overhead. Actual packet |
109 | * output should probably do its own fragmentation at the UDP/RAW layer. TCP shouldn't cause | 109 | * output should probably do its own fragmentation at the UDP/RAW layer. TCP shouldn't cause |
110 | * fragmentation anyway. | 110 | * fragmentation anyway. |
@@ -154,7 +154,7 @@ DEFINE_SNMP_STAT(struct ipstats_mib, ip_statistics) __read_mostly; | |||
154 | 154 | ||
155 | /* | 155 | /* |
156 | * Process Router Attention IP option | 156 | * Process Router Attention IP option |
157 | */ | 157 | */ |
158 | int ip_call_ra_chain(struct sk_buff *skb) | 158 | int ip_call_ra_chain(struct sk_buff *skb) |
159 | { | 159 | { |
160 | struct ip_ra_chain *ra; | 160 | struct ip_ra_chain *ra; |
@@ -202,8 +202,8 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb) | |||
202 | 202 | ||
203 | __skb_pull(skb, ihl); | 203 | __skb_pull(skb, ihl); |
204 | 204 | ||
205 | /* Point into the IP datagram, just past the header. */ | 205 | /* Point into the IP datagram, just past the header. */ |
206 | skb->h.raw = skb->data; | 206 | skb->h.raw = skb->data; |
207 | 207 | ||
208 | rcu_read_lock(); | 208 | rcu_read_lock(); |
209 | { | 209 | { |
@@ -259,7 +259,7 @@ static inline int ip_local_deliver_finish(struct sk_buff *skb) | |||
259 | 259 | ||
260 | /* | 260 | /* |
261 | * Deliver IP Packets to the higher protocol layers. | 261 | * Deliver IP Packets to the higher protocol layers. |
262 | */ | 262 | */ |
263 | int ip_local_deliver(struct sk_buff *skb) | 263 | int ip_local_deliver(struct sk_buff *skb) |
264 | { | 264 | { |
265 | /* | 265 | /* |
@@ -335,14 +335,14 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
335 | /* | 335 | /* |
336 | * Initialise the virtual path cache for the packet. It describes | 336 | * Initialise the virtual path cache for the packet. It describes |
337 | * how the packet travels inside Linux networking. | 337 | * how the packet travels inside Linux networking. |
338 | */ | 338 | */ |
339 | if (skb->dst == NULL) { | 339 | if (skb->dst == NULL) { |
340 | int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, | 340 | int err = ip_route_input(skb, iph->daddr, iph->saddr, iph->tos, |
341 | skb->dev); | 341 | skb->dev); |
342 | if (unlikely(err)) { | 342 | if (unlikely(err)) { |
343 | if (err == -EHOSTUNREACH) | 343 | if (err == -EHOSTUNREACH) |
344 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); | 344 | IP_INC_STATS_BH(IPSTATS_MIB_INADDRERRORS); |
345 | goto drop; | 345 | goto drop; |
346 | } | 346 | } |
347 | } | 347 | } |
348 | 348 | ||
@@ -363,13 +363,13 @@ static inline int ip_rcv_finish(struct sk_buff *skb) | |||
363 | return dst_input(skb); | 363 | return dst_input(skb); |
364 | 364 | ||
365 | drop: | 365 | drop: |
366 | kfree_skb(skb); | 366 | kfree_skb(skb); |
367 | return NET_RX_DROP; | 367 | return NET_RX_DROP; |
368 | } | 368 | } |
369 | 369 | ||
370 | /* | 370 | /* |
371 | * Main IP Receive routine. | 371 | * Main IP Receive routine. |
372 | */ | 372 | */ |
373 | int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) | 373 | int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev) |
374 | { | 374 | { |
375 | struct iphdr *iph; | 375 | struct iphdr *iph; |
@@ -437,9 +437,9 @@ int ip_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, | |||
437 | inhdr_error: | 437 | inhdr_error: |
438 | IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); | 438 | IP_INC_STATS_BH(IPSTATS_MIB_INHDRERRORS); |
439 | drop: | 439 | drop: |
440 | kfree_skb(skb); | 440 | kfree_skb(skb); |
441 | out: | 441 | out: |
442 | return NET_RX_DROP; | 442 | return NET_RX_DROP; |
443 | } | 443 | } |
444 | 444 | ||
445 | EXPORT_SYMBOL(ip_statistics); | 445 | EXPORT_SYMBOL(ip_statistics); |