diff --git a/CHANGELOG b/CHANGELOG index 4a92d527..21a85c94 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -302,6 +302,9 @@ HISTORY ++ Bugfixes: + 2016-03-05: Simon Goldschmidt + * err.h/.c, sockets.c: ERR_IF is not necessarily a fatal error + 2015-11-19: fix by Kerem Hadimli * sockets.c: fixed bug #46471: lwip_accept() leaks socket descriptors if new netconn was already closed because of peer behavior diff --git a/src/api/err.c b/src/api/err.c index cb92af3b..28795c2d 100644 --- a/src/api/err.c +++ b/src/api/err.c @@ -53,11 +53,11 @@ static const char *err_strerr[] = { "Already connecting.", /* ERR_ALREADY -9 */ "Already connected.", /* ERR_ISCONN -10 */ "Not connected.", /* ERR_CONN -11 */ - "Connection aborted.", /* ERR_ABRT -12 */ - "Connection reset.", /* ERR_RST -13 */ - "Connection closed.", /* ERR_CLSD -14 */ - "Illegal argument.", /* ERR_ARG -15 */ - "Low-level netif error." /* ERR_IF -16 */ + "Low-level netif error.", /* ERR_IF -12 */ + "Connection aborted.", /* ERR_ABRT -13 */ + "Connection reset.", /* ERR_RST -14 */ + "Connection closed.", /* ERR_CLSD -15 */ + "Illegal argument."v /* ERR_ARG -16 */ }; /** diff --git a/src/api/sockets.c b/src/api/sockets.c index 102ec747..1ea64ae7 100644 --- a/src/api/sockets.c +++ b/src/api/sockets.c @@ -298,11 +298,11 @@ static const int err_to_errno_table[] = { EALREADY, /* ERR_ALREADY -9 Already connecting. */ EISCONN, /* ERR_ISCONN -10 Conn already established.*/ ENOTCONN, /* ERR_CONN -11 Not connected. */ - ECONNABORTED, /* ERR_ABRT -12 Connection aborted. */ - ECONNRESET, /* ERR_RST -13 Connection reset. */ - ENOTCONN, /* ERR_CLSD -14 Connection closed. */ - EIO, /* ERR_ARG -15 Illegal argument. */ - -1, /* ERR_IF -16 Low-level netif error */ + -1, /* ERR_IF -12 Low-level netif error */ + ECONNABORTED, /* ERR_ABRT -13 Connection aborted. */ + ECONNRESET, /* ERR_RST -14 Connection reset. */ + ENOTCONN, /* ERR_CLSD -15 Connection closed. */ + EIO /* ERR_ARG -16 Illegal argument. */ }; #define ERR_TO_ERRNO_TABLE_SIZE LWIP_ARRAYSIZE(err_to_errno_table) diff --git a/src/include/lwip/err.h b/src/include/lwip/err.h index 0b63dc3f..479fc6c8 100644 --- a/src/include/lwip/err.h +++ b/src/include/lwip/err.h @@ -62,15 +62,14 @@ typedef s8_t err_t; #define ERR_ISCONN -10 /* Conn already established.*/ #define ERR_CONN -11 /* Not connected. */ +#define ERR_IF -12 /* Low-level netif error */ #define ERR_IS_FATAL(e) ((e) < ERR_CONN) -#define ERR_ABRT -12 /* Connection aborted. */ -#define ERR_RST -13 /* Connection reset. */ -#define ERR_CLSD -14 /* Connection closed. */ +#define ERR_ABRT -13 /* Connection aborted. */ +#define ERR_RST -14 /* Connection reset. */ +#define ERR_CLSD -15 /* Connection closed. */ -#define ERR_ARG -15 /* Illegal argument. */ - -#define ERR_IF -16 /* Low-level netif error */ +#define ERR_ARG -16 /* Illegal argument. */ #ifdef LWIP_DEBUG