In ip6_input(), do not accept link-local packets on netifs other than

inp.

Change-Id: I7f3c779e69292bc078890e0acdc37112559644ce
This commit is contained in:
Ivan Delamer 2012-05-04 18:25:22 -06:00
parent 944adc56ee
commit 289566afe8

View File

@ -447,6 +447,11 @@ ip6_input(struct pbuf *p, struct netif *inp)
}
}
}
if (ip6_addr_islinklocal(ip6_current_dest_addr())) {
/* Do not match link-local addresses to other netifs. */
netif = NULL;
break;
}
if (first) {
first = 0;
netif = netif_list;
@ -459,7 +464,7 @@ ip6_input(struct pbuf *p, struct netif *inp)
} while(netif != NULL);
netif_found:
LWIP_DEBUGF(IP6_DEBUG, ("ip6_input: packet accepted on interface %c%c\n",
netif->name[0], netif->name[1]));
netif ? netif->name[0] : 'X', netif? netif->name[1] : 'X'));
}
/* "::" packet source address? (used in duplicate address detection) */