summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2004-07-13 14:21:24 +0200
committerOndrej Filip <feela@network.cz>2004-07-13 14:21:24 +0200
commit12dd8dc8779c13889a6860b769df7e0d68e7764c (patch)
tree83cd4e92cb843196f2db217874779f8a0e804616 /proto/ospf
parent621ccdfe5acd2889956ec0f8e96b812acd09f168 (diff)
downloadbird-12dd8dc8779c13889a6860b769df7e0d68e7764c.tar
bird-12dd8dc8779c13889a6860b769df7e0d68e7764c.zip
Bugfix - nasty bug in router LSA origination - Router did not describe all interfaces.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/topology.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index c368d91..027ef8f 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -94,7 +94,10 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 * length)
ln->data = 0xffffffff;
}
else
+ {
+ ln--;
i--; /* No link added */
+ }
}
break;
case OSPF_IT_BCAST:
@@ -146,10 +149,19 @@ originate_rt_lsa_body(struct ospf_area *oa, u16 * length)
rt->veb.bit.v = 1;
}
else
+ {
+ ln--;
i--; /* No link added */
+ }
+ break;
+ default:
+ ln--;
+ i--; /* No link added */
+ log("Unknown interface type");
break;
}
}
+ ln++;
}
rt->links = i;
*length = i * sizeof(struct ospf_lsa_rt_link) + sizeof(struct ospf_lsa_rt) +