bird 1.3.0 and 1.2.4 crash

Eugene Perevyazko john at dnepro.net
Fri Jun 3 16:18:07 CEST 2011


  On Fri, Jun 03, 2011 at 02:32:47PM +0400, Denis Samsonov wrote:
> While working as a bird route server arises srash.
> Failure observed in versions 1.3.0 and 1.2.4 and occurs when scanning 
> the routing table .. How do I fix this?
> OS where working bird - freebsd 7.3
> 
> Last messages in log file
> 03-06-2011 06:57:33 <TRACE> kernel1: Scanning routing table
> 03-06-2011 06:57:33 <FATAL> RT scan 2
> 

As far as I understand the reason for this is kernel routing table size changed between calls to sysctl().
This is easy to workaround with following patch, resulting in missing rescan instead of crash:

diff -u -r bird-1.2.5/sysdep/bsd/krt-sock.c bird-1.2.5a/sysdep/bsd/krt-sock.c
--- bird-1.2.5/sysdep/bsd/krt-sock.c	2010-08-03 18:44:51.000000000 +0300
+++ bird-1.2.5a/sysdep/bsd/krt-sock.c	2010-11-12 00:39:35.000000000 +0200
@@ -655,7 +655,8 @@
   if (sysctl(mib, 6 , *buf, &needed, NULL, 0) < 0)
   {
     if (on != needed) return; 	/* The buffer size changed since last sysctl */
-    die("RT scan 2");
+    log(L_ERR "Sysctl scan error: %d, bufsize=%d needed=%d", errno, on, needed);
+    //die("RT scan 2");
   }
 
   for (next = *buf; next < (*buf + needed); next += m->rtm.rtm_msglen)

-- 
Eugene Perevyazko



More information about the Bird-users mailing list