mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 14:29:39 +00:00
Don't try to forward link-local addresses
This commit is contained in:
parent
4649c14856
commit
5d4438e652
@ -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
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user