diff options
author | 2016-12-24 14:58:55 +0000 | |
---|---|---|
committer | 2016-12-24 14:58:55 +0000 | |
commit | 2f702e70b0ad6f8770b14cdc1768898e48c07d15 (patch) | |
tree | c18f4eeb1722d16bf9eb90f26f4b7776c3a9f131 | |
parent | Correctly handle tls_read()/tls_write(). (diff) | |
download | wireguard-openbsd-2f702e70b0ad6f8770b14cdc1768898e48c07d15.tar.xz wireguard-openbsd-2f702e70b0ad6f8770b14cdc1768898e48c07d15.zip |
Print metric and type for "redistribute" in ospf6d -v.
Similar diff as for ospfd, from Remi Locherer. ok stsp@
-rw-r--r-- | usr.sbin/ospf6d/printconf.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/usr.sbin/ospf6d/printconf.c b/usr.sbin/ospf6d/printconf.c index 9f8f5f29fb4..17a0ac11dbc 100644 --- a/usr.sbin/ospf6d/printconf.c +++ b/usr.sbin/ospf6d/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.4 2010/08/22 21:15:25 bluhm Exp $ */ +/* $OpenBSD: printconf.c,v 1.5 2016/12/24 14:58:55 jca Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -72,24 +72,27 @@ print_redistribute(struct ospfd_conf *conf) SIMPLEQ_FOREACH(r, &conf->redist_list, 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), log_in6addr(&r->addr), r->prefixlen); 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)); } } |