diff options
| author | Michael Brown | 2007-07-24 18:11:31 +0200 |
|---|---|---|
| committer | Michael Brown | 2007-07-24 18:11:31 +0200 |
| commit | 9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79 (patch) | |
| tree | 3b86aec2b1cc194dca76178c0415c131e8a92b1b /src/net | |
| parent | Define -DOBJECT when generating Makefile rules, for consistency. (diff) | |
| download | ipxe-9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79.tar.gz ipxe-9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79.tar.xz ipxe-9aa61ad5a26e04493a38bf4f9b6bd1228fef7a79.zip | |
Add per-file error identifiers
Diffstat (limited to 'src/net')
| -rw-r--r-- | src/net/nullnet.c | 1 | ||||
| -rw-r--r-- | src/net/tcp.c | 22 |
2 files changed, 3 insertions, 20 deletions
diff --git a/src/net/nullnet.c b/src/net/nullnet.c index 4b6ba4c16..7e199ce3d 100644 --- a/src/net/nullnet.c +++ b/src/net/nullnet.c @@ -17,6 +17,7 @@ */ #include <stdint.h> +#include <errno.h> #include <gpxe/iobuf.h> #include <gpxe/netdevice.h> 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 ); } /** |
