diff --git a/CHANGELOG b/CHANGELOG index f64841b1..d528ef86 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -141,6 +141,9 @@ HISTORY ++ Bugfixes: + 2010-03-06: Simon Goldschmidt + * ipv4/ip.c: Don't try to forward link-local addresses + 2010-03-06: Simon Goldschmidt * etharp.c: Fixed bug #29087: etharp: don't send packets for LinkLocal- addresses to gw diff --git a/src/core/ipv4/ip.c b/src/core/ipv4/ip.c index fdd7bf6c..57c8f552 100644 --- a/src/core/ipv4/ip.c +++ b/src/core/ipv4/ip.c @@ -122,6 +122,15 @@ ip_forward(struct pbuf *p, struct ip_hdr *iphdr, struct netif *inp) PERF_START; dest = iphdr->dest; + + /* RFC3927 2.7: do not forward link-local addresses */ + if (ip_addr_islinklocal(&dest)) { + LWIP_DEBUGF(IP_DEBUG, ("ip_forward: not forwarding LLA %"U16_F".%"U16_F".%"U16_F".%"U16_F"\n", + ip4_addr1_16(&dest), ip4_addr2_16(&dest), ip4_addr3_16(&dest), ip4_addr4_16(&dest))); + snmp_inc_ipoutnoroutes(); + return (struct netif *)NULL; + } + /* Find network interface where to forward this IP packet to. */ netif = ip_route(&dest); if (netif == NULL) {