Fixed bug #29087: etharp: don't send packets for LinkLocal-addresses to gw

This commit is contained in:
goldsimon 2010-03-06 09:33:17 +00:00
parent 464950d51e
commit fcf6434b4b
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -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 */