23/02/2003 - Kieran Mansley - kieranm@gtemail.net

* Applied patch #2679

 * Adds check to line 75 for NETIF_FLAG_BROADCAST
This commit is contained in:
kieranm 2004-02-23 10:13:12 +00:00
parent 5c7189124c
commit 3a784509df

View File

@ -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);