aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/tcp.c
diff options
context:
space:
mode:
authorMichael Brown <mcb30@etherboot.org>2007-07-24 17:11:31 +0100
committerMichael Brown <mcb30@etherboot.org>2007-07-24 17:11:31 +0100
commit9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79 (patch)
tree3b86aec2b1cc194dca76178c0415c131e8a92b1b /src/net/tcp.c
parentf0acd8d7a7d885f218509ef048004e0897a31573 (diff)
downloadipxe-9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79.tar.gz
Add per-file error identifiers
Diffstat (limited to 'src/net/tcp.c')
-rw-r--r--src/net/tcp.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/src/net/tcp.c b/src/net/tcp.c
index b2d9b2dec..01daf75ab 100644
--- a/src/net/tcp.c
+++ b/src/net/tcp.c
@@ -395,7 +395,6 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
size_t seq_len;
size_t app_win;
size_t rcv_win;
- int rc;
/* If retransmission timer is already running, do nothing */
if ( timer_running ( &tcp->timer ) )
@@ -485,25 +484,8 @@ static int tcp_xmit ( struct tcp_connection *tcp, int force_send ) {
DBGC ( tcp, "\n" );
/* Transmit packet */
- rc = tcpip_tx ( iobuf, &tcp_protocol, &tcp->peer, NULL, &tcphdr->csum );
-
- /* If we got -ENETUNREACH, kill the connection immediately
- * because there is no point retrying. This isn't strictly
- * necessary (since we will eventually time out anyway), but
- * it avoids irritating needless delays. Don't do this for
- * RST packets transmitted on connection abort, to avoid a
- * potential infinite loop.
- */
- if ( ( ! ( tcp->tcp_state & TCP_STATE_SENT ( TCP_RST ) ) ) &&
- ( rc == -ENETUNREACH ) ) {
- DBGC ( tcp, "TCP %p aborting after TX failed: %s\n",
- tcp, strerror ( rc ) );
- tcp->tcp_state = TCP_CLOSED;
- tcp_dump_state ( tcp );
- tcp_close ( tcp, rc );
- }
-
- return rc;
+ return tcpip_tx ( iobuf, &tcp_protocol, &tcp->peer, NULL,
+ &tcphdr->csum );
}
/**