mirror of
https://gitlab.nic.cz/labs/bird.git
synced 2025-03-21 22:07:03 +00:00
OSPF: Do not use igp_metric as default for OSPF metric
This commit is contained in:
parent
9b73157ea1
commit
3cd20658e2
@ -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 */
|
return -1; /* Do not export routes to stub areas */
|
||||||
|
|
||||||
ea_list *ea = e->attrs->eattrs;
|
ea_list *ea = e->attrs->eattrs;
|
||||||
u32 m0 = ea_get_int(ea, EA_GEN_IGP_METRIC, LSINFINITY);
|
u32 m1 = LSINFINITY;
|
||||||
u32 m1 = MIN(m0, LSINFINITY);
|
|
||||||
u32 m2 = 10000;
|
u32 m2 = 10000;
|
||||||
u32 tag = 0;
|
u32 tag = 0;
|
||||||
|
|
||||||
/* Hack for setting attributes directly in static protocol */
|
/* Hack for setting attributes directly in static protocol */
|
||||||
if (e->attrs->source == RTS_STATIC)
|
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);
|
m2 = ea_get_int(ea, EA_OSPF_METRIC2, 10000);
|
||||||
tag = ea_get_int(ea, EA_OSPF_TAG, 0);
|
tag = ea_get_int(ea, EA_OSPF_TAG, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user