let admins set an unknown well-known community
authorphessler <phessler@openbsd.org>
Mon, 26 Jun 2017 10:08:06 +0000 (10:08 +0000)
committerphessler <phessler@openbsd.org>
Mon, 26 Jun 2017 10:08:06 +0000 (10:08 +0000)
from Job Snijders
ok phessler@ benno@

usr.sbin/bgpctl/parser.c
usr.sbin/bgpd/parse.y

index 1020afe..a52d281 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parser.c,v 1.78 2017/06/26 10:05:57 phessler Exp $ */
+/*     $OpenBSD: parser.c,v 1.79 2017/06/26 10:08:06 phessler Exp $ */
 
 /*
  * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -999,10 +999,6 @@ done:
                case COMMUNITY_BLACKHOLE:
                        /* valid */
                        break;
-               default:
-                       /* unknown */
-                       fprintf(stderr, "Unknown well-known community\n");
-                       return (0);
                }
 
        if ((fs = calloc(1, sizeof(struct filter_set))) == NULL)
index 606f846..93da2a4 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: parse.y,v 1.311 2017/06/26 10:05:57 phessler Exp $ */
+/*     $OpenBSD: parse.y,v 1.312 2017/06/26 10:08:06 phessler Exp $ */
 
 /*
  * Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -3023,10 +3023,6 @@ parsecommunity(struct filter_community *c, char *s)
 
        if ((i = getcommunity(s)) == COMMUNITY_ERROR)
                return (-1);
-       if (i == COMMUNITY_WELLKNOWN) {
-               yyerror("Bad community AS number");
-               return (-1);
-       }
        as = i;
 
        if ((i = getcommunity(p)) == COMMUNITY_ERROR)