VirtualBox

Changeset 64484 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Oct 31, 2016 12:08:06 AM (8 years ago)
Author:
vboxsync
Message:

lwIP: cherry-pick a TCP fix for FIN ACK handling with unsent data.

comit 0d7805a86a538404ea89a51f85dd16cd435cecbe
Date: 2016-10-04 22:12:13 +0200

http://savannah.nongnu.org/patch/?9125
tcp: fix FIN ACK handling with unsent data

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Devices/Network/lwip-new/src/core/tcp_in.c

    r63055 r64484  
    10431043    tcp_receive(pcb);
    10441044    if (recv_flags & TF_GOT_FIN) {
    1045       if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) {
     1045      if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
     1046          pcb->unsent == NULL) {
    10461047        LWIP_DEBUGF(TCP_DEBUG,
    10471048          ("TCP connection closed: FIN_WAIT_1 %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
     
    10551056        pcb->state = CLOSING;
    10561057      }
    1057     } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt)) {
     1058    } else if ((flags & TCP_ACK) && (ackno == pcb->snd_nxt) &&
     1059               pcb->unsent == NULL) {
    10581060      pcb->state = FIN_WAIT_2;
    10591061    }
     
    10721074  case CLOSING:
    10731075    tcp_receive(pcb);
    1074     if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
     1076    if (flags & TCP_ACK && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
    10751077      LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: CLOSING %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
    10761078      tcp_pcb_purge(pcb);
     
    10821084  case LAST_ACK:
    10831085    tcp_receive(pcb);
    1084     if (flags & TCP_ACK && ackno == pcb->snd_nxt) {
     1086    if (flags & TCP_ACK && ackno == pcb->snd_nxt && pcb->unsent == NULL) {
    10851087      LWIP_DEBUGF(TCP_DEBUG, ("TCP connection closed: LAST_ACK %"U16_F" -> %"U16_F".\n", inseg.tcphdr->src, inseg.tcphdr->dest));
    10861088      /* bugfix #21699: don't set pcb->state to CLOSED here or we risk leaking segments */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette