summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2019-06-11 19:43:56 +0000
committerflorian <florian@openbsd.org>2019-06-11 19:43:56 +0000
commit0853c786b7169b4b5918c639db5c58330ed85dab (patch)
treecc9cd349a09785ee5ecd8e98a3e76a5514ec23ce
parentfix bogus cross references: there is no ELF(3) manual page; (diff)
downloadwireguard-openbsd-0853c786b7169b4b5918c639db5c58330ed85dab.tar.xz
wireguard-openbsd-0853c786b7169b4b5918c639db5c58330ed85dab.zip
Fix typo which resulted in a segfault in ebgp multihop setups.
OK claudio
-rw-r--r--usr.sbin/bgpd/rde_update.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/rde_update.c b/usr.sbin/bgpd/rde_update.c
index 7ded2db049f..56e5424b212 100644
--- a/usr.sbin/bgpd/rde_update.c
+++ b/usr.sbin/bgpd/rde_update.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_update.c,v 1.113 2019/06/07 09:45:48 claudio Exp $ */
+/* $OpenBSD: rde_update.c,v 1.114 2019/06/11 19:43:56 florian Exp $ */
/*
* Copyright (c) 2004 Claudio Jeker <claudio@openbsd.org>
@@ -308,7 +308,7 @@ up_get_nexthop(struct rde_peer *peer, struct filterstate *state, u_int8_t aid)
* pointing to the peer itself.
*/
if (state->nhflags & NEXTHOP_NOMODIFY &&
- state->nexthop == NULL &&
+ state->nexthop != NULL &&
memcmp(&state->nexthop->exit_nexthop,
&peer->remote_addr, sizeof(peer->remote_addr)) != 0) {
/* no modify flag set and nexthop not peer addr */