mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-07-05 04:18:49 +00:00
fixed bug #26507: "Gratuitous ARP depends on arp_table / uses etharp_query" by adding etharp_gratuitous()
This commit is contained in:
parent
078e2f60d6
commit
30acd1662d
|
@ -109,6 +109,10 @@ HISTORY
|
||||||
|
|
||||||
++ Bugfixes:
|
++ Bugfixes:
|
||||||
|
|
||||||
|
2009-05-12 Simon Goldschmidt
|
||||||
|
* etharp.h, etharp.c, netif.c: fixed bug #26507: "Gratuitous ARP depends on
|
||||||
|
arp_table / uses etharp_query" by adding etharp_gratuitous()
|
||||||
|
|
||||||
2009-05-12 Simon Goldschmidt
|
2009-05-12 Simon Goldschmidt
|
||||||
* ip.h, ip.c, igmp.c: bug #26487: Added ip_output_if_opt that can add IP options
|
* ip.h, ip.c, igmp.c: bug #26487: Added ip_output_if_opt that can add IP options
|
||||||
to the IP header (used by igmp_ip_output_if)
|
to the IP header (used by igmp_ip_output_if)
|
||||||
|
|
|
@ -401,13 +401,9 @@ void netif_set_up(struct netif *netif)
|
||||||
NETIF_STATUS_CALLBACK(netif);
|
NETIF_STATUS_CALLBACK(netif);
|
||||||
|
|
||||||
#if LWIP_ARP
|
#if LWIP_ARP
|
||||||
/** For Ethernet network interfaces, we would like to send a
|
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
|
||||||
* "gratuitous ARP"; this is an ARP packet sent by a node in order
|
|
||||||
* to spontaneously cause other nodes to update an entry in their
|
|
||||||
* ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.
|
|
||||||
*/
|
|
||||||
if (netif->flags & NETIF_FLAG_ETHARP) {
|
if (netif->flags & NETIF_FLAG_ETHARP) {
|
||||||
etharp_query(netif, &(netif->ip_addr), NULL);
|
etharp_gratuitous(netif);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_ARP */
|
#endif /* LWIP_ARP */
|
||||||
|
|
||||||
|
@ -464,13 +460,9 @@ void netif_set_link_up(struct netif *netif )
|
||||||
netif->flags |= NETIF_FLAG_LINK_UP;
|
netif->flags |= NETIF_FLAG_LINK_UP;
|
||||||
|
|
||||||
#if LWIP_ARP
|
#if LWIP_ARP
|
||||||
/** For Ethernet network interfaces, we would like to send a
|
/* For Ethernet network interfaces, we would like to send a "gratuitous ARP" */
|
||||||
* "gratuitous ARP"; this is an ARP packet sent by a node in order
|
|
||||||
* to spontaneously cause other nodes to update an entry in their
|
|
||||||
* ARP cache. From RFC 3220 "IP Mobility Support for IPv4" section 4.6.
|
|
||||||
*/
|
|
||||||
if (netif->flags & NETIF_FLAG_ETHARP) {
|
if (netif->flags & NETIF_FLAG_ETHARP) {
|
||||||
etharp_query(netif, &(netif->ip_addr), NULL);
|
etharp_gratuitous(netif);
|
||||||
}
|
}
|
||||||
#endif /* LWIP_ARP */
|
#endif /* LWIP_ARP */
|
||||||
|
|
||||||
|
|
|
@ -151,6 +151,11 @@ void etharp_arp_input(struct netif *netif, struct eth_addr *ethaddr,
|
||||||
err_t etharp_output(struct netif *netif, struct pbuf *q, struct ip_addr *ipaddr);
|
err_t etharp_output(struct netif *netif, struct pbuf *q, struct ip_addr *ipaddr);
|
||||||
err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q);
|
err_t etharp_query(struct netif *netif, struct ip_addr *ipaddr, struct pbuf *q);
|
||||||
err_t etharp_request(struct netif *netif, struct ip_addr *ipaddr);
|
err_t etharp_request(struct netif *netif, struct ip_addr *ipaddr);
|
||||||
|
/** For Ethernet network interfaces, we might want to send "gratuitous ARP";
|
||||||
|
* this is an ARP packet sent by a node in order to spontaneously cause other
|
||||||
|
* nodes to update an entry in their ARP cache.
|
||||||
|
* From RFC 3220 "IP Mobility Support for IPv4" section 4.6. */
|
||||||
|
#define etharp_gratuitous(netif) etharp_request((netif), &(netif)->ip_addr)
|
||||||
|
|
||||||
err_t ethernet_input(struct pbuf *p, struct netif *netif);
|
err_t ethernet_input(struct pbuf *p, struct netif *netif);
|
||||||
|
|
||||||
|
|
|
@ -8,8 +8,7 @@
|
||||||
*
|
*
|
||||||
* This implementation complies with RFC 826 (Ethernet ARP). It supports
|
* This implementation complies with RFC 826 (Ethernet ARP). It supports
|
||||||
* Gratuitious ARP from RFC3220 (IP Mobility Support for IPv4) section 4.6
|
* Gratuitious ARP from RFC3220 (IP Mobility Support for IPv4) section 4.6
|
||||||
* if an interface calls etharp_query(our_netif, its_ip_addr, NULL) upon
|
* if an interface calls etharp_gratuitous(our_netif) upon address change.
|
||||||
* address change.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
Loading…
Reference in New Issue
Block a user