diff --git a/subsys/net/ip/net_if.c b/subsys/net/ip/net_if.c index d181ba12e99..1392140b287 100644 --- a/subsys/net/ip/net_if.c +++ b/subsys/net/ip/net_if.c @@ -4162,8 +4162,8 @@ exit: static void init_igmp(struct net_if *iface) { #if defined(CONFIG_NET_IPV4_IGMP) - /* Ensure IPv4 is enabled for this interface */ - if (iface->config.ip.ipv4 == NULL) { + /* Ensure IPv4 is enabled for this interface. */ + if (net_if_config_ipv4_get(iface, NULL)) { return; }