On Mon, Nov 08, 2010 at 06:24:48PM +0100, Claudio Jeker wrote: > On Mon, Nov 08, 2010 at 05:18:50PM +0100, Patrick Lamaiziere wrote: > > Le Mon, 8 Nov 2010 16:07:06 +0100, > > Claudio Jeker <cje...@diehard.n-r-g.com> a icrit : > > > > > Have you checked if the networks were actaully added to the RIB? > > > > Do you mean bgpctl show rib ? No. > > Well, it takes some time but I'm able to reproduce this: > > > > # bgpctl show rib > > flags: * = Valid, > = Selected, I = via IBGP, A = Announced > > origin: i = IGP, e = EGP, ? = Incomplete > > > > flags destination gateway lpref med aspath origin > > AI* 129.20.0.0/16 0.0.0.0 100 0 i > > AI* 148.60.0.0/16 0.0.0.0 100 0 i > > * 192.168.1.0/24 193.51.184.26 100 0 2200 i > > AI* 193.52.12.0/24 0.0.0.0 100 0 i > > AI* 193.52.37.0/24 0.0.0.0 100 0 i > > AI* 193.52.56.0/24 0.0.0.0 100 0 i > > AI* 193.52.60.0/24 0.0.0.0 100 0 i > > AI* 195.220.94.0/24 0.0.0.0 100 0 i > > AI* 2001:660:7307::/48 :: 100 0 i > > * 2001:660:7310:10::/80 2001:660:7300:1005:0:38:0:2200 100 0 > > 2200 i > > ------ > > > > And there is nothing announced in show rib out neig <PEER> > > > > Ok for incomming routes : > > # bgpctl show rib in neig RenaterV4 > > flags: * = Valid, > = Selected, I = via IBGP, A = Announced > > origin: i = IGP, e = EGP, ? = Incomplete > > > > flags destination gateway lpref med aspath origin > > * 192.168.1.0/24 193.51.184.26 100 0 2200 i > > > > The peer (running OpenBGPd but on FreeBSD) does not receive any route > > > > I keep the BGP session up if you need more informations. > > > > Can you run a "bgpctl show rib detail 129.20.0.0/16" and a "bgpctl show > table". For some reason none of the above routes got selected and so > nothing is redistributed. It looks like the decision process is turned > off. So it is not what I first thought the problem is. >
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)