diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-03-15 09:54:55 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2019-03-15 09:54:55 +0000 |
commit | 88a70d09581d498eab51f838824a9e6885245903 (patch) | |
tree | 68be4a0a7502458d796661822e8295259f6b3eff /usr.sbin/bgpd/printconf.c | |
parent | ace2a0ead8129749e6be405252844ba3fcaf56b3 (diff) |
Set all default values in init_config in parse.y and remove the special
ones in session.c. Adjust printconfig a bit to only show non default values
and move mrt_mergeconfig into merge_conifg where it kind of belongs.
OK benno@
Diffstat (limited to 'usr.sbin/bgpd/printconf.c')
-rw-r--r-- | usr.sbin/bgpd/printconf.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/usr.sbin/bgpd/printconf.c b/usr.sbin/bgpd/printconf.c index 80f733a5f2a..51019f1ecea 100644 --- a/usr.sbin/bgpd/printconf.c +++ b/usr.sbin/bgpd/printconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: printconf.c,v 1.132 2019/02/26 10:49:15 claudio Exp $ */ +/* $OpenBSD: printconf.c,v 1.133 2019/03/15 09:54:54 claudio Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -378,11 +378,11 @@ print_mainconf(struct bgpd_config *conf) printf("socket \"%s\"\n", conf->csock); if (conf->rcsock) printf("socket \"%s\" restricted\n", conf->rcsock); - if (conf->holdtime) + if (conf->holdtime != INTERVAL_HOLD) printf("holdtime %u\n", conf->holdtime); - if (conf->min_holdtime) + if (conf->min_holdtime != MIN_HOLDTIME) printf("holdtime min %u\n", conf->min_holdtime); - if (conf->connectretry) + if (conf->connectretry != INTERVAL_CONNECTRETRY) printf("connect-retry %u\n", conf->connectretry); if (conf->flags & BGPD_FLAG_NO_EVALUATE) @@ -405,8 +405,9 @@ print_mainconf(struct bgpd_config *conf) printf("nexthop qualify via bgp\n"); if (conf->flags & BGPD_FLAG_NEXTHOP_DEFAULT) printf("nexthop qualify via default\n"); - printf("fib-priority %hhu", conf->fib_priority); - printf("\n\n"); + if (conf->fib_priority != RTP_BGP) + printf("fib-priority %hhu\n", conf->fib_priority); + printf("\n"); } void @@ -732,7 +733,8 @@ print_announce(struct peer_config *p, const char *c) printf("%s\tannounce %s\n", c, aid2str(aid)); } -void print_as(struct filter_rule *r) +void +print_as(struct filter_rule *r) { if (r->match.as.flags & AS_FLAG_AS_SET_NAME) { printf("as-set \"%s\" ", r->match.as.name); |