summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2004-06-23 00:11:28 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2004-06-23 00:11:28 +0000
commit85e60f1f46cb0abb6cf1fc3e0298b3c7495fb4ee (patch)
treebc14fc39d449444d5db0fe14c7a32932dbf1bd27 /usr.sbin/bgpd
parente06229012afc49937a0005129193c483f8bc118e (diff)
Support rfc 3765 which adds a new well known community NOPEER. OK henning@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/bgpd.87
-rw-r--r--usr.sbin/bgpd/bgpd.h3
-rw-r--r--usr.sbin/bgpd/parse.y6
3 files changed, 13 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/bgpd.8 b/usr.sbin/bgpd/bgpd.8
index 7673a9cbd04..c3bdfb55150 100644
--- a/usr.sbin/bgpd/bgpd.8
+++ b/usr.sbin/bgpd/bgpd.8
@@ -1,4 +1,4 @@
-.\" $OpenBSD: bgpd.8,v 1.9 2004/05/23 22:32:42 jmc Exp $
+.\" $OpenBSD: bgpd.8,v 1.10 2004/06/23 00:11:27 claudio Exp $
.\"
.\" Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
.\"
@@ -100,6 +100,11 @@ configuration file.
.%T "Capabilities Advertisement with BGP-4"
.%D January 1999
.Re
+.Rs
+.%R RFC 3765
+.%T "NOPEER Community for Border Gateway Protocol"
+.%D April 2004
+.Re
.Sh HISTORY
The
.Nm
diff --git a/usr.sbin/bgpd/bgpd.h b/usr.sbin/bgpd/bgpd.h
index 96edba5445e..82697d6f65f 100644
--- a/usr.sbin/bgpd/bgpd.h
+++ b/usr.sbin/bgpd/bgpd.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: bgpd.h,v 1.130 2004/06/22 20:28:58 claudio Exp $ */
+/* $OpenBSD: bgpd.h,v 1.131 2004/06/23 00:11:27 claudio Exp $ */
/*
* Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -493,6 +493,7 @@ struct filter_peers {
#define COMMUNITY_NO_EXPORT 0xff01
#define COMMUNITY_NO_ADVERTISE 0xff02
#define COMMUNITY_NO_EXPSUBCONFED 0xff03
+#define COMMUNITY_NO_PEER 0xff04 /* rfc3765 */
struct filter_match {
struct {
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index c79414cc047..a37537c017f 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.115 2004/06/20 18:35:12 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.116 2004/06/23 00:11:27 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1495,6 +1495,10 @@ parsecommunity(char *s, int *as, int *type)
*as = COMMUNITY_WELLKNOWN;
*type = COMMUNITY_NO_EXPSUBCONFED;
return (0);
+ } else if (strcasecmp(s, "NO_PEER") == 0) {
+ *as = COMMUNITY_WELLKNOWN;
+ *type = COMMUNITY_NO_PEER;
+ return (0);
}
if ((p = strchr(s, ':')) == NULL) {