diff options
author | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-07-23 12:21:36 +0000 |
---|---|---|
committer | Pierre-Yves Ritschard <pyr@cvs.openbsd.org> | 2007-07-23 12:21:36 +0000 |
commit | 56359d0feac7f4426d00a614ae5560a81827b938 (patch) | |
tree | 18ecaf1eef032fa8e4a97f2d5be2f03c0e490db1 | |
parent | 5ee7d68df3b0e4b2b33416491c551bc719de1a65 (diff) |
when multipath routes exist, display them in ospfctl sh fib output.
ok claudio@
-rw-r--r-- | usr.sbin/ospfd/kroute.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/kroute.c b/usr.sbin/ospfd/kroute.c index 75880197eeb..b853cde88cd 100644 --- a/usr.sbin/ospfd/kroute.c +++ b/usr.sbin/ospfd/kroute.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kroute.c,v 1.51 2007/06/19 16:45:15 reyk Exp $ */ +/* $OpenBSD: kroute.c,v 1.52 2007/07/23 12:21:35 pyr Exp $ */ /* * Copyright (c) 2004 Esben Norby <norby@openbsd.org> @@ -320,6 +320,7 @@ void kr_show_route(struct imsg *imsg) { struct kroute_node *kr; + struct kroute_node *kn; int flags; struct in_addr addr; @@ -332,8 +333,12 @@ kr_show_route(struct imsg *imsg) memcpy(&flags, imsg->data, sizeof(flags)); RB_FOREACH(kr, kroute_tree, &krt) if (!flags || kr->r.flags & flags) { - main_imsg_compose_ospfe(IMSG_CTL_KROUTE, - imsg->hdr.pid, &kr->r, sizeof(kr->r)); + kn = kr; + do { + main_imsg_compose_ospfe(IMSG_CTL_KROUTE, + imsg->hdr.pid, + &kn->r, sizeof(kn->r)); + } while ((kn = kn->next) != NULL); } break; case IMSG_CTL_KROUTE_ADDR: |