summaryrefslogtreecommitdiffstats
path: root/proto
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-08-28 15:51:13 +0200
committerOndrej Filip <feela@network.cz>2000-08-28 15:51:13 +0200
commit5a063efeea11a80e865e9fa4b5e13c4ca8514b51 (patch)
treefe5f38af6453c04dcef2ba7f7ab21f2b2b544c1c /proto
parent8b6b49239f409571486ae9589bcd57f706421517 (diff)
downloadbird-5a063efeea11a80e865e9fa4b5e13c4ca8514b51.tar
bird-5a063efeea11a80e865e9fa4b5e13c4ca8514b51.zip
Bugfix in ext lsa importing.
Diffstat (limited to 'proto')
-rw-r--r--proto/ospf/topology.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 0e90e77..e3e240f 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -319,21 +319,21 @@ originate_ext_lsa_body(net *n, rte *e, struct proto_ospf *po, struct ea_list *at
et=(struct ospf_lsa_ext_tos *)(ext+1);
- if(!m2)
- {
- et->etos=0;
- et->metric=m1;
- }
+ if(m1!=LSINFINITY)
+ {
+ et->etos=0;
+ et->metric=m1;
+ }
else
- {
- et->etos=0x80;
- et->metric=m2;
- }
+ {
+ et->etos=0x80;
+ et->metric=m2;
+ }
et->padding=0;
et->tag=tag;
if(ipa_compare(e->attrs->gw,ipa_from_u32(0))!=0)
{
- if(find_iface((struct proto_ospf *)p, e->attrs->iface)!=NULL) inas=1;
+ if(find_iface((struct proto_ospf *)p, e->attrs->iface)!=NULL) inas=1;
}
if(!inas) et->fwaddr= ipa_from_u32(0);