From: Ondrej Zajicek (work) Date: Sun, 21 Apr 2019 11:12:07 +0000 (+0200) Subject: OSPF: Do not use igp_metric as default for OSPF metric X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3cd20658e2fe8c95932f064621162fabe6a90bfe;p=thirdparty%2Fbird.git OSPF: Do not use igp_metric as default for OSPF metric --- diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index f4b467817..2e5e8affb 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -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); }