]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
OSPF: Do not use igp_metric as default for OSPF metric
authorOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 21 Apr 2019 11:12:07 +0000 (13:12 +0200)
committerOndrej Zajicek (work) <santiago@crfreenet.org>
Sun, 21 Apr 2019 11:12:07 +0000 (13:12 +0200)
proto/ospf/ospf.c

index f4b4678176e1b5e83f940c346f7b7f9d2fe205b1..2e5e8affbd3a62b1fe6890f7adfcda4b76f7e750 100644 (file)
@@ -467,15 +467,14 @@ ospf_import_control(struct proto *P, rte **new, ea_list **attrs, struct linpool
     return -1;                 /* Do not export routes to stub areas */
 
   ea_list *ea = e->attrs->eattrs;
-  u32 m0 = ea_get_int(ea, EA_GEN_IGP_METRIC, LSINFINITY);
-  u32 m1 = MIN(m0, LSINFINITY);
+  u32 m1 = LSINFINITY;
   u32 m2 = 10000;
   u32 tag = 0;
 
   /* Hack for setting attributes directly in static protocol */
   if (e->attrs->source == RTS_STATIC)
   {
-    m1 = ea_get_int(ea, EA_OSPF_METRIC1, m1);
+    m1 = ea_get_int(ea, EA_OSPF_METRIC1, LSINFINITY);
     m2 = ea_get_int(ea, EA_OSPF_METRIC2, 10000);
     tag = ea_get_int(ea, EA_OSPF_TAG, 0);
   }