summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/parse.y
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-06-15 10:19:22 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-06-15 10:19:22 +0000
commita4b8685cf920a6fef16469ae8eb044b77715ec66 (patch)
tree0662859bb2305ebe82dcda8a585653dc3f9599ef /usr.sbin/bgpd/parse.y
parent3c7fe1047b6d569a96a309886b7abce66afc28be (diff)
Allow bgpd to delete more then one community per filter rule. Fixes PR5807
tested by Raphael Ho long time ago.
Diffstat (limited to 'usr.sbin/bgpd/parse.y')
-rw-r--r--usr.sbin/bgpd/parse.y5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 2c8c60e1604..64d77e3cea4 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.215 2008/02/26 10:09:58 mpf Exp $ */
+/* $OpenBSD: parse.y,v 1.216 2008/06/15 10:19:21 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -2749,6 +2749,8 @@ merge_filterset(struct filter_set_head *sh, struct filter_set *s)
if (filterset_cmp(s, t) == 0) {
if (s->type == ACTION_SET_COMMUNITY)
yyerror("community is already set");
+ else if (s->type == ACTION_DEL_COMMUNITY)
+ yyerror("community will already be deleted");
else
yyerror("redefining set parameter %s",
filterset_name(s->type));
@@ -2764,6 +2766,7 @@ merge_filterset(struct filter_set_head *sh, struct filter_set *s)
if (s->type == t->type)
switch (s->type) {
case ACTION_SET_COMMUNITY:
+ case ACTION_DEL_COMMUNITY:
if (s->action.community.as <
t->action.community.as ||
(s->action.community.as ==