diff options
author | 2007-02-02 15:53:39 +0000 | |
---|---|---|
committer | 2007-02-02 15:53:39 +0000 | |
commit | 7ed6b38b236485f9809369f3bc5a5b30bd90c867 (patch) | |
tree | 3662840aadab68a960b508fde533e64c7a7ee276 | |
parent | - cope with recent weekly and newsyslog.conf changes (diff) | |
download | wireguard-openbsd-7ed6b38b236485f9809369f3bc5a5b30bd90c867.tar.xz wireguard-openbsd-7ed6b38b236485f9809369f3bc5a5b30bd90c867.zip |
Print neighbor templates with a state of Template. Makes the difference
between templates and real sessions more obvious. OK henning@
-rw-r--r-- | usr.sbin/bgpctl/bgpctl.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/usr.sbin/bgpctl/bgpctl.c b/usr.sbin/bgpctl/bgpctl.c index 5b94122ee5c..d17dc5ab1e8 100644 --- a/usr.sbin/bgpctl/bgpctl.c +++ b/usr.sbin/bgpctl/bgpctl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bgpctl.c,v 1.113 2007/01/27 19:03:07 claudio Exp $ */ +/* $OpenBSD: bgpctl.c,v 1.114 2007/02/02 15:53:39 claudio Exp $ */ /* * Copyright (c) 2003 Henning Brauer <henning@openbsd.org> @@ -423,7 +423,9 @@ show_summary_msg(struct imsg *imsg, int nodescr) printf("%6u", p->stats.prefix_cnt); if (p->conf.max_prefix != 0) printf("/%u", p->conf.max_prefix); - } else + } else if (p->conf.template) + printf("Template"); + else printf("%s", statenames[p->state]); printf("\n"); free(s); @@ -449,7 +451,7 @@ show_summary_terse_msg(struct imsg *imsg, int nodescr) s = fmt_peer(p->conf.descr, &p->conf.remote_addr, p->conf.remote_masklen, nodescr); printf("%s %u %s\n", s, p->conf.remote_as, - statenames[p->state]); + p->conf.template ? "Template" : statenames[p->state]); free(s); break; case IMSG_CTL_END: |