]> rtime.felk.cvut.cz Git - pes-rpp/rpp-lwip.git/commitdiff
In ip6_input(), do not accept link-local packets on netifs other than
authorIvan Delamer <delamer@inicotech.com>
Sat, 5 May 2012 00:25:22 +0000 (18:25 -0600)
committerIvan Delamer <delamer@inicotech.com>
Sat, 5 May 2012 00:25:22 +0000 (18:25 -0600)
inp.

Change-Id: I7f3c779e69292bc078890e0acdc37112559644ce

src/core/ipv6/ip6.c

index feed8c141ad60753020d0e785b4e724f4975878b..6a8cafe063c19da433f4ef37b031336d77f061ab 100644 (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) */