On Mon, Nov 05, 2018 at 08:49:08PM +0100, Denis Fondras wrote:
> I wanted to run bgpd in a specific rdomain.
> First routes could not be selected then I patched rde.c and routes magically
> appeared in the right routing table.
> 
> Is this as simple as the provided diff or am I overlooking something ?

You are overlooking something. Both RIBs are F_RIB_NOFIB |
F_RIB_NOEVALUATE, so the routes are not evaluated, selected or sent to the
parent. This should be a no-op, so I think something else happened to make
the routes appear.
 
> Denis
> 
> Index: rde.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
> retrieving revision 1.445
> diff -u -p -r1.445 rde.c
> --- rde.c     4 Nov 2018 12:34:54 -0000       1.445
> +++ rde.c     5 Nov 2018 14:00:01 -0000
> @@ -217,8 +217,8 @@ rde_main(int debug, int verbose)
>       peer_init(peerhashsize);
>  
>       /* make sure the default RIBs are setup */
> -     rib_new("Adj-RIB-In", 0, F_RIB_NOFIB | F_RIB_NOEVALUATE);
> -     rib_new("Adj-RIB-Out", 0, F_RIB_NOFIB | F_RIB_NOEVALUATE);
> +     rib_new("Adj-RIB-In", getrtable(), F_RIB_NOFIB | F_RIB_NOEVALUATE);
> +     rib_new("Adj-RIB-Out", getrtable(), F_RIB_NOFIB | F_RIB_NOEVALUATE);
>  
>       out_rules = calloc(1, sizeof(struct filter_head));
>       if (out_rules == NULL)
> 

-- 
:wq Claudio

Reply via email to