summaryrefslogtreecommitdiff
path: root/nest/iface.c
diff options
context:
space:
mode:
Diffstat (limited to 'nest/iface.c')
-rw-r--r--nest/iface.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/nest/iface.c b/nest/iface.c
index 740c1878..c49ad95e 100644
--- a/nest/iface.c
+++ b/nest/iface.c
@@ -171,6 +171,8 @@ if_enqueue_notify_to(struct iface_notification x, struct iface_subscription *s)
struct iface_notification *in = sl_alloc(iface_sub_slab);
*in = x;
+ debug("Enqueue notify %d/%p (%p) to %p\n", x.type, x.a, in, s);
+
ifnot_add_tail(&s->queue, in);
ev_schedule(&s->event);
}
@@ -458,6 +460,7 @@ iface_notify_hook(void *_s)
while (!EMPTY_TLIST(ifnot, &s->queue))
{
struct iface_notification *n = THEAD(ifnot, &s->queue);
+ debug("Process notify %d/%p (%p) to %p\n", n->type, n->a, n, s);
switch (n->type) {
case IFNOT_ADDRESS:
ifa_send_notify(s, n->flags, n->a);
@@ -525,6 +528,7 @@ iface_unsubscribe(struct iface_subscription *s)
WALK_TLIST_DELSAFE(ifnot, n, &s->queue)
{
+ debug("Drop notify %d/%p (%p) to %p\n", n->type, n->a, n, s);
switch (n->type)
{
case IFNOT_ADDRESS:
@@ -790,7 +794,10 @@ ifa_delete(struct ifa *a)
void ifa_link(struct ifa *a)
{
if (a)
+ {
+ debug("ifa_link: %p %d\n", a, a->uc);
a->uc++;
+ }
}
void ifa_unlink(struct ifa *a)
@@ -798,10 +805,14 @@ void ifa_unlink(struct ifa *a)
if (!a)
return;
+ debug("ifa_unlink: %p %d\n", a, a->uc);
if (--a->uc)
return;
if_unlink(a->iface);
+#if DEBUGGING
+ memset(a, 0x5b, sizeof(struct ifa));
+#endif
mb_free(a);
}