-/* $OpenBSD: bgpctl.c,v 1.195 2017/05/31 10:48:06 claudio Exp $ */
+/* $OpenBSD: bgpctl.c,v 1.196 2017/06/26 10:05:57 phessler Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
v = ntohs(v);
if (a == COMMUNITY_WELLKNOWN)
switch (v) {
+ case COMMUNITY_GRACEFUL_SHUTDOWN:
+ printf("GRACEFUL_SHUTDOWN");
+ break;
case COMMUNITY_NO_EXPORT:
printf("NO_EXPORT");
break;
-/* $OpenBSD: parser.c,v 1.77 2017/02/14 13:13:23 benno Exp $ */
+/* $OpenBSD: parser.c,v 1.78 2017/06/26 10:05:57 phessler Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
int as, type;
/* Well-known communities */
- if (strcasecmp(word, "NO_EXPORT") == 0) {
+ if (strcasecmp(word, "GRACEFUL_SHUTDOWN") == 0) {
+ as = COMMUNITY_WELLKNOWN;
+ type = COMMUNITY_GRACEFUL_SHUTDOWN;
+ goto done;
+ } else if (strcasecmp(word, "NO_EXPORT") == 0) {
as = COMMUNITY_WELLKNOWN;
type = COMMUNITY_NO_EXPORT;
goto done;
}
if (as == COMMUNITY_WELLKNOWN)
switch (type) {
+ case COMMUNITY_GRACEFUL_SHUTDOWN:
case COMMUNITY_NO_EXPORT:
case COMMUNITY_NO_ADVERTISE:
case COMMUNITY_NO_EXPSUBCONFED:
-.\" $OpenBSD: bgpd.conf.5,v 1.160 2017/05/31 10:49:10 claudio Exp $
+.\" $OpenBSD: bgpd.conf.5,v 1.161 2017/06/26 10:05:57 phessler Exp $
.\"
.\" Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 31 2017 $
+.Dd $Mdocdate: June 26 2017 $
.Dt BGPD.CONF 5
.Os
.Sh NAME
Alternatively, well-known communities may be given by name instead and
include
.Ic BLACKHOLE ,
+.Ic GRACEFUL_SHUTDOWN ,
.Ic NO_EXPORT ,
.Ic NO_ADVERTISE ,
.Ic NO_EXPORT_SUBCONFED ,
is a locally-significant number between zero and
.Li 65535 .
Alternately, well-known communities may be specified by name:
+.Ic GRACEFUL_SHUTDOWN ,
.Ic NO_EXPORT ,
.Ic NO_ADVERTISE ,
.Ic NO_EXPORT_SUBCONFED ,
-/* $OpenBSD: bgpd.h,v 1.308 2017/05/31 10:44:00 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.309 2017/06/26 10:05:57 phessler Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
#define COMMUNITY_LOCAL_AS -4
#define COMMUNITY_UNSET -5
#define COMMUNITY_WELLKNOWN 0xffff
+#define COMMUNITY_GRACEFUL_SHUTDOWN 0x0000 /* draft-ietf-grow-bgp-gshut */
#define COMMUNITY_BLACKHOLE 0x029A /* RFC 7999 */
#define COMMUNITY_NO_EXPORT 0xff01
#define COMMUNITY_NO_ADVERTISE 0xff02
-/* $OpenBSD: parse.y,v 1.310 2017/06/26 10:04:21 phessler Exp $ */
+/* $OpenBSD: parse.y,v 1.311 2017/06/26 10:05:57 phessler Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
int i, as;
/* Well-known communities */
- if (strcasecmp(s, "NO_EXPORT") == 0) {
+ if (strcasecmp(s, "GRACEFUL_SHUTDOWN") == 0) {
+ c->as = COMMUNITY_WELLKNOWN;
+ c->type = COMMUNITY_GRACEFUL_SHUTDOWN;
+ return (0);
+ } else if (strcasecmp(s, "NO_EXPORT") == 0) {
c->as = COMMUNITY_WELLKNOWN;
c->type = COMMUNITY_NO_EXPORT;
return (0);