summaryrefslogtreecommitdiff
path: root/proto/ospf/ospf.c
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-06-05 18:40:25 +0000
committerMartin Mares <mj@ucw.cz>2000-06-05 18:40:25 +0000
commit8441f179253777b3e4bf3461ac847b33ddb098a4 (patch)
tree334cc78e85a11db5bcb139f5491a837bc802f9b3 /proto/ospf/ospf.c
parentf8032bbdb150221e84f0bd7de825cf3e9f15aa66 (diff)
Unless a filter specifies otherwise, all external routes have type 2
metric 10000.
Diffstat (limited to 'proto/ospf/ospf.c')
-rw-r--r--proto/ospf/ospf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index 30be4597..9bb0388b 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -193,7 +193,7 @@ ospf_import_control(struct proto *p, rte **new, ea_list **attrs, struct linpool
struct proto_ospf *po=(struct proto_ospf *)p;
if(p==e->attrs->proto) return -1; /* Reject our own routes */
- *attrs = ospf_build_attrs(*attrs, pool, 0, 0, 0); /* FIXME: Use better defaults? */
+ *attrs = ospf_build_attrs(*attrs, pool, LSINFINITY, 10000, 0);
return 0; /* Leave decision to the filters */
}
@@ -206,8 +206,8 @@ ospf_make_tmp_attrs(struct rte *rt, struct linpool *pool)
void
ospf_store_tmp_attrs(struct rte *rt, struct ea_list *attrs)
{
- rt->u.ospf.metric1 = ea_get_int(attrs, EA_OSPF_METRIC1, 0);
- rt->u.ospf.metric2 = ea_get_int(attrs, EA_OSPF_METRIC2, 0);
+ rt->u.ospf.metric1 = ea_get_int(attrs, EA_OSPF_METRIC1, LSINFINITY);
+ rt->u.ospf.metric2 = ea_get_int(attrs, EA_OSPF_METRIC2, 10000);
rt->u.ospf.tag = ea_get_int(attrs, EA_OSPF_TAG, 0);
}