diff options
Diffstat (limited to 'usr.sbin/ldpd/lde_lib.c')
-rw-r--r-- | usr.sbin/ldpd/lde_lib.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/ldpd/lde_lib.c b/usr.sbin/ldpd/lde_lib.c index a6022a83dd5..7a4b319c685 100644 --- a/usr.sbin/ldpd/lde_lib.c +++ b/usr.sbin/ldpd/lde_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lde_lib.c,v 1.6 2009/09/28 09:48:46 michele Exp $ */ +/* $OpenBSD: lde_lib.c,v 1.7 2010/01/02 14:56:02 michele Exp $ */ /* * Copyright (c) 2009 Michele Marchetto <michele@openbsd.org> @@ -111,9 +111,6 @@ rt_dump(pid_t pid) static struct ctl_rt rtctl; RB_FOREACH(r, rt_tree, &rt) { - if (!r->present) - continue; - rtctl.prefix.s_addr = r->prefix.s_addr; rtctl.prefixlen = r->prefixlen; rtctl.nexthop.s_addr = r->nexthop.s_addr; @@ -121,6 +118,11 @@ rt_dump(pid_t pid) rtctl.local_label = r->local_label; rtctl.remote_label = r->remote_label; + if (!r->present) + rtctl.in_use = 0; + else + rtctl.in_use = 1; + if (rtctl.nexthop.s_addr == htonl(INADDR_LOOPBACK)) rtctl.connected = 1; else |