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:
Roy Marples 2013-05-16 14:42:18 +00:00
parent 5fe587be91
commit e6ca60eea6
5 changed files with 7 additions and 7 deletions

View File

@ -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. */

View File

@ -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);

View File

@ -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) \

View File

@ -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"

View File

@ -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. */