diff --git a/repos/libports/ports/lwip.hash b/repos/libports/ports/lwip.hash index 981382168..7280f2720 100644 --- a/repos/libports/ports/lwip.hash +++ b/repos/libports/ports/lwip.hash @@ -1 +1 @@ -3608c569747383625a1bca182683c3668fa630b5 +136ee70f33ffced072262d589c24ab3252d15eff diff --git a/repos/libports/ports/lwip.port b/repos/libports/ports/lwip.port index 873924eaa..29dacc0f7 100644 --- a/repos/libports/ports/lwip.port +++ b/repos/libports/ports/lwip.port @@ -14,7 +14,8 @@ PATCHES := $(addprefix src/lib/lwip/,window_scaling.patch \ errno.patch \ libc_select_notify.patch \ sockets_c_errno.patch \ - sol_socket_definition.patch) + sol_socket_definition.patch \ + api_msg.patch) PATCH_OPT := -p1 -d src/lib/lwip diff --git a/repos/libports/src/lib/lwip/api_msg.patch b/repos/libports/src/lib/lwip/api_msg.patch new file mode 100644 index 000000000..a8888dbee --- /dev/null +++ b/repos/libports/src/lib/lwip/api_msg.patch @@ -0,0 +1,13 @@ +The write offset was not always reset after a write finished resulting in the +failed assertion "already writing or closing". + +--- a/src/api/api_msg.c ++++ b/src/api/api_msg.c +@@ -1340,6 +1340,7 @@ err_mem: + and back to application task */ + conn->current_msg->err = err; + conn->current_msg = NULL; ++ conn->write_offset = 0; + conn->state = NETCONN_NONE; + #if LWIP_TCPIP_CORE_LOCKING + if ((conn->flags & NETCONN_FLAG_WRITE_DELAYED) != 0)