summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2012-07-13 15:25:37 +0000
committerclaudio <claudio@openbsd.org>2012-07-13 15:25:37 +0000
commitf95cc545ce9f07c2fb240c5f71021bb9b76e606d (patch)
treefad5ba6a2246a59014dd9850ab08a17ab4d6c938
parentSupport additional MODP DH groups in the Phase 1 and Phase 2. (diff)
downloadwireguard-openbsd-f95cc545ce9f07c2fb240c5f71021bb9b76e606d.tar.xz
wireguard-openbsd-f95cc545ce9f07c2fb240c5f71021bb9b76e606d.zip
Make sure that set med 0 is ACTION_SET_MED and not relative. Fixes
set med 0 and Hennings iBGP sessions. OK henning@
-rw-r--r--usr.sbin/bgpd/parse.y6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index a06cb98df62..c712abe001f 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.261 2012/04/12 17:31:05 claudio Exp $ */
+/* $OpenBSD: parse.y,v 1.262 2012/07/13 15:25:37 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1804,7 +1804,7 @@ filter_set_opt : LOCALPREF NUMBER {
}
if (($$ = calloc(1, sizeof(struct filter_set))) == NULL)
fatal(NULL);
- if ($2 > 0) {
+ if ($2 >= 0) {
$$->type = ACTION_SET_MED;
$$->action.metric = $2;
} else {
@@ -1839,7 +1839,7 @@ filter_set_opt : LOCALPREF NUMBER {
}
if (($$ = calloc(1, sizeof(struct filter_set))) == NULL)
fatal(NULL);
- if ($2 > 0) {
+ if ($2 >= 0) {
$$->type = ACTION_SET_MED;
$$->action.metric = $2;
} else {