Re: [PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context

2019-05-02 Thread Samuel Thibault
Joan Lledó, le jeu. 02 mai 2019 11:55:02 +0200, a ecrit: > + uint16_t oldflags; > + struct if_change_flags_args *args = (struct if_change_flags_args *) arg; In C, there is no need to explicit the cast from void*. > + ifc = netif_get_state (args->netif); > + > + if (ifc == NULL) > +{ > +

Re: [PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-02 Thread Samuel Thibault
Joan Lledó, le jeu. 02 mai 2019 11:55:01 +0200, a ecrit: > * lwip/lwip-util.c: > * Check for errors when calling update_if() > inside a thread-safe context. Applied, thanks!

Re: [PATCH 2/4] lwip: Set output flags when calling recv()

2019-05-02 Thread Samuel Thibault
Joan Lledó, le jeu. 02 mai 2019 11:55:00 +0200, a ecrit: > Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags > for the recv() operation. Good :) > + /* Remove unsupported flags */ > + flags &= MSG_DONTWAIT | MSG_PEEK; Same remark as the send side. Samuel

Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().

2019-05-02 Thread Samuel Thibault
Samuel Thibault, le jeu. 02 mai 2019 23:53:41 +0200, a ecrit: > Joan Lledó, le jeu. 02 mai 2019 11:54:59 +0200, a ecrit: > > Lwip 2.1.2 added a new assertion to ensure that no unsupported flags > > are being sent to lwip_sendmsg(). The send operation must be updated to > > remove this u

Re: [PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().

2019-05-02 Thread Samuel Thibault
Joan Lledó, le jeu. 02 mai 2019 11:54:59 +0200, a ecrit: > Lwip 2.1.2 added a new assertion to ensure that no unsupported flags > are being sent to lwip_sendmsg(). The send operation must be updated to > remove this unsupported flags. > @@ -361,8 +361,11 @@ struct msghdr m = { msg_name

Patches for the lwip translator

2019-05-02 Thread Joan Lledó
Hello, Attached are some patches for the lwip translator. Mainly for bug-fixing and error handling.

[PATCH 1/4] lwip: Fix bug: Remove unsupported flags when calling send().

2019-05-02 Thread Joan Lledó
Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). The send operation must be updated to remove this unsupported flags. * lwip/socket-ops.c: lwip_S_socket_send(): Remove unsupported flags. --- lwip/socket-ops.c | 13 -

[PATCH 3/4] lwip: Error handling when calling update_if()

2019-05-02 Thread Joan Lledó
* lwip/lwip-util.c: * Check for errors when calling update_if() inside a thread-safe context. --- lwip/lwip-util.c | 62 ++-- 1 file changed, 33 insertions(+), 29 deletions(-) diff --git a/lwip/lwip-util.c b/lwip/lwip-util.c index 2d3c

[PATCH 4/4] lwip: Call if_change_flags() inside a thread-safe context

2019-05-02 Thread Joan Lledó
* lwip/port/netif/ifcommon.c: * Changing flags for a device (e.g. by inetutils-ifconfig) now takes the big lock to ensure the stack is not doing anything else. --- lwip/port/netif/ifcommon.c | 61 +- 1 file changed, 54 insertions(+), 7 deletion

[PATCH 2/4] lwip: Set output flags when calling recv()

2019-05-02 Thread Joan Lledó
Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags for the recv() operation. * lwip/socket-ops.c: Call lwip_recvmsg() instead of lwip_recvfrom(). --- lwip/socket-ops.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/lwip/