diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/atm/lec.c | 29 | ||||
-rw-r--r-- | net/ieee80211/ieee80211_rx.c | 43 | ||||
-rw-r--r-- | net/ipv4/tcp_input.c | 65 | ||||
-rw-r--r-- | net/ipv4/tcp_output.c | 3 | ||||
-rw-r--r-- | net/xfrm/xfrm_user.c | 2 |
5 files changed, 100 insertions, 42 deletions
diff --git a/net/atm/lec.c b/net/atm/lec.c index a2efa7ff41f1..3235c57615e4 100644 --- a/net/atm/lec.c +++ b/net/atm/lec.c | |||
@@ -266,7 +266,6 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
266 | char buf[300]; | 266 | char buf[300]; |
267 | int i = 0; | 267 | int i = 0; |
268 | #endif /* DUMP_PACKETS >0 */ | 268 | #endif /* DUMP_PACKETS >0 */ |
269 | DECLARE_MAC_BUF(mac); | ||
270 | 269 | ||
271 | pr_debug("lec_start_xmit called\n"); | 270 | pr_debug("lec_start_xmit called\n"); |
272 | if (!priv->lecd) { | 271 | if (!priv->lecd) { |
@@ -374,15 +373,19 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
374 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { | 373 | if (entry && (entry->tx_wait.qlen < LEC_UNRES_QUE_LEN)) { |
375 | pr_debug("%s:lec_start_xmit: queuing packet, ", | 374 | pr_debug("%s:lec_start_xmit: queuing packet, ", |
376 | dev->name); | 375 | dev->name); |
377 | pr_debug("MAC address %s\n", | 376 | pr_debug("MAC address " MAC_FMT "\n", |
378 | print_mac(mac, lec_h->h_dest)); | 377 | lec_h->h_dest[0], lec_h->h_dest[1], |
378 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
379 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
379 | skb_queue_tail(&entry->tx_wait, skb); | 380 | skb_queue_tail(&entry->tx_wait, skb); |
380 | } else { | 381 | } else { |
381 | pr_debug | 382 | pr_debug |
382 | ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", | 383 | ("%s:lec_start_xmit: tx queue full or no arp entry, dropping, ", |
383 | dev->name); | 384 | dev->name); |
384 | pr_debug("MAC address %s\n", | 385 | pr_debug("MAC address " MAC_FMT "\n", |
385 | print_mac(mac, lec_h->h_dest)); | 386 | lec_h->h_dest[0], lec_h->h_dest[1], |
387 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
388 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
386 | priv->stats.tx_dropped++; | 389 | priv->stats.tx_dropped++; |
387 | dev_kfree_skb(skb); | 390 | dev_kfree_skb(skb); |
388 | } | 391 | } |
@@ -394,8 +397,10 @@ static int lec_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
394 | 397 | ||
395 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { | 398 | while (entry && (skb2 = skb_dequeue(&entry->tx_wait))) { |
396 | pr_debug("lec.c: emptying tx queue, "); | 399 | pr_debug("lec.c: emptying tx queue, "); |
397 | pr_debug("MAC address %s\n", | 400 | pr_debug("MAC address " MAC_FMT "\n", |
398 | print_mac(mac, lec_h->h_dest)); | 401 | lec_h->h_dest[0], lec_h->h_dest[1], |
402 | lec_h->h_dest[2], lec_h->h_dest[3], | ||
403 | lec_h->h_dest[4], lec_h->h_dest[5]); | ||
399 | lec_send(vcc, skb2, priv); | 404 | lec_send(vcc, skb2, priv); |
400 | } | 405 | } |
401 | 406 | ||
@@ -449,7 +454,6 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
449 | struct lec_arp_table *entry; | 454 | struct lec_arp_table *entry; |
450 | int i; | 455 | int i; |
451 | char *tmp; /* FIXME */ | 456 | char *tmp; /* FIXME */ |
452 | DECLARE_MAC_BUF(mac); | ||
453 | 457 | ||
454 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); | 458 | atomic_sub(skb->truesize, &sk_atm(vcc)->sk_wmem_alloc); |
455 | mesg = (struct atmlec_msg *)skb->data; | 459 | mesg = (struct atmlec_msg *)skb->data; |
@@ -536,9 +540,14 @@ static int lec_atm_send(struct atm_vcc *vcc, struct sk_buff *skb) | |||
536 | struct net_bridge_fdb_entry *f; | 540 | struct net_bridge_fdb_entry *f; |
537 | 541 | ||
538 | pr_debug | 542 | pr_debug |
539 | ("%s: bridge zeppelin asks about %s\n", | 543 | ("%s: bridge zeppelin asks about " MAC_FMT "\n", |
540 | dev->name, | 544 | dev->name, |
541 | print_mac(mac, mesg->content.proxy.mac_addr)); | 545 | mesg->content.proxy.mac_addr[0], |
546 | mesg->content.proxy.mac_addr[1], | ||
547 | mesg->content.proxy.mac_addr[2], | ||
548 | mesg->content.proxy.mac_addr[3], | ||
549 | mesg->content.proxy.mac_addr[4], | ||
550 | mesg->content.proxy.mac_addr[5]); | ||
542 | 551 | ||
543 | if (br_fdb_get_hook == NULL || dev->br_port == NULL) | 552 | if (br_fdb_get_hook == NULL || dev->br_port == NULL) |
544 | break; | 553 | break; |
diff --git a/net/ieee80211/ieee80211_rx.c b/net/ieee80211/ieee80211_rx.c index 1e3f87c8c012..200ee1e63728 100644 --- a/net/ieee80211/ieee80211_rx.c +++ b/net/ieee80211/ieee80211_rx.c | |||
@@ -271,7 +271,6 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
271 | { | 271 | { |
272 | struct ieee80211_hdr_3addr *hdr; | 272 | struct ieee80211_hdr_3addr *hdr; |
273 | int res, hdrlen; | 273 | int res, hdrlen; |
274 | DECLARE_MAC_BUF(mac); | ||
275 | 274 | ||
276 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) | 275 | if (crypt == NULL || crypt->ops->decrypt_mpdu == NULL) |
277 | return 0; | 276 | return 0; |
@@ -283,8 +282,12 @@ ieee80211_rx_frame_decrypt(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
283 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); | 282 | res = crypt->ops->decrypt_mpdu(skb, hdrlen, crypt->priv); |
284 | atomic_dec(&crypt->refcnt); | 283 | atomic_dec(&crypt->refcnt); |
285 | if (res < 0) { | 284 | if (res < 0) { |
286 | IEEE80211_DEBUG_DROP("decryption failed (SA=%s" | 285 | IEEE80211_DEBUG_DROP("decryption failed (SA=" MAC_FMT |
287 | ") res=%d\n", print_mac(mac, hdr->addr2), res); | 286 | ") res=%d\n", |
287 | hdr->addr2[0], hdr->addr2[1], | ||
288 | hdr->addr2[2], hdr->addr2[3], | ||
289 | hdr->addr2[4], hdr->addr2[5], | ||
290 | res); | ||
288 | if (res == -2) | 291 | if (res == -2) |
289 | IEEE80211_DEBUG_DROP("Decryption failed ICV " | 292 | IEEE80211_DEBUG_DROP("Decryption failed ICV " |
290 | "mismatch (key %d)\n", | 293 | "mismatch (key %d)\n", |
@@ -304,7 +307,6 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, | |||
304 | { | 307 | { |
305 | struct ieee80211_hdr_3addr *hdr; | 308 | struct ieee80211_hdr_3addr *hdr; |
306 | int res, hdrlen; | 309 | int res, hdrlen; |
307 | DECLARE_MAC_BUF(mac); | ||
308 | 310 | ||
309 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) | 311 | if (crypt == NULL || crypt->ops->decrypt_msdu == NULL) |
310 | return 0; | 312 | return 0; |
@@ -317,8 +319,12 @@ ieee80211_rx_frame_decrypt_msdu(struct ieee80211_device *ieee, | |||
317 | atomic_dec(&crypt->refcnt); | 319 | atomic_dec(&crypt->refcnt); |
318 | if (res < 0) { | 320 | if (res < 0) { |
319 | printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" | 321 | printk(KERN_DEBUG "%s: MSDU decryption/MIC verification failed" |
320 | " (SA=%s keyidx=%d)\n", | 322 | " (SA=" MAC_FMT " keyidx=%d)\n", |
321 | ieee->dev->name, print_mac(mac, hdr->addr2), keyidx); | 323 | ieee->dev->name, |
324 | hdr->addr2[0], hdr->addr2[1], | ||
325 | hdr->addr2[2], hdr->addr2[3], | ||
326 | hdr->addr2[4], hdr->addr2[5], | ||
327 | keyidx); | ||
322 | return -1; | 328 | return -1; |
323 | } | 329 | } |
324 | 330 | ||
@@ -462,8 +468,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
462 | * frames silently instead of filling system log with | 468 | * frames silently instead of filling system log with |
463 | * these reports. */ | 469 | * these reports. */ |
464 | IEEE80211_DEBUG_DROP("Decryption failed (not set)" | 470 | IEEE80211_DEBUG_DROP("Decryption failed (not set)" |
465 | " (SA=%s)\n", | 471 | " (SA=" MAC_FMT ")\n", |
466 | print_mac(mac, hdr->addr2)); | 472 | hdr->addr2[0], hdr->addr2[1], |
473 | hdr->addr2[2], hdr->addr2[3], | ||
474 | hdr->addr2[4], hdr->addr2[5]); | ||
467 | ieee->ieee_stats.rx_discards_undecryptable++; | 475 | ieee->ieee_stats.rx_discards_undecryptable++; |
468 | goto rx_dropped; | 476 | goto rx_dropped; |
469 | } | 477 | } |
@@ -474,8 +482,10 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
474 | fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && | 482 | fc & IEEE80211_FCTL_PROTECTED && ieee->host_decrypt && |
475 | (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { | 483 | (keyidx = hostap_rx_frame_decrypt(ieee, skb, crypt)) < 0) { |
476 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " | 484 | printk(KERN_DEBUG "%s: failed to decrypt mgmt::auth " |
477 | "from %s\n", dev->name, | 485 | "from " MAC_FMT "\n", dev->name, |
478 | print_mac(mac, hdr->addr2)); | 486 | hdr->addr2[0], hdr->addr2[1], |
487 | hdr->addr2[2], hdr->addr2[3], | ||
488 | hdr->addr2[4], hdr->addr2[5]); | ||
479 | /* TODO: could inform hostapd about this so that it | 489 | /* TODO: could inform hostapd about this so that it |
480 | * could send auth failure report */ | 490 | * could send auth failure report */ |
481 | goto rx_dropped; | 491 | goto rx_dropped; |
@@ -653,8 +663,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
653 | * configured */ | 663 | * configured */ |
654 | } else { | 664 | } else { |
655 | IEEE80211_DEBUG_DROP("encryption configured, but RX " | 665 | IEEE80211_DEBUG_DROP("encryption configured, but RX " |
656 | "frame not encrypted (SA=%s" | 666 | "frame not encrypted (SA=" |
657 | ")\n", print_mac(mac, hdr->addr2)); | 667 | MAC_FMT ")\n", |
668 | hdr->addr2[0], hdr->addr2[1], | ||
669 | hdr->addr2[2], hdr->addr2[3], | ||
670 | hdr->addr2[4], hdr->addr2[5]); | ||
658 | goto rx_dropped; | 671 | goto rx_dropped; |
659 | } | 672 | } |
660 | } | 673 | } |
@@ -662,9 +675,11 @@ int ieee80211_rx(struct ieee80211_device *ieee, struct sk_buff *skb, | |||
662 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && | 675 | if (crypt && !(fc & IEEE80211_FCTL_PROTECTED) && !ieee->open_wep && |
663 | !ieee80211_is_eapol_frame(ieee, skb)) { | 676 | !ieee80211_is_eapol_frame(ieee, skb)) { |
664 | IEEE80211_DEBUG_DROP("dropped unencrypted RX data " | 677 | IEEE80211_DEBUG_DROP("dropped unencrypted RX data " |
665 | "frame from %s" | 678 | "frame from " MAC_FMT |
666 | " (drop_unencrypted=1)\n", | 679 | " (drop_unencrypted=1)\n", |
667 | print_mac(mac, hdr->addr2)); | 680 | hdr->addr2[0], hdr->addr2[1], |
681 | hdr->addr2[2], hdr->addr2[3], | ||
682 | hdr->addr2[4], hdr->addr2[5]); | ||
668 | goto rx_dropped; | 683 | goto rx_dropped; |
669 | } | 684 | } |
670 | 685 | ||
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 7facdb0f6960..5119856017ab 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c | |||
@@ -1625,13 +1625,11 @@ out: | |||
1625 | return flag; | 1625 | return flag; |
1626 | } | 1626 | } |
1627 | 1627 | ||
1628 | /* If we receive more dupacks than we expected counting segments | 1628 | /* Limits sacked_out so that sum with lost_out isn't ever larger than |
1629 | * in assumption of absent reordering, interpret this as reordering. | 1629 | * packets_out. Returns zero if sacked_out adjustement wasn't necessary. |
1630 | * The only another reason could be bug in receiver TCP. | ||
1631 | */ | 1630 | */ |
1632 | static void tcp_check_reno_reordering(struct sock *sk, const int addend) | 1631 | int tcp_limit_reno_sacked(struct tcp_sock *tp) |
1633 | { | 1632 | { |
1634 | struct tcp_sock *tp = tcp_sk(sk); | ||
1635 | u32 holes; | 1633 | u32 holes; |
1636 | 1634 | ||
1637 | holes = max(tp->lost_out, 1U); | 1635 | holes = max(tp->lost_out, 1U); |
@@ -1639,8 +1637,20 @@ static void tcp_check_reno_reordering(struct sock *sk, const int addend) | |||
1639 | 1637 | ||
1640 | if ((tp->sacked_out + holes) > tp->packets_out) { | 1638 | if ((tp->sacked_out + holes) > tp->packets_out) { |
1641 | tp->sacked_out = tp->packets_out - holes; | 1639 | tp->sacked_out = tp->packets_out - holes; |
1642 | tcp_update_reordering(sk, tp->packets_out + addend, 0); | 1640 | return 1; |
1643 | } | 1641 | } |
1642 | return 0; | ||
1643 | } | ||
1644 | |||
1645 | /* If we receive more dupacks than we expected counting segments | ||
1646 | * in assumption of absent reordering, interpret this as reordering. | ||
1647 | * The only another reason could be bug in receiver TCP. | ||
1648 | */ | ||
1649 | static void tcp_check_reno_reordering(struct sock *sk, const int addend) | ||
1650 | { | ||
1651 | struct tcp_sock *tp = tcp_sk(sk); | ||
1652 | if (tcp_limit_reno_sacked(tp)) | ||
1653 | tcp_update_reordering(sk, tp->packets_out + addend, 0); | ||
1644 | } | 1654 | } |
1645 | 1655 | ||
1646 | /* Emulate SACKs for SACKless connection: account for a new dupack. */ | 1656 | /* Emulate SACKs for SACKless connection: account for a new dupack. */ |
@@ -1681,11 +1691,16 @@ static inline void tcp_reset_reno_sack(struct tcp_sock *tp) | |||
1681 | int tcp_use_frto(struct sock *sk) | 1691 | int tcp_use_frto(struct sock *sk) |
1682 | { | 1692 | { |
1683 | const struct tcp_sock *tp = tcp_sk(sk); | 1693 | const struct tcp_sock *tp = tcp_sk(sk); |
1694 | const struct inet_connection_sock *icsk = inet_csk(sk); | ||
1684 | struct sk_buff *skb; | 1695 | struct sk_buff *skb; |
1685 | 1696 | ||
1686 | if (!sysctl_tcp_frto) | 1697 | if (!sysctl_tcp_frto) |
1687 | return 0; | 1698 | return 0; |
1688 | 1699 | ||
1700 | /* MTU probe and F-RTO won't really play nicely along currently */ | ||
1701 | if (icsk->icsk_mtup.probe_size) | ||
1702 | return 0; | ||
1703 | |||
1689 | if (IsSackFrto()) | 1704 | if (IsSackFrto()) |
1690 | return 1; | 1705 | return 1; |
1691 | 1706 | ||
@@ -2134,11 +2149,13 @@ static void tcp_verify_retransmit_hint(struct tcp_sock *tp, struct sk_buff *skb) | |||
2134 | /* Mark head of queue up as lost. With RFC3517 SACK, the packets is | 2149 | /* Mark head of queue up as lost. With RFC3517 SACK, the packets is |
2135 | * is against sacked "cnt", otherwise it's against facked "cnt" | 2150 | * is against sacked "cnt", otherwise it's against facked "cnt" |
2136 | */ | 2151 | */ |
2137 | static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) | 2152 | static void tcp_mark_head_lost(struct sock *sk, int packets) |
2138 | { | 2153 | { |
2139 | struct tcp_sock *tp = tcp_sk(sk); | 2154 | struct tcp_sock *tp = tcp_sk(sk); |
2140 | struct sk_buff *skb; | 2155 | struct sk_buff *skb; |
2141 | int cnt; | 2156 | int cnt, oldcnt; |
2157 | int err; | ||
2158 | unsigned int mss; | ||
2142 | 2159 | ||
2143 | BUG_TRAP(packets <= tp->packets_out); | 2160 | BUG_TRAP(packets <= tp->packets_out); |
2144 | if (tp->lost_skb_hint) { | 2161 | if (tp->lost_skb_hint) { |
@@ -2157,13 +2174,25 @@ static void tcp_mark_head_lost(struct sock *sk, int packets, int fast_rexmit) | |||
2157 | tp->lost_skb_hint = skb; | 2174 | tp->lost_skb_hint = skb; |
2158 | tp->lost_cnt_hint = cnt; | 2175 | tp->lost_cnt_hint = cnt; |
2159 | 2176 | ||
2177 | if (after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) | ||
2178 | break; | ||
2179 | |||
2180 | oldcnt = cnt; | ||
2160 | if (tcp_is_fack(tp) || tcp_is_reno(tp) || | 2181 | if (tcp_is_fack(tp) || tcp_is_reno(tp) || |
2161 | (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) | 2182 | (TCP_SKB_CB(skb)->sacked & TCPCB_SACKED_ACKED)) |
2162 | cnt += tcp_skb_pcount(skb); | 2183 | cnt += tcp_skb_pcount(skb); |
2163 | 2184 | ||
2164 | if (((!fast_rexmit || (tp->lost_out > 0)) && (cnt > packets)) || | 2185 | if (cnt > packets) { |
2165 | after(TCP_SKB_CB(skb)->end_seq, tp->high_seq)) | 2186 | if (tcp_is_sack(tp) || (oldcnt >= packets)) |
2166 | break; | 2187 | break; |
2188 | |||
2189 | mss = skb_shinfo(skb)->gso_size; | ||
2190 | err = tcp_fragment(sk, skb, (packets - oldcnt) * mss, mss); | ||
2191 | if (err < 0) | ||
2192 | break; | ||
2193 | cnt = packets; | ||
2194 | } | ||
2195 | |||
2167 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { | 2196 | if (!(TCP_SKB_CB(skb)->sacked & (TCPCB_SACKED_ACKED|TCPCB_LOST))) { |
2168 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; | 2197 | TCP_SKB_CB(skb)->sacked |= TCPCB_LOST; |
2169 | tp->lost_out += tcp_skb_pcount(skb); | 2198 | tp->lost_out += tcp_skb_pcount(skb); |
@@ -2180,17 +2209,17 @@ static void tcp_update_scoreboard(struct sock *sk, int fast_rexmit) | |||
2180 | struct tcp_sock *tp = tcp_sk(sk); | 2209 | struct tcp_sock *tp = tcp_sk(sk); |
2181 | 2210 | ||
2182 | if (tcp_is_reno(tp)) { | 2211 | if (tcp_is_reno(tp)) { |
2183 | tcp_mark_head_lost(sk, 1, fast_rexmit); | 2212 | tcp_mark_head_lost(sk, 1); |
2184 | } else if (tcp_is_fack(tp)) { | 2213 | } else if (tcp_is_fack(tp)) { |
2185 | int lost = tp->fackets_out - tp->reordering; | 2214 | int lost = tp->fackets_out - tp->reordering; |
2186 | if (lost <= 0) | 2215 | if (lost <= 0) |
2187 | lost = 1; | 2216 | lost = 1; |
2188 | tcp_mark_head_lost(sk, lost, fast_rexmit); | 2217 | tcp_mark_head_lost(sk, lost); |
2189 | } else { | 2218 | } else { |
2190 | int sacked_upto = tp->sacked_out - tp->reordering; | 2219 | int sacked_upto = tp->sacked_out - tp->reordering; |
2191 | if (sacked_upto < 0) | 2220 | if (sacked_upto < fast_rexmit) |
2192 | sacked_upto = 0; | 2221 | sacked_upto = fast_rexmit; |
2193 | tcp_mark_head_lost(sk, sacked_upto, fast_rexmit); | 2222 | tcp_mark_head_lost(sk, sacked_upto); |
2194 | } | 2223 | } |
2195 | 2224 | ||
2196 | /* New heuristics: it is possible only after we switched | 2225 | /* New heuristics: it is possible only after we switched |
@@ -2524,7 +2553,7 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) | |||
2524 | before(tp->snd_una, tp->high_seq) && | 2553 | before(tp->snd_una, tp->high_seq) && |
2525 | icsk->icsk_ca_state != TCP_CA_Open && | 2554 | icsk->icsk_ca_state != TCP_CA_Open && |
2526 | tp->fackets_out > tp->reordering) { | 2555 | tp->fackets_out > tp->reordering) { |
2527 | tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering, 0); | 2556 | tcp_mark_head_lost(sk, tp->fackets_out - tp->reordering); |
2528 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); | 2557 | NET_INC_STATS_BH(LINUX_MIB_TCPLOSS); |
2529 | } | 2558 | } |
2530 | 2559 | ||
@@ -2586,6 +2615,8 @@ static void tcp_fastretrans_alert(struct sock *sk, int pkts_acked, int flag) | |||
2586 | case TCP_CA_Loss: | 2615 | case TCP_CA_Loss: |
2587 | if (flag & FLAG_DATA_ACKED) | 2616 | if (flag & FLAG_DATA_ACKED) |
2588 | icsk->icsk_retransmits = 0; | 2617 | icsk->icsk_retransmits = 0; |
2618 | if (tcp_is_reno(tp) && flag & FLAG_SND_UNA_ADVANCED) | ||
2619 | tcp_reset_reno_sack(tp); | ||
2589 | if (!tcp_try_undo_loss(sk)) { | 2620 | if (!tcp_try_undo_loss(sk)) { |
2590 | tcp_moderate_cwnd(tp); | 2621 | tcp_moderate_cwnd(tp); |
2591 | tcp_xmit_retransmit_queue(sk); | 2622 | tcp_xmit_retransmit_queue(sk); |
diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 72b9350006fe..d29ef79c00ca 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c | |||
@@ -1808,6 +1808,9 @@ void tcp_simple_retransmit(struct sock *sk) | |||
1808 | if (!lost) | 1808 | if (!lost) |
1809 | return; | 1809 | return; |
1810 | 1810 | ||
1811 | if (tcp_is_reno(tp)) | ||
1812 | tcp_limit_reno_sacked(tp); | ||
1813 | |||
1811 | tcp_verify_left_out(tp); | 1814 | tcp_verify_left_out(tp); |
1812 | 1815 | ||
1813 | /* Don't muck with the congestion window here. | 1816 | /* Don't muck with the congestion window here. |
diff --git a/net/xfrm/xfrm_user.c b/net/xfrm/xfrm_user.c index 5d96f2728dc6..019d21de19b3 100644 --- a/net/xfrm/xfrm_user.c +++ b/net/xfrm/xfrm_user.c | |||
@@ -288,7 +288,7 @@ static void copy_from_user_state(struct xfrm_state *x, struct xfrm_usersa_info * | |||
288 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); | 288 | memcpy(&x->props.saddr, &p->saddr, sizeof(x->props.saddr)); |
289 | x->props.flags = p->flags; | 289 | x->props.flags = p->flags; |
290 | 290 | ||
291 | if (x->props.mode == XFRM_MODE_TRANSPORT) | 291 | if (!x->sel.family) |
292 | x->sel.family = p->family; | 292 | x->sel.family = p->family; |
293 | 293 | ||
294 | } | 294 | } |