aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-11 14:38:13 -0500
commitcb18eccff48ef3986d1072964590bce6fec705fb (patch)
tree777fb1d15e0281341e1e02c9803d989538d346f2 /net/ipv4/ip_fragment.c
parentc827ba4cb49a30ce581201fd0ba2be77cde412c7 (diff)
parent5ef213f6842277ee1df5659f59fac0ffc9beb411 (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_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index 8ce00d3703da..b6f055380373 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -4,7 +4,7 @@
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 fragmentation functionality. 6 * The IP fragmentation functionality.
7 * 7 *
8 * Version: $Id: ip_fragment.c,v 1.59 2002/01/12 07:54:56 davem Exp $ 8 * Version: $Id: ip_fragment.c,v 1.59 2002/01/12 07:54:56 davem Exp $
9 * 9 *
10 * Authors: Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG> 10 * Authors: Fred N. van Kempen <waltje@uWalt.NL.Mugnet.ORG>
@@ -238,7 +238,7 @@ static void ipq_kill(struct ipq *ipq)
238 } 238 }
239} 239}
240 240
241/* Memory limiting on fragments. Evictor trashes the oldest 241/* Memory limiting on fragments. Evictor trashes the oldest
242 * fragment queue until we are back under the threshold. 242 * fragment queue until we are back under the threshold.
243 */ 243 */
244static void ip_evictor(void) 244static void ip_evictor(void)
@@ -479,14 +479,14 @@ static void ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
479 goto err; 479 goto err;
480 } 480 }
481 481
482 offset = ntohs(skb->nh.iph->frag_off); 482 offset = ntohs(skb->nh.iph->frag_off);
483 flags = offset & ~IP_OFFSET; 483 flags = offset & ~IP_OFFSET;
484 offset &= IP_OFFSET; 484 offset &= IP_OFFSET;
485 offset <<= 3; /* offset is in 8-byte chunks */ 485 offset <<= 3; /* offset is in 8-byte chunks */
486 ihl = skb->nh.iph->ihl * 4; 486 ihl = skb->nh.iph->ihl * 4;
487 487
488 /* Determine the position of this fragment. */ 488 /* Determine the position of this fragment. */
489 end = offset + skb->len - ihl; 489 end = offset + skb->len - ihl;
490 490
491 /* Is this the final fragment? */ 491 /* Is this the final fragment? */
492 if ((flags & IP_MF) == 0) { 492 if ((flags & IP_MF) == 0) {
@@ -589,8 +589,8 @@ static void ip_frag_queue(struct ipq *qp, struct sk_buff *skb)
589 else 589 else
590 qp->fragments = skb; 590 qp->fragments = skb;
591 591
592 if (skb->dev) 592 if (skb->dev)
593 qp->iif = skb->dev->ifindex; 593 qp->iif = skb->dev->ifindex;
594 skb->dev = NULL; 594 skb->dev = NULL;
595 skb_get_timestamp(skb, &qp->stamp); 595 skb_get_timestamp(skb, &qp->stamp);
596 qp->meat += skb->len; 596 qp->meat += skb->len;
@@ -684,7 +684,7 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
684 return head; 684 return head;
685 685
686out_nomem: 686out_nomem:
687 LIMIT_NETDEBUG(KERN_ERR "IP: queue_glue: no memory for gluing " 687 LIMIT_NETDEBUG(KERN_ERR "IP: queue_glue: no memory for gluing "
688 "queue %p\n", qp); 688 "queue %p\n", qp);
689 goto out_fail; 689 goto out_fail;
690out_oversize: 690out_oversize:
@@ -703,7 +703,7 @@ struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user)
703 struct iphdr *iph = skb->nh.iph; 703 struct iphdr *iph = skb->nh.iph;
704 struct ipq *qp; 704 struct ipq *qp;
705 struct net_device *dev; 705 struct net_device *dev;
706 706
707 IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS); 707 IP_INC_STATS_BH(IPSTATS_MIB_REASMREQDS);
708 708
709 /* Start by cleaning up the memory. */ 709 /* Start by cleaning up the memory. */