diff --git a/src/core/ipv4/icmp.c b/src/core/ipv4/icmp.c index fbf5e7e5..d62ca00f 100644 --- a/src/core/ipv4/icmp.c +++ b/src/core/ipv4/icmp.c @@ -72,7 +72,8 @@ icmp_input(struct pbuf *p, struct netif *inp) code = *(((u8_t *)p->payload)+1); switch (type) { case ICMP_ECHO: - if (ip_addr_isbroadcast(&iphdr->dest, &inp->netmask) || + if (((inp->flags & NETIF_FLAG_BROADCAST) && + ip_addr_isbroadcast(&iphdr->dest, &inp->netmask)) || ip_addr_ismulticast(&iphdr->dest)) { LWIP_DEBUGF(ICMP_DEBUG, ("Smurf.\n")); ICMP_STATS_INC(icmp.err);