summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2004-11-19 10:03:34 +0000
committerclaudio <claudio@openbsd.org>2004-11-19 10:03:34 +0000
commit07acf03237d8dfc8c5ecf4491124fc344715ccc1 (patch)
tree9a61325c4663af2b0c4d7d39a043d57d8322f8e5
parentOnly unlink and link the asp in nexthop_modify if the asp is linked. (diff)
downloadwireguard-openbsd-07acf03237d8dfc8c5ecf4491124fc344715ccc1.tar.xz
wireguard-openbsd-07acf03237d8dfc8c5ecf4491124fc344715ccc1.zip
Make "set network 127.0.0.1" work and use = instead of |= for the
blackhole/reject case as $$ is not zeroed. This caused funny results in merge_filterset(). OK henning@
-rw-r--r--usr.sbin/bgpd/parse.y7
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/bgpd/parse.y b/usr.sbin/bgpd/parse.y
index 91d85050a33..4de7725958a 100644
--- a/usr.sbin/bgpd/parse.y
+++ b/usr.sbin/bgpd/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.145 2004/11/18 17:07:38 henning Exp $ */
+/* $OpenBSD: parse.y,v 1.146 2004/11/19 10:03:34 claudio Exp $ */
/*
* Copyright (c) 2002, 2003, 2004 Henning Brauer <henning@openbsd.org>
@@ -1114,13 +1114,14 @@ filter_set_opt : LOCALPREF number {
$$.med = $2;
}
| NEXTHOP address {
+ $$.flags = SET_NEXTHOP;
memcpy(&$$.nexthop, &$2, sizeof($$.nexthop));
}
| NEXTHOP BLACKHOLE {
- $$.flags |= SET_NEXTHOP_BLACKHOLE;
+ $$.flags = SET_NEXTHOP_BLACKHOLE;
}
| NEXTHOP REJECT {
- $$.flags |= SET_NEXTHOP_REJECT;
+ $$.flags = SET_NEXTHOP_REJECT;
}
| PREPEND_SELF number {
$$.flags = SET_PREPEND_SELF;