mirror of
https://github.com/rsmarples/dhcpcd.git
synced 2024-11-27 20:14:15 +08:00
ELOOP_QUEUE 0 is now all queues
This allows DHCPv6 and IPv6RS to remove DAD callbacks from the IPv6NS queue.
This commit is contained in:
parent
5fe587be91
commit
e6ca60eea6
4
dhcp6.c
4
dhcp6.c
@ -44,7 +44,7 @@
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define ELOOP_QUEUE 2
|
||||
#define ELOOP_QUEUE 3
|
||||
|
||||
#include "config.h"
|
||||
#include "common.h"
|
||||
@ -608,7 +608,7 @@ dhcp6_freedrop_addrs(struct interface *ifp, int drop)
|
||||
while ((ap = TAILQ_FIRST(&state->addrs))) {
|
||||
TAILQ_REMOVE(&state->addrs, ap, next);
|
||||
if (ap->dadcallback)
|
||||
eloop_timeout_delete(NULL, ap->dadcallback);
|
||||
eloop_q_timeout_delete(0, NULL, ap->dadcallback);
|
||||
/* Only drop the address if no other RAs have assigned it.
|
||||
* This is safe because the RA is removed from the list
|
||||
* before we are called. */
|
||||
|
2
eloop.c
2
eloop.c
@ -244,7 +244,7 @@ eloop_q_timeouts_delete_v(int queue, void *arg,
|
||||
void (*f)(void *);
|
||||
|
||||
TAILQ_FOREACH_SAFE(t, &timeouts, next, tt) {
|
||||
if (t->queue == queue && t->arg == arg &&
|
||||
if ((queue == 0 || t->queue == queue) && t->arg == arg &&
|
||||
t->callback != callback)
|
||||
{
|
||||
va_copy(va, v);
|
||||
|
2
eloop.h
2
eloop.h
@ -32,7 +32,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#ifndef ELOOP_QUEUE
|
||||
#define ELOOP_QUEUE 0
|
||||
#define ELOOP_QUEUE 1
|
||||
#endif
|
||||
|
||||
#define eloop_timeout_add_tv(a, b, c) \
|
||||
|
2
ipv6ns.c
2
ipv6ns.c
@ -46,7 +46,7 @@
|
||||
# include <linux/ipv6.h>
|
||||
#endif
|
||||
|
||||
#define ELOOP_QUEUE 1
|
||||
#define ELOOP_QUEUE 2
|
||||
#include "common.h"
|
||||
#include "dhcpcd.h"
|
||||
#include "dhcp6.h"
|
||||
|
4
ipv6rs.c
4
ipv6rs.c
@ -45,7 +45,7 @@
|
||||
#include <syslog.h>
|
||||
#include <unistd.h>
|
||||
|
||||
#define ELOOP_QUEUE 1
|
||||
#define ELOOP_QUEUE 2
|
||||
#include "common.h"
|
||||
#include "dhcpcd.h"
|
||||
#include "dhcp6.h"
|
||||
@ -306,7 +306,7 @@ ipv6rs_freedrop_addrs(struct ra *rap, int drop)
|
||||
while ((ap = TAILQ_FIRST(&rap->addrs))) {
|
||||
TAILQ_REMOVE(&rap->addrs, ap, next);
|
||||
if (ap->dadcallback)
|
||||
eloop_timeout_delete(NULL, ap->dadcallback);
|
||||
eloop_q_timeout_delete(0, NULL, ap->dadcallback);
|
||||
/* Only drop the address if no other RAs have assigned it.
|
||||
* This is safe because the RA is removed from the list
|
||||
* before we are called. */
|
||||
|
Loading…
Reference in New Issue
Block a user