From f20fab8d97b0bdac1bd5101c14336e89e055d7b7 Mon Sep 17 00:00:00 2001 From: Joan Lledó Date: Sun, 31 Mar 2019 19:55:41 +0200 Subject: lwip: Stop using netifapi. Use tcpip_callback() to reconfigure interfaces in a thread-safe context instead. * lwip/lwip-util.c: * Replace all netifapi calls by their non-netifapi versions. * update_ifs() is called through tcpip_callback(). * lwip/options.c: * Call init_fs() through tcpip_callback(). * lwip/port/netif/ifcommon.c: * Replace all netifapi calls by their non-netifapi versions. Message-Id: <20190331175541.7095-5-jlledom@member.fsf.org> --- lwip/options.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'lwip/options.c') diff --git a/lwip/options.c b/lwip/options.c index d35b9f32..2cfad44d 100644 --- a/lwip/options.c +++ b/lwip/options.c @@ -264,11 +264,15 @@ parse_opt (int opt, char *arg, struct argp_state *state) case ARGP_KEY_SUCCESS: /* If the interface list is not empty, a previous configuration exists */ if (netif_list == 0) - /* Inititalize LwIP */ - tcpip_init (init_ifs, h); + { + /* Inititalize LwIP */ + tcpip_init (init_ifs, h); + } else - /* No need to initialize the stack again */ - init_ifs (h); + { + /* No need to initialize the stack again */ + tcpip_callback (init_ifs, h); + } break; case ARGP_KEY_ERROR: -- cgit v1.2.3