summaryrefslogtreecommitdiff
path: root/ospf6d/ospf6_interface.c
diff options
context:
space:
mode:
authorVyacheslav Trushkin <me@dogonthesun.net>2012-02-10 10:42:45 +0400
committerDenis Ovsienko <infrastation@yandex.ru>2012-02-21 21:45:42 +0400
commitb51a3a31500133e3e26f12e7639f297c655bc735 (patch)
tree07bf18aeaace7f07736caf8016082e47e0f10a0c /ospf6d/ospf6_interface.c
parentef2d5d100431031c32ea35b3c834b46cff16f511 (diff)
ospf6d: remove defaults from iface config (BZ#550)
Diffstat (limited to 'ospf6d/ospf6_interface.c')
-rw-r--r--ospf6d/ospf6_interface.c59
1 files changed, 36 insertions, 23 deletions
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",