aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/ip_fragment.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4/ip_fragment.c')
-rw-r--r--net/ipv4/ip_fragment.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/net/ipv4/ip_fragment.c b/net/ipv4/ip_fragment.c
index af120b2d5331..0231bdcb2ab7 100644
--- a/net/ipv4/ip_fragment.c
+++ b/net/ipv4/ip_fragment.c
@@ -479,7 +479,7 @@ 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(ip_hdr(skb)->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 */
@@ -676,7 +676,7 @@ static struct sk_buff *ip_frag_reasm(struct ipq *qp, struct net_device *dev)
676 head->dev = dev; 676 head->dev = dev;
677 head->tstamp = qp->stamp; 677 head->tstamp = qp->stamp;
678 678
679 iph = head->nh.iph; 679 iph = ip_hdr(head);
680 iph->frag_off = 0; 680 iph->frag_off = 0;
681 iph->tot_len = htons(len); 681 iph->tot_len = htons(len);
682 IP_INC_STATS_BH(IPSTATS_MIB_REASMOKS); 682 IP_INC_STATS_BH(IPSTATS_MIB_REASMOKS);
@@ -700,7 +700,6 @@ out_fail:
700/* Process an incoming IP datagram fragment. */ 700/* Process an incoming IP datagram fragment. */
701struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user) 701struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user)
702{ 702{
703 struct iphdr *iph = skb->nh.iph;
704 struct ipq *qp; 703 struct ipq *qp;
705 struct net_device *dev; 704 struct net_device *dev;
706 705
@@ -713,7 +712,7 @@ struct sk_buff *ip_defrag(struct sk_buff *skb, u32 user)
713 dev = skb->dev; 712 dev = skb->dev;
714 713
715 /* Lookup (or create) queue header */ 714 /* Lookup (or create) queue header */
716 if ((qp = ip_find(iph, user)) != NULL) { 715 if ((qp = ip_find(ip_hdr(skb), user)) != NULL) {
717 struct sk_buff *ret = NULL; 716 struct sk_buff *ret = NULL;
718 717
719 spin_lock(&qp->lock); 718 spin_lock(&qp->lock);