Changeset 3819ce5 in mainline for uspace/srv/net/tl/tcp/conn.c


Ignore:
Timestamp:
2011-12-25T10:05:28Z (13 years ago)
Author:
Frantisek Princ <frantisek.princ@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
ecf823a
Parents:
1440eae (diff), 7e1b130 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge with mainline

File:
1 edited

Legend:

Unmodified
Added
Removed
  • uspace/srv/net/tl/tcp/conn.c

    r1440eae r3819ce5  
    491491                    conn->snd_una, seg->ack, conn->snd_nxt);
    492492                if (!seq_no_ack_acceptable(conn, seg->ack)) {
    493                         log_msg(LVL_WARN, "ACK not acceptable, send RST.");
    494                         tcp_reply_rst(&conn->ident, seg);
     493                        if ((seg->ctrl & CTL_RST) == 0) {
     494                                log_msg(LVL_WARN, "ACK not acceptable, send RST");
     495                                tcp_reply_rst(&conn->ident, seg);
     496                        } else {
     497                                log_msg(LVL_WARN, "RST,ACK not acceptable, drop");
     498                        }
    495499                        return;
    496500                }
     
    498502
    499503        if ((seg->ctrl & CTL_RST) != 0) {
    500                 log_msg(LVL_DEBUG, "%s: Connection reset. -> Closed",
    501                     conn->name);
    502                 /* Reset connection */
    503                 tcp_conn_reset(conn);
    504                 /* XXX delete connection */
    505                 return;
     504                /* If we get here, we have either an acceptable ACK or no ACK */
     505                if ((seg->ctrl & CTL_ACK) != 0) {
     506                        log_msg(LVL_DEBUG, "%s: Connection reset. -> Closed",
     507                            conn->name);
     508                        /* Reset connection */
     509                        tcp_conn_reset(conn);
     510                        return;
     511                } else {
     512                        log_msg(LVL_DEBUG, "%s: RST without ACK, drop",
     513                            conn->name);
     514                        return;
     515                }
    506516        }
    507517
Note: See TracChangeset for help on using the changeset viewer.