The check if a network is already present is slightly wrong since it does
not check the type. I triggered it with:

network inet static
network 0.0.0.0/0

Fix is trivial.
-- 
:wq Claudio

Index: parse.y
===================================================================
RCS file: /cvs/src/usr.sbin/bgpd/parse.y,v
retrieving revision 1.388
diff -u -p -r1.388 parse.y
--- parse.y     27 May 2019 09:14:32 -0000      1.388
+++ parse.y     29 May 2019 05:21:55 -0000
@@ -868,7 +868,8 @@ network             : NETWORK prefix filter_set     {
                        filterset_move($3, &n->net.attrset);
                        free($3);
                        TAILQ_FOREACH(m, netconf, entry) {
-                               if (n->net.prefixlen == m->net.prefixlen &&
+                               if (n->net.type == m->net.type &&
+                                   n->net.prefixlen == m->net.prefixlen &&
                                    prefix_compare(&n->net.prefix,
                                    &m->net.prefix, n->net.prefixlen) == 0)
                                        yyerror("duplicate prefix "

Reply via email to