diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2010-08-02 13:11:53 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2010-08-02 13:11:53 +0200 |
commit | ba5e5940aa1f11128c76a3964823bda22e47ab04 (patch) | |
tree | 7bd7dc426fb1d3ee2b940d981159fdf9780883ec /proto/ospf | |
parent | d395fe48553062413a85fd04cda0752f933e70c6 (diff) |
Adds igp_metric attribute.
Diffstat (limited to 'proto/ospf')
-rw-r--r-- | proto/ospf/ospf.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c index 316d7292..e1ba96a4 100644 --- a/proto/ospf/ospf.c +++ b/proto/ospf/ospf.c @@ -467,7 +467,11 @@ ospf_import_control(struct proto *p, rte ** new, ea_list ** attrs, if (p == e->attrs->proto) return -1; /* Reject our own routes */ - *attrs = ospf_build_attrs(*attrs, pool, LSINFINITY, 10000, 0, 0); + + eattr *ea = ea_find(e->attrs->eattrs, EA_GEN_IGP_METRIC); + u32 m1 = (ea && (ea->u.data < LSINFINITY)) ? ea->u.data : LSINFINITY; + + *attrs = ospf_build_attrs(*attrs, pool, m1, 10000, 0, 0); return 0; /* Leave decision to the filters */ } |