From: phessler Date: Mon, 26 Jun 2017 10:08:06 +0000 (+0000) Subject: let admins set an unknown well-known community X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=c73fdc4a1214a0063f035af6a39fbb97de7f52fb;p=openbsd let admins set an unknown well-known community from Job Snijders ok phessler@ benno@ --- diff --git a/usr.sbin/bgpctl/parser.c b/usr.sbin/bgpctl/parser.c index 1020afeb6ff..a52d281f8c9 100644 --- a/usr.sbin/bgpctl/parser.c +++ b/usr.sbin/bgpctl/parser.c @@ -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 @@ -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) diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y index 606f84603d5..93da2a4bf4f 100644 --- a/usr.sbin/bgpd/parse.y +++ b/usr.sbin/bgpd/parse.y @@ -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 @@ -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)