ports/78302: net/zebra patch for ospfd lost database updates
Dmitry Morozovsky
marck at FreeBSD.org
Wed Mar 2 14:50:15 UTC 2005
>Number: 78302
>Category: ports
>Synopsis: net/zebra patch for ospfd lost database updates
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Wed Mar 02 14:50:14 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Dmitry Morozovsky
>Release: FreeBSD 4-STABLE i386
>Organization:
Cronyx Plus LLC (RiNet ISP)
>Environment:
System: FreeBSD 4-STABLE
>Description:
It seems to be a bug in zebra's LSA Refresh algorythm when time got backwards,
where refresh loop can go to virtually endless. We sometimes encounted this in
rather simple topology, but with many (3k+) LSAs
>How-To-Repeat:
Non-deterministic, but mostly working example:
run zebra's ospfd, slide time backwards. watch for adjacency goes down on other
OSPF router.
>Fix:
We're run zebra with this fix for more than half a year now. Everything seems
to be ok.
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/net/zebra/Makefile,v
retrieving revision 1.79
diff -u -r1.79 Makefile
--- Makefile 7 Feb 2005 12:36:46 -0000 1.79
+++ Makefile 2 Mar 2005 14:35:35 -0000
@@ -7,7 +7,7 @@
PORTNAME= zebra
PORTVERSION= 0.94
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= net ipv6
MASTER_SITES= ftp://ftp.zebra.org/pub/zebra/ \
ftp://ftp.ripe.net/mirrors/sites/ftp.zebra.org/pub/zebra/ \
Index: files/patch-ospfd_ospf__lsa.c
===================================================================
RCS file: files/patch-ospfd_ospf__lsa.c
diff -N files/patch-ospfd_ospf__lsa.c
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ files/patch-ospfd_ospf__lsa.c 2 Mar 2005 14:35:35 -0000
@@ -0,0 +1,37 @@
+--- ospfd/ospf_lsa.c.orig Mon Nov 8 11:47:25 2004
++++ ospfd/ospf_lsa.c Tue Nov 9 03:15:53 2004
+@@ -3344,6 +3344,7 @@
+ listnode node;
+ struct ospf *ospf = THREAD_ARG (t);
+ int i;
++ time_t ct;
+ list lsa_to_refresh = list_new ();
+
+ if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
+@@ -3351,15 +3352,25 @@
+
+
+ i = ospf->lsa_refresh_queue.index;
++
++ if ((ct = time(NULL)) < ospf->lsa_refresher_started) {
++ zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): HACK: fixing lsa_refresher_started: %d -> %d", ospf->lsa_refresher_started, ct);
++ ospf->lsa_refresher_started = ct;
++ }
+
+ ospf->lsa_refresh_queue.index =
+ (ospf->lsa_refresh_queue.index +
+- (time (NULL) - ospf->lsa_refresher_started) / OSPF_LSA_REFRESHER_GRANULARITY)
++ (ct - ospf->lsa_refresher_started) / OSPF_LSA_REFRESHER_GRANULARITY)
+ % OSPF_LSA_REFRESHER_SLOTS;
+
+ if (IS_DEBUG_OSPF (lsa, LSA_REFRESH))
+ zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): next index %d",
+ ospf->lsa_refresh_queue.index);
++
++ if (ospf->lsa_refresh_queue.index >= OSPF_LSA_REFRESHER_SLOTS) {
++ zlog_info ("LSA[Refresh]: ospf_lsa_refresh_walker(): HACK: fixing index: %hu -> 0", ospf->lsa_refresh_queue.index);
++ ospf->lsa_refresh_queue.index = 0;
++ }
+
+ for (;i != ospf->lsa_refresh_queue.index;
+ i = (i + 1) % OSPF_LSA_REFRESHER_SLOTS)
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list