diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-06-09 15:32:04 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2005-06-09 15:32:04 +0000 |
commit | 3085c38a438ec535c75962325f24bc5a8c5755f1 (patch) | |
tree | 333d1cab45c6f4437a3f562800729293d08d2ea1 /usr.sbin/bgpd/printconf.c | |
parent | 6542c3062e9b26b2f2d0e84d72c04a9440874aa9 (diff) |
Change the "network connected|static" statements to "network inet|inet6
connected|static" so that it is possible to distinguish between IPv4 and IPv6
addresses. "network connected|static" is considered deprecated but will be
supported as an alias for "network inet connected|static" for some time (one
release) to simplify upgrades. This also solve a nasty crash when using
"network connected". OK henning@
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-rw-r--r-- | usr.sbin/bgpd/printconf.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c index dc61d881ccf..51e4076a0ba 100644 --- a/usr.sbin/bgpd/printconf.c +++ b/usr.sbin/bgpd/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.41 2005/04/28 13:54:45 claudio Exp $ */ +/* $OpenBSD: printconf.c,v 1.42 2005/06/09 15:32:03 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -167,19 +167,33 @@ print_mainconf(struct bgpd_config *conf) log_sockaddr((struct sockaddr *)&la->sa)); if (conf->flags & BGPD_FLAG_REDIST_CONNECTED) { - printf("network connected"); + printf("network inet connected"); if (!SIMPLEQ_EMPTY(&conf->connectset)) printf(" "); print_set(&conf->connectset); printf("\n"); } if (conf->flags & BGPD_FLAG_REDIST_STATIC) { - printf("network static"); + printf("network inet static"); if (!SIMPLEQ_EMPTY(&conf->staticset)) printf(" "); print_set(&conf->staticset); printf("\n"); } + if (conf->flags & BGPD_FLAG_REDIST6_CONNECTED) { + printf("network inet6 connected"); + if (!SIMPLEQ_EMPTY(&conf->connectset6)) + printf(" "); + print_set(&conf->connectset6); + printf("\n"); + } + if (conf->flags & BGPD_FLAG_REDIST_STATIC) { + printf("network inet6 static"); + if (!SIMPLEQ_EMPTY(&conf->staticset6)) + printf(" "); + print_set(&conf->staticset6); + printf("\n"); + } } void |