summaryrefslogtreecommitdiff
path: root/usr.sbin/ldpd/adjacency.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/ldpd/adjacency.c')
-rw-r--r--usr.sbin/ldpd/adjacency.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/usr.sbin/ldpd/adjacency.c b/usr.sbin/ldpd/adjacency.c
index 726ea5a5cea..07ac2e42fe0 100644
--- a/usr.sbin/ldpd/adjacency.c
+++ b/usr.sbin/ldpd/adjacency.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adjacency.c,v 1.2 2013/10/15 20:13:47 renato Exp $ */
+/* $OpenBSD: adjacency.c,v 1.3 2013/10/15 20:21:24 renato Exp $ */
/*
* Copyright (c) 2009 Michele Marchetto <michele@openbsd.org>
@@ -77,7 +77,7 @@ void
adj_del(struct adj *adj)
{
log_debug("adj_del: LSR ID %s, %s", inet_ntoa(adj->nbr->id),
- print_hello_src(&adj->source));
+ print_hello_src(&adj->source));
adj_stop_itimer(adj);
@@ -120,14 +120,18 @@ print_hello_src(struct hello_source *src)
{
static char buffer[64];
- if (src->type == HELLO_LINK)
+ switch (src->type) {
+ case HELLO_LINK:
snprintf(buffer, sizeof(buffer), "iface %s",
src->link.iface->name);
- else
+ break;
+ case HELLO_TARGETED:
snprintf(buffer, sizeof(buffer), "source %s",
inet_ntoa(src->target->addr));
+ break;
+ }
- return buffer;
+ return (buffer);
}
/* adjacency timers */