diff options
Diffstat (limited to 'drivers/net/ppp/ppp_generic.c')
-rw-r--r-- | drivers/net/ppp/ppp_generic.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/net/ppp/ppp_generic.c b/drivers/net/ppp/ppp_generic.c index 93a86397af36..6d4d2ebb0a8a 100644 --- a/drivers/net/ppp/ppp_generic.c +++ b/drivers/net/ppp/ppp_generic.c | |||
@@ -2024,14 +2024,22 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2024 | continue; | 2024 | continue; |
2025 | } | 2025 | } |
2026 | if (PPP_MP_CB(p)->sequence != seq) { | 2026 | if (PPP_MP_CB(p)->sequence != seq) { |
2027 | u32 oldseq; | ||
2027 | /* Fragment `seq' is missing. If it is after | 2028 | /* Fragment `seq' is missing. If it is after |
2028 | minseq, it might arrive later, so stop here. */ | 2029 | minseq, it might arrive later, so stop here. */ |
2029 | if (seq_after(seq, minseq)) | 2030 | if (seq_after(seq, minseq)) |
2030 | break; | 2031 | break; |
2031 | /* Fragment `seq' is lost, keep going. */ | 2032 | /* Fragment `seq' is lost, keep going. */ |
2032 | lost = 1; | 2033 | lost = 1; |
2034 | oldseq = seq; | ||
2033 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? | 2035 | seq = seq_before(minseq, PPP_MP_CB(p)->sequence)? |
2034 | minseq + 1: PPP_MP_CB(p)->sequence; | 2036 | minseq + 1: PPP_MP_CB(p)->sequence; |
2037 | |||
2038 | if (ppp->debug & 1) | ||
2039 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2040 | "lost frag %u..%u\n", | ||
2041 | oldseq, seq-1); | ||
2042 | |||
2035 | goto again; | 2043 | goto again; |
2036 | } | 2044 | } |
2037 | 2045 | ||
@@ -2076,6 +2084,10 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2076 | struct sk_buff *tmp2; | 2084 | struct sk_buff *tmp2; |
2077 | 2085 | ||
2078 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { | 2086 | skb_queue_reverse_walk_from_safe(list, p, tmp2) { |
2087 | if (ppp->debug & 1) | ||
2088 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2089 | "discarding frag %u\n", | ||
2090 | PPP_MP_CB(p)->sequence); | ||
2079 | __skb_unlink(p, list); | 2091 | __skb_unlink(p, list); |
2080 | kfree_skb(p); | 2092 | kfree_skb(p); |
2081 | } | 2093 | } |
@@ -2091,6 +2103,17 @@ ppp_mp_reconstruct(struct ppp *ppp) | |||
2091 | /* If we have discarded any fragments, | 2103 | /* If we have discarded any fragments, |
2092 | signal a receive error. */ | 2104 | signal a receive error. */ |
2093 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { | 2105 | if (PPP_MP_CB(head)->sequence != ppp->nextseq) { |
2106 | skb_queue_walk_safe(list, p, tmp) { | ||
2107 | if (p == head) | ||
2108 | break; | ||
2109 | if (ppp->debug & 1) | ||
2110 | netdev_printk(KERN_DEBUG, ppp->dev, | ||
2111 | "discarding frag %u\n", | ||
2112 | PPP_MP_CB(p)->sequence); | ||
2113 | __skb_unlink(p, list); | ||
2114 | kfree_skb(p); | ||
2115 | } | ||
2116 | |||
2094 | if (ppp->debug & 1) | 2117 | if (ppp->debug & 1) |
2095 | netdev_printk(KERN_DEBUG, ppp->dev, | 2118 | netdev_printk(KERN_DEBUG, ppp->dev, |
2096 | " missed pkts %u..%u\n", | 2119 | " missed pkts %u..%u\n", |