From fcf6434b4b86e4afd90330713e8ed2fec33e1b9b Mon Sep 17 00:00:00 2001 From: goldsimon Date: Sat, 6 Mar 2010 09:33:17 +0000 Subject: [PATCH] Fixed bug #29087: etharp: don't send packets for LinkLocal-addresses to gw --- CHANGELOG | 4 ++++ src/netif/etharp.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index d4a29031..f64841b1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -141,6 +141,10 @@ HISTORY ++ Bugfixes: + 2010-03-06: Simon Goldschmidt + * etharp.c: Fixed bug #29087: etharp: don't send packets for LinkLocal- + addresses to gw + 2010-03-05: Simon Goldschmidt * dhcp.c: Fixed bug #29072: Correctly set ciaddr based on message-type and state. diff --git a/src/netif/etharp.c b/src/netif/etharp.c index 2f3b60af..f9b0a453 100644 --- a/src/netif/etharp.c +++ b/src/netif/etharp.c @@ -840,7 +840,8 @@ etharp_output(struct netif *netif, struct pbuf *q, ip_addr_t *ipaddr) /* unicast destination IP address? */ } else { /* outside local network? */ - if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask))) { + if (!ip_addr_netcmp(ipaddr, &(netif->ip_addr), &(netif->netmask)) && + !ip_addr_islinklocal(ipaddr)) { /* interface has default gateway? */ if (!ip_addr_isany(&netif->gw)) { /* send to hardware address of default gateway IP address */