summaryrefslogtreecommitdiffstats
path: root/proto/ospf
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-30 12:20:14 +0200
committerOndrej Filip <feela@network.cz>2000-05-30 12:20:14 +0200
commit05dbc97b13534eb886945d1f291aaba34238c99c (patch)
tree9773fd210ce3706ebaa94c7d390837533ddfe723 /proto/ospf
parentfe613ecded2fca875a146e1c07713f131e85f7ff (diff)
downloadbird-05dbc97b13534eb886945d1f291aaba34238c99c.tar
bird-05dbc97b13534eb886945d1f291aaba34238c99c.zip
Bug in rt_notify.
Diffstat (limited to 'proto/ospf')
-rw-r--r--proto/ospf/ospf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/proto/ospf/ospf.c b/proto/ospf/ospf.c
index bc7d974..f55bec8 100644
--- a/proto/ospf/ospf.c
+++ b/proto/ospf/ospf.c
@@ -159,7 +159,7 @@ ospf_rt_notify(struct proto *p, net *n, rte *new, rte *old, ea_list *attrs)
if(new) /* Got some new route */
{
- originate_ext_lsa(n, old, po);
+ originate_ext_lsa(n, new, po);
}
else
{
@@ -201,9 +201,17 @@ static void
ospf_get_route_info(rte *rte, byte *buf, ea_list *attrs)
{
char met=' ';
+ char type=' ';
- if(rte->u.ospf.type=='E') met='1';
+ if(rte->attrs->source==RTS_OSPF_EXT)
+ {
+ met='1';
+ type='E';
+ }
+ //if(rte->u.ospf.type=='E') met='1';
if(rte->u.ospf.metric2!=0) met='2';
+ if(rte->attrs->source==RTS_OSPF_IA) type='A';
+ if(rte->attrs->source==RTS_OSPF) type='I';
buf += bsprintf(buf, " %c%c %d", rte->u.ospf.type, met,
(rte->u.ospf.metric2==0) ? rte->u.ospf.metric1 : rte->u.ospf.metric2);
}