task #10241 (AutoIP: don't break existing connections when assiging routable address): when checking incoming packets and aborting existing connection on address change, filter out link-local addresses.

This commit is contained in:
goldsimon
2010-03-08 18:17:52 +00:00
parent d47a04456b
commit 2a2be49d2c
3 changed files with 19 additions and 2 deletions

View File

@@ -296,7 +296,13 @@ ip_input(struct pbuf *p, struct netif *inp)
/* unicast to this interface address? */
if (ip_addr_cmp(&(iphdr->dest), &(netif->ip_addr)) ||
/* or broadcast on this interface network address? */
ip_addr_isbroadcast(&(iphdr->dest), netif)) {
ip_addr_isbroadcast(&(iphdr->dest), netif)
#if LWIP_AUTOIP
/* connections to link-local addresses must persist after changing
the netif's address (RFC3927 ch. 1.9) */
|| ip_addr_islinklocal(&(iphdr->dest))
#endif /* LWIP_AUTOIP */
) {
LWIP_DEBUGF(IP_DEBUG, ("ip_input: packet accepted on interface %c%c\n",
netif->name[0], netif->name[1]));
/* break out of for loop */