summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorphessler <phessler@openbsd.org>2017-06-26 10:08:06 +0000
committerphessler <phessler@openbsd.org>2017-06-26 10:08:06 +0000
commitc73fdc4a1214a0063f035af6a39fbb97de7f52fb (patch)
tree290627e4796404ef9897554a64f85910e7551448
parentadd support for the "graceful shutdown" well-known community as described (diff)
downloadwireguard-openbsd-c73fdc4a1214a0063f035af6a39fbb97de7f52fb.tar.xz
wireguard-openbsd-c73fdc4a1214a0063f035af6a39fbb97de7f52fb.zip
let admins set an unknown well-known community
from Job Snijders ok phessler@ benno@
-rw-r--r--usr.sbin/bgpctl/parser.c6
-rw-r--r--usr.sbin/bgpd/parse.y6
2 files changed, 2 insertions, 10 deletions
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 <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)
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 <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)