diff --git a/src/apps/snmp/snmp_mib2.c b/src/apps/snmp/snmp_mib2.c index 6aab86ca..5fccf1e0 100644 --- a/src/apps/snmp/snmp_mib2.c +++ b/src/apps/snmp/snmp_mib2.c @@ -91,10 +91,17 @@ netif_to_num(const struct netif *netif) #if SNMP_USE_NETCONN #include "lwip/tcpip.h" +#include "lwip/priv/tcpip_priv.h" void snmp_mib2_lwip_synchronizer(snmp_threadsync_called_fn fn, void* arg) { +#if LWIP_TCPIP_CORE_LOCKING + LOCK_TCPIP_CORE(); + fn(arg); + UNLOCK_TCPIP_CORE(); +#else tcpip_callback_with_block(fn, arg, 1); +#endif } struct snmp_threadsync_instance snmp_mib2_lwip_locks;