summaryrefslogtreecommitdiffstats
path: root/proto/ospf/lsupd.c
diff options
context:
space:
mode:
authorOndrej Filip <feela@network.cz>2000-05-04 03:23:03 +0200
committerOndrej Filip <feela@network.cz>2000-05-04 03:23:03 +0200
commitd345cda5a1cea03a09e5a37c999e88c5177c8a9e (patch)
tree2655c3d095e1ea1717807396a8d6df588f5a7905 /proto/ospf/lsupd.c
parent9e48d717cf681dcc3cfaaee4358b5c6fa3aa409e (diff)
downloadbird-d345cda5a1cea03a09e5a37c999e88c5177c8a9e.tar
bird-d345cda5a1cea03a09e5a37c999e88c5177c8a9e.zip
Bugfix in Network lsa originating
Bugfix in ntohlsab() and htonlsab() For calculating of rt I use my own fib. I delete routes! ;-)
Diffstat (limited to 'proto/ospf/lsupd.c')
-rw-r--r--proto/ospf/lsupd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index b372a21..b405a66 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -116,7 +116,8 @@ flood_lsa(struct ospf_neighbor *n, struct ospf_lsa_header *hn,
lh->age=htons(age);
help=(u8 *)(lh+1);
en=ospf_hash_find_header(oa->gr,hh);
- htonlsab(en->lsa_body,help,hh->type,hh->length);
+ htonlsab(en->lsa_body,help,hh->type,hh->length
+ -sizeof(struct ospf_lsa_header));
len=hh->length;
}
op->length=htons(len);
@@ -186,7 +187,8 @@ ospf_lsupd_tx_list(struct ospf_neighbor *n, list *l)
}
htonlsah(&(en->lsa), pktpos);
pktpos=pktpos+sizeof(struct ospf_lsa_header);
- htonlsab(en->lsa_body, pktpos, en->lsa.type, en->lsa.length);
+ htonlsab(en->lsa_body, pktpos, en->lsa.type, en->lsa.length
+ -sizeof(struct ospf_lsa_header));
pktpos=pktpos+en->lsa.length-sizeof(struct ospf_lsa_header);
len=len+en->lsa.length;
lsano++;