diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/ospfd/printconf.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/ospfd/printconf.c b/usr.sbin/ospfd/printconf.c index 516d45d504d..fa5536c1f99 100644 --- a/usr.sbin/ospfd/printconf.c +++ b/usr.sbin/ospfd/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.16 2013/03/06 15:43:23 sthen Exp $ */ +/* $OpenBSD: printconf.c,v 1.17 2016/11/19 12:46:46 sthen Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -76,24 +76,27 @@ print_redistribute(struct redist_list *rlh) SIMPLEQ_FOREACH(r, rlh, entry) { switch (r->type & ~REDIST_NO) { case REDIST_STATIC: - printf("%sredistribute static\n", print_no(r->type)); + printf("%sredistribute static ", print_no(r->type)); break; case REDIST_CONNECTED: - printf("%sredistribute connected\n", print_no(r->type)); + printf("%sredistribute connected ", print_no(r->type)); break; case REDIST_LABEL: - printf("%sredistribute rtlabel %s\n", + printf("%sredistribute rtlabel %s ", print_no(r->type), rtlabel_id2name(r->label)); break; case REDIST_ADDR: - printf("%sredistribute %s/%d\n", + printf("%sredistribute %s/%d ", print_no(r->type), inet_ntoa(r->addr), mask2prefixlen(r->mask.s_addr)); break; case REDIST_DEFAULT: - printf("%sredistribute default\n", print_no(r->type)); + printf("%sredistribute default ", print_no(r->type)); break; } + printf("set { metric %d type %d }\n", + (r->metric & LSA_METRIC_MASK), + ((r->metric & LSA_ASEXT_E_FLAG) == 0 ? 1 : 2)); } } |