mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-04 13:48:30 +00:00
Compare commits
1
Commits
v2.76test2
...
v2.76test4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d917275e48 |
@@ -110,7 +110,7 @@ static int filter_mac(int family, char *addrp, char *mac, size_t maclen, void *p
|
|||||||
/* If in lazy mode, we cache absence of ARP entries. */
|
/* If in lazy mode, we cache absence of ARP entries. */
|
||||||
int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
|
int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
|
||||||
{
|
{
|
||||||
struct arp_record *arp, **up;
|
struct arp_record *arp, *tmp, **up;
|
||||||
int updated = 0;
|
int updated = 0;
|
||||||
|
|
||||||
again:
|
again:
|
||||||
@@ -155,16 +155,20 @@ int find_mac(union mysockaddr *addr, unsigned char *mac, int lazy, time_t now)
|
|||||||
iface_enumerate(AF_UNSPEC, NULL, filter_mac);
|
iface_enumerate(AF_UNSPEC, NULL, filter_mac);
|
||||||
|
|
||||||
/* Remove all unconfirmed entries to old list. */
|
/* Remove all unconfirmed entries to old list. */
|
||||||
for (arp = arps, up = &arps; arp; arp = arp->next)
|
for (arp = arps, up = &arps; arp; arp = tmp)
|
||||||
if (arp->status == ARP_MARK)
|
{
|
||||||
{
|
tmp = arp->next;
|
||||||
*up = arp->next;
|
|
||||||
arp->next = old;
|
|
||||||
old = arp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
up = &arp->next;
|
|
||||||
|
|
||||||
|
if (arp->status == ARP_MARK)
|
||||||
|
{
|
||||||
|
*up = arp->next;
|
||||||
|
arp->next = old;
|
||||||
|
old = arp;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
up = &arp->next;
|
||||||
|
}
|
||||||
|
|
||||||
goto again;
|
goto again;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user