Tidy up RA scheduling.

This commit is contained in:
Simon Kelley
2012-02-25 13:09:18 +00:00
parent 96f6979c4f
commit 741c2952d4
4 changed files with 8 additions and 2 deletions

View File

@@ -831,6 +831,11 @@ static void sig_handler(int sig)
}
}
void send_alarm(void)
{
send_event(pipewrite, EVENT_ALARM, 0, NULL);
}
void send_event(int fd, int event, int data, char *msg)
{
struct event_desc ev;

View File

@@ -967,6 +967,7 @@ unsigned char *extended_hwaddr(int hwtype, int hwlen, unsigned char *hwaddr,
int make_icmp_sock(void);
int icmp_ping(struct in_addr addr);
#endif
void send_alarm(void);
void send_event(int fd, int event, int data, char *msg);
void clear_cache_and_reload(time_t now);
void poll_resolv(int force, int do_reload, time_t now);

View File

@@ -348,7 +348,7 @@ static void nl_routechange(struct nlmsghdr *h)
ra_start_unsolicted(dnsmasq_time());
/* cause lease_update_file to run after we return, in case we were called from
iface_enumerate and can't re-enter it now */
alarm(1);
send_alarm();
}
#endif

View File

@@ -399,7 +399,7 @@ static int iface_search(struct in6_addr *local, int prefix,
int scope, int if_index, int dad, void *vparam)
{
struct search_param *param = vparam;
struct dhcp_context *context, *tmp;
struct dhcp_context *context;
(void)scope;
(void)dad;