Reset prevoiusly configured distance command options
if user enters new (different) parameters.
Ticket:CM-19635
Testing Done:
R1(config-router)# distance ospf intra-area 45 external 45
R1# show running-config ospfd
router ospf
distance ospf intra-area 45 external 45
R1(config-router)# distance ospf inter-area 45
R1# show running-config ospfd
router ospf
distance ospf inter-area 45
Signed-off-by: Chirag Shah <chirag@cumulusnetworks.com>
VTY_DECLVAR_INSTANCE_CONTEXT(ospf, ospf);
int idx = 0;
+ ospf->distance_intra = 0;
+ ospf->distance_inter = 0;
+ ospf->distance_external = 0;
+
if (argv_find(argv, argc, "intra-area", &idx))
ospf->distance_intra = atoi(argv[idx + 1]->arg);
idx = 0;