Because of delaying the commits in the RDE it is now possible that table
additions and deletions mix. This triggers a fatal("attempt to mix pf table
additions/deletions") in the parent. Instead of the fatal() it is actually
safe to just commit the pending work and start with a fresh worklist
afterwards.

-- 
:wq Claudio

Index: pftable.c
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/pftable.c,v
retrieving revision 1.14
diff -u -p -r1.14 pftable.c
--- pftable.c   8 Aug 2019 20:06:29 -0000       1.14
+++ pftable.c   4 Oct 2019 10:22:15 -0000
@@ -191,10 +191,13 @@ pftable_add_work(const char *table, stru
                return (-1);
        }
 
-       /* Only one type of work on the list at a time */
+       /*
+        * Only one type of work on the list at a time,
+        * commit pending work first before adding new work
+        */
        what = del ? DIOCRDELADDRS : DIOCRADDADDRS;
        if (pft->naddrs != 0 && pft->what != what)
-               fatal("attempt to mix pf table additions/deletions");
+               pftable_commit();
 
        if (pft->nalloc <= pft->naddrs)
                pft->nalloc = pft->nalloc == 0 ? 1 : pft->nalloc * 2;

Reply via email to