Re: (4.8) OpenBGPd sometimes does not send the routes to the peer.

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Claudio Jeker
Date: Monday, November 8, 2010 - 12:03 pm

On Mon, Nov 08, 2010 at 06:24:48PM +0100, Claudio Jeker wrote:

Doh! I should read the log more carefully, the hint is there:

new ktable rdomain_0 for rtableid 0
listening on 0.0.0.0
change to/from route-collector mode ignored
RDE reconfigured

In other words the daemon came up in route-collector mode and so no pathes
are validated. Figured it out at the airport by just looking at the code
and swearing.

Diff is untested but I guess everyone agrees that a bit more memory
inizialisation could help.
-- 
:wq Claudio

Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
retrieving revision 1.299
diff -u -p -r1.299 rde.c
--- rde.c	15 Oct 2010 07:43:02 -0000	1.299
+++ rde.c	8 Nov 2010 18:43:16 -0000
@@ -227,7 +227,7 @@ rde_main(int pipe_m2r[2], int pipe_s2r[2
 	if (rdomains_l == NULL)
 		fatal(NULL);
 	SIMPLEQ_INIT(rdomains_l);
-	if ((conf = malloc(sizeof(struct bgpd_config))) == NULL)
+	if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL)
 		fatal(NULL);
 	log_info("route decision engine ready");
 
Index: session.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/session.c,v
retrieving revision 1.312
diff -u -p -r1.312 session.c
--- session.c	15 Oct 2010 07:45:32 -0000	1.312
+++ session.c	8 Nov 2010 18:25:09 -0000
@@ -247,7 +247,7 @@ session_main(int pipe_m2s[2], int pipe_s
 	peer_cnt = 0;
 	ctl_cnt = 0;
 
-	if ((conf = malloc(sizeof(struct bgpd_config))) == NULL)
+	if ((conf = calloc(1, sizeof(struct bgpd_config))) == NULL)
 		fatal(NULL);
 	if ((conf->listen_addrs = calloc(1, sizeof(struct listen_addrs))) ==
 	    NULL)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
(4.8) OpenBGPd sometimes does not send the routes to the peer., Patrick Lamaiziere, (Wed Nov 3, 7:29 am)
Re: (4.8) OpenBGPd sometimes does not send the routes to t ..., Patrick Lamaiziere, (Mon Nov 8, 9:18 am)
Re: (4.8) OpenBGPd sometimes does not send the routes to t ..., Claudio Jeker, (Mon Nov 8, 12:03 pm)
Re: (4.8) OpenBGPd sometimes does not send the routes to t ..., Patrick Lamaiziere, (Tue Nov 9, 3:01 am)