summaryrefslogtreecommitdiff
path: root/usr.sbin/ospfd/printconf.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2007-05-29 22:08:26 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2007-05-29 22:08:26 +0000
commite9c1bd19fc1d465ccab245e1368e92d44b983bdc (patch)
treea9302a94e921f736d1fe875b0eeb4cc86954ef70 /usr.sbin/ospfd/printconf.c
parent63cae2374b352a5452a0c84095c31908e2173452 (diff)
Demote support for ospfd. It is possible to specify a demote group on
interfaces and areas. With this carp setups using ospfd are more reliable because we can fail over if the OSPF connectivity is (partially) lost. OK norby@
Diffstat (limited to 'usr.sbin/ospfd/printconf.c')
-rw-r--r--usr.sbin/ospfd/printconf.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ospfd/printconf.c b/usr.sbin/ospfd/printconf.c
index b7f2445e22d..510a7ae87a6 100644
--- a/usr.sbin/ospfd/printconf.c
+++ b/usr.sbin/ospfd/printconf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: printconf.c,v 1.8 2007/03/22 16:00:46 claudio Exp $ */
+/* $OpenBSD: printconf.c,v 1.9 2007/05/29 22:08:25 claudio Exp $ */
/*
* Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org>
@@ -107,6 +107,8 @@ print_iface(struct iface *iface)
if (iface->passive)
printf("\t\tpassive\n");
+ if (*iface->demote_group)
+ printf("\t\tdemote %s\n", iface->demote_group);
printf("\t\tretransmit-interval %d\n", iface->rxmt_interval);
printf("\t\trouter-dead-time %d\n", iface->dead_interval);
@@ -145,6 +147,9 @@ print_config(struct ospfd_conf *conf)
LIST_FOREACH(area, &conf->area_list, entry) {
printf("area %s {\n", inet_ntoa(area->id));
+ if (*area->demote_group)
+ printf("\tdemote %s %d\n", area->demote_group,
+ area->demote_level);
LIST_FOREACH(iface, &area->iface_list, entry) {
print_iface(iface);
}