OSFP LSA_MAXSEQNO problems
Alexander V. Chernikov
melifaro at yandex-team.ru
Wed Aug 14 01:35:07 CEST 2013
Hello list!
Currently bird performs LSA premature aging in very strange way which
sometimes upsets quagga (up to SIGSEGV) and Cisco.
Every time aging is done via setting seq number to LSA_MAXSEQNO.
RFC 2328, on the opposite, shows us only 2 cases where MaxSequenceNumber
is used in outgoing LSAs:
1) Self LSA originating with given seq num (very rare event)
2) [Premature] Aging of LSA from 1) because a) disappeared net and b)
seq number increase (12.1.6)
For all other cases seq number should be either increased or left intact.
Bird, however, insist on setting LSA_MAXSEQNO while:
1) Receiving self-originating LSA which is not in local LSDB (
ospf_lsupd_receive ) which is not a special case according to 14.1
2) In all other places like handling if-down, external route disappear,
etc... ( ospf_lsupd_flush_nlsa )
IT takes noticeable time (sometimes up to 5 seconds) for Cisco 65XX with
~40 neighbors to age given LSA (however it seems that problem is
repeatable for ASR9k, too).
And while such LSA is in database, every new update is ignored due to 13
step (8).
(I've got full logs and pcap for given situation).
Can we please consider applying attached patch to make it more compliant?
-------------- next part --------------
diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c
index a5da425..f3c2d81 100644
--- a/proto/ospf/lsupd.c
+++ b/proto/ospf/lsupd.c
@@ -598,9 +598,7 @@ ospf_lsupd_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa,
{
OSPF_TRACE(D_EVENTS, "Premature aging it");
lsatmp.age = LSA_MAXAGE;
- lsatmp.sn = LSA_MAXSEQNO;
lsa->age = htons(LSA_MAXAGE);
- lsa->sn = htonl(LSA_MAXSEQNO);
lsasum_check(lsa, (lsa + 1)); /* It also calculates chsum! */
lsatmp.checksum = ntohs(lsa->checksum);
ospf_lsupd_flood(po, NULL, lsa, &lsatmp, domain, 0);
@@ -742,7 +740,6 @@ ospf_lsupd_flush_nlsa(struct proto_ospf *po, struct top_hash_entry *en)
struct proto *p = &po->proto;
lsa->age = LSA_MAXAGE;
- lsa->sn = LSA_MAXSEQNO;
lsasum_calculate(lsa, en->lsa_body);
OSPF_TRACE(D_EVENTS, "Premature aging self originated lsa!");
OSPF_TRACE(D_EVENTS, "Type: %04x, Id: %R, Rt: %R", lsa->type, lsa->id, lsa->rt);
diff --git a/proto/ospf/topology.c b/proto/ospf/topology.c
index 5d93c0e..a2deee0 100644
--- a/proto/ospf/topology.c
+++ b/proto/ospf/topology.c
@@ -930,7 +930,7 @@ check_ext_lsa(struct top_hash_entry *en, struct fib_node *fn, u32 metric, ip_add
if (fn->pxlen != ipa_mklen(ext->netmask))
return -1;
- return (en->lsa.sn != LSA_MAXSEQNO) && (ext->metric == metric) &&
+ return (en->lsa.age != LSA_MAXAGE) && (ext->metric == metric) &&
(ext->tag == tag) && ipa_equal(ext->fwaddr,fwaddr);
}
More information about the Bird-users
mailing list