diff --git a/src/core/netif.c b/src/core/netif.c index ccbbe48a..58e64ced 100644 --- a/src/core/netif.c +++ b/src/core/netif.c @@ -126,6 +126,9 @@ netif_loopif_init(struct netif *netif) #endif #if LWIP_IPV6 netif->output_ip6 = netif_loop_output_ipv6; +#endif +#if LWIP_LOOPIF_MCAST + netif->flags |= NETIF_FLAG_IGMP; #endif return ERR_OK; } diff --git a/src/include/lwip/opt.h b/src/include/lwip/opt.h index 3615cf41..6de94bb3 100644 --- a/src/include/lwip/opt.h +++ b/src/include/lwip/opt.h @@ -1424,6 +1424,13 @@ #define LWIP_HAVE_LOOPIF LWIP_NETIF_LOOPBACK #endif +/** +* LWIP_LOOPIF_MCAST==1: Support multicast on loop interface (127.0.0.1). +*/ +#ifndef LWIP_LOOPIF_MCAST +#define LWIP_LOOPIF_MCAST 0 +#endif + /* ------------------------------------ ---------- SLIPIF options ----------