From b51a3a31500133e3e26f12e7639f297c655bc735 Mon Sep 17 00:00:00 2001 From: Vyacheslav Trushkin Date: Fri, 10 Feb 2012 10:42:45 +0400 Subject: ospf6d: remove defaults from iface config (BZ#550) --- ospf6d/ospf6_interface.c | 59 +++++++++++++++++++++++++++++------------------- 1 file changed, 36 insertions(+), 23 deletions(-) (limited to 'ospf6d/ospf6_interface.c') diff --git a/ospf6d/ospf6_interface.c b/ospf6d/ospf6_interface.c index f6420513..71aa6859 100644 --- a/ospf6d/ospf6_interface.c +++ b/ospf6d/ospf6_interface.c @@ -108,14 +108,14 @@ ospf6_interface_create (struct interface *ifp) oi->neighbor_list = list_new (); oi->neighbor_list->cmp = ospf6_neighbor_cmp; oi->linklocal_addr = (struct in6_addr *) NULL; - oi->instance_id = 0; - oi->transdelay = 1; - oi->priority = 1; - - oi->hello_interval = 10; - oi->dead_interval = 40; - oi->rxmt_interval = 5; - oi->cost = 1; + oi->instance_id = OSPF6_INTERFACE_INSTANCE_ID; + oi->transdelay = OSPF6_INTERFACE_TRANSDELAY; + oi->priority = OSPF6_INTERFACE_PRIORITY; + + oi->hello_interval = OSPF6_INTERFACE_HELLO_INTERVAL; + oi->dead_interval = OSPF6_INTERFACE_DEAD_INTERVAL; + oi->rxmt_interval = OSPF6_INTERFACE_RXMT_INTERVAL; + oi->cost = OSPF6_INTERFACE_COST; oi->state = OSPF6_INTERFACE_DOWN; oi->flag = 0; oi->mtu_ignore = 0; @@ -1522,23 +1522,36 @@ config_write_ospf6_interface (struct vty *vty) if (ifp->desc) vty_out (vty, " description %s%s", ifp->desc, VNL); - if (ifp->mtu6 != oi->ifmtu) vty_out (vty, " ipv6 ospf6 ifmtu %d%s", oi->ifmtu, VNL); - vty_out (vty, " ipv6 ospf6 cost %d%s", - oi->cost, VNL); - vty_out (vty, " ipv6 ospf6 hello-interval %d%s", - oi->hello_interval, VNL); - vty_out (vty, " ipv6 ospf6 dead-interval %d%s", - oi->dead_interval, VNL); - vty_out (vty, " ipv6 ospf6 retransmit-interval %d%s", - oi->rxmt_interval, VNL); - vty_out (vty, " ipv6 ospf6 priority %d%s", - oi->priority, VNL); - vty_out (vty, " ipv6 ospf6 transmit-delay %d%s", - oi->transdelay, VNL); - vty_out (vty, " ipv6 ospf6 instance-id %d%s", - oi->instance_id, VNL); + + if (oi->cost != OSPF6_INTERFACE_COST) + vty_out (vty, " ipv6 ospf6 cost %d%s", + oi->cost, VNL); + + if (oi->hello_interval != OSPF6_INTERFACE_HELLO_INTERVAL) + vty_out (vty, " ipv6 ospf6 hello-interval %d%s", + oi->hello_interval, VNL); + + if (oi->dead_interval != OSPF6_INTERFACE_DEAD_INTERVAL) + vty_out (vty, " ipv6 ospf6 dead-interval %d%s", + oi->dead_interval, VNL); + + if (oi->rxmt_interval != OSPF6_INTERFACE_RXMT_INTERVAL) + vty_out (vty, " ipv6 ospf6 retransmit-interval %d%s", + oi->rxmt_interval, VNL); + + if (oi->priority != OSPF6_INTERFACE_PRIORITY) + vty_out (vty, " ipv6 ospf6 priority %d%s", + oi->priority, VNL); + + if (oi->transdelay != OSPF6_INTERFACE_TRANSDELAY) + vty_out (vty, " ipv6 ospf6 transmit-delay %d%s", + oi->transdelay, VNL); + + if (oi->instance_id != OSPF6_INTERFACE_INSTANCE_ID) + vty_out (vty, " ipv6 ospf6 instance-id %d%s", + oi->instance_id, VNL); if (oi->plist_name) vty_out (vty, " ipv6 ospf6 advertise prefix-list %s%s", -- cgit v1.2.1