ospf6d: add "auto-cost reference-bandwidth" command

This command allows the user to change to default reference bandwidth
for cost calculations. The default value is 100 Mbps. With a default
bandwidth of 10 MBps, the default cost becomes 10. Those values are
consistent with OSPFv2.

[DL: resolved conflicts in vty command additions & docs]
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
diff --git a/ospf6d/ospf6_top.c b/ospf6d/ospf6_top.c
index 7c0922a..7191270 100644
--- a/ospf6d/ospf6_top.c
+++ b/ospf6d/ospf6_top.c
@@ -148,6 +148,8 @@
 
   o->external_id_table = route_table_init ();
 
+  o->ref_bandwidth = OSPF6_REFERENCE_BANDWIDTH;
+
   return o;
 }
 
@@ -890,6 +892,10 @@
       vty_out(vty, "%s", VTY_NEWLINE);
     }
 
+  if (ospf6->ref_bandwidth != OSPF6_REFERENCE_BANDWIDTH)
+    vty_out (vty, " auto-cost reference-bandwidth %d%s", ospf6->ref_bandwidth / 1000,
+             VNL);
+
   ospf6_stub_router_config_write (vty);
   ospf6_redistribute_config_write (vty);
   ospf6_area_config_write (vty);