mirror of
http://thekelleys.org.uk/git/dnsmasq.git
synced 2026-11-01 13:20:36 +00:00
Handle async notification of address changes using the event system.
This commit is contained in:
1 parent
a03f8d4c37
commit
a0358e5ddb
7 files changed
+35
-54
No files matched your search
@@ -376,7 +376,7 @@ void route_init(void)
|
||||
die(_("cannot create PF_ROUTE socket: %s"), NULL, EC_BADNET);
|
||||
}
|
||||
|
||||
void route_sock(time_t now)
|
||||
void route_sock(void)
|
||||
{
|
||||
struct if_msghdr *msg;
|
||||
int rc = recv(daemon->routefd, daemon->packet, daemon->packet_buff_sz, 0);
|
||||
@@ -401,7 +401,7 @@ void route_sock(time_t now)
|
||||
else if (msg->ifm_type == RTM_NEWADDR)
|
||||
{
|
||||
del_family = 0;
|
||||
newaddress(now);
|
||||
send_newaddr();
|
||||
}
|
||||
else if (msg->ifm_type == RTM_DELADDR)
|
||||
{
|
||||
@@ -439,7 +439,7 @@ void route_sock(time_t now)
|
||||
of += sizeof(long) - (diff & (sizeof(long) - 1));
|
||||
}
|
||||
|
||||
newaddress(now);
|
||||
send_newaddr();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user