compare the right things here: we want to know if the flag has changed.
Found with claudios help and patience.

ok?

(benno_claudio_rde_reconf_F_RIB_HASNOFIB.diff)

Index: rde.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/rde.c,v
retrieving revision 1.386
diff -u -p -u -1 -2 -r1.386 rde.c
--- rde.c       9 Jul 2018 14:44:02 -0000       1.386
+++ rde.c       9 Jul 2018 21:56:40 -0000
@@ -758,25 +758,25 @@ rde_dispatch_imsg_parent(struct imsgbuf 
                        }
                        break;
                case IMSG_RECONF_RIB:
                        if (imsg.hdr.len - IMSG_HEADER_SIZE !=
                            sizeof(struct rde_rib))
                                fatalx("IMSG_RECONF_RIB bad len");
                        memcpy(&rn, imsg.data, sizeof(rn));
                        rib = rib_find(rn.name);
                        if (rib == NULL)
                                rib = rib_new(rn.name, rn.rtableid, rn.flags);
                        else if (rib->rtableid != rn.rtableid ||
                            (rib->flags & F_RIB_HASNOFIB) !=
-                           (rib->flags & F_RIB_HASNOFIB)) {
+                           (rn->flags & F_RIB_HASNOFIB)) {
                                struct filter_head      *in_rules;
                                struct rib_desc         *ribd = rib_desc(rib);
                                /*
                                 * Big hammer in the F_RIB_HASNOFIB case but
                                 * not often enough used to optimise it more.
                                 * Need to save the filters so that they're not
                                 * lost.
                                 */
                                in_rules = ribd->in_rules;
                                ribd->in_rules = NULL;
                                rde_rib_free(ribd);
                                rib = rib_new(rn.name, rn.rtableid, rn.flags);

Reply via email to