mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-08-09 17:13:49 +08:00
autoip.c, etharp.c: ip_addr.h: Integrate patch #6348: "Broadcast ARP packets in autoip". The change in etharp_raw could be removed, since all calls to etharp_raw use ethbroadcast for the "ethdst_addr" parameter. But it could be wrong in the future.
This commit is contained in:
@@ -178,17 +178,8 @@ autoip_create_rand_addr(struct netif *netif, struct ip_addr *RandomIPAddr)
|
||||
static err_t
|
||||
autoip_arp_announce(struct netif *netif)
|
||||
{
|
||||
struct eth_addr eth_addr_bc, eth_addr_zero;
|
||||
u8_t k = netif->hwaddr_len;
|
||||
|
||||
while(k > 0) {
|
||||
k--;
|
||||
eth_addr_bc.addr[k] = 0xFF;
|
||||
eth_addr_zero.addr[k] = 0x00;
|
||||
}
|
||||
|
||||
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ð_addr_bc,
|
||||
(struct eth_addr *)netif->hwaddr, &netif->autoip->llipaddr, ð_addr_zero,
|
||||
return etharp_raw(netif, (struct eth_addr *)netif->hwaddr, ðbroadcast,
|
||||
(struct eth_addr *)netif->hwaddr, &netif->autoip->llipaddr, ðzero,
|
||||
&netif->autoip->llipaddr, ARP_REQUEST);
|
||||
}
|
||||
|
||||
@@ -319,7 +310,7 @@ autoip_tmr()
|
||||
netif->autoip->lastconflict--;
|
||||
}
|
||||
|
||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE | 3,
|
||||
LWIP_DEBUGF(AUTOIP_DEBUG | LWIP_DBG_TRACE,
|
||||
("autoip_tmr() AutoIP-State: %"U16_F", ttw=%"U16_F"\n",
|
||||
(u16_t)(netif->autoip->state), netif->autoip->ttw));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user