Hi!

Before bgpd.c:1.225 bgpd ran merge_config on startup and set the cluster-id to 
router-id when needed. This is not the case anymore and if 
cluster-id is not explicitly specified its not picked up on startup causing bgp 
to use 0.0.0.0 as the cluster-id.

Rivo

Index: usr.sbin/bgpd/config.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/config.c,v
retrieving revision 1.92
diff -u -p -r1.92 config.c
--- usr.sbin/bgpd/config.c      13 Aug 2019 07:39:57 -0000      1.92
+++ usr.sbin/bgpd/config.c      26 Sep 2019 19:28:21 -0000
@@ -201,8 +201,6 @@ merge_config(struct bgpd_config *xconf,
        /*
         * merge the freshly parsed conf into the running xconf
         */
-       if ((conf->flags & BGPD_FLAG_REFLECTOR) && conf->clusterid == 0)
-               conf->clusterid = conf->bgpid;

        /* adjust FIB priority if changed */
        /* if xconf is uninitialized we get RTP_NONE */
Index: usr.sbin/bgpd/parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
retrieving revision 1.401
diff -u -p -r1.401 parse.y
--- usr.sbin/bgpd/parse.y       13 Aug 2019 07:39:57 -0000      1.401
+++ usr.sbin/bgpd/parse.y       26 Sep 2019 19:28:21 -0000
@@ -3309,6 +3309,8 @@ parse_config(char *filename, struct peer
                log_warnx("configuration error: AS not given");
                errors++;
        }
+       if ((conf->flags & BGPD_FLAG_REFLECTOR) && conf->clusterid == 0)
+               conf->clusterid = conf->bgpid;

        /* clear the globals */
        curpeer = NULL;

Reply via email to