summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bgpd
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2019-10-01 09:03:43 +0000
committerclaudio <claudio@openbsd.org>2019-10-01 09:03:43 +0000
commit99bf39cb214ae290e1aff5c2e257eb5cb0cf5485 (patch)
tree072a1161c5d9a6a71b68e77949945e4ee8469b70 /usr.sbin/bgpd
parentRemove leftover pfkey_remove() call in session.c this code was moved to (diff)
downloadwireguard-openbsd-99bf39cb214ae290e1aff5c2e257eb5cb0cf5485.tar.xz
wireguard-openbsd-99bf39cb214ae290e1aff5c2e257eb5cb0cf5485.zip
Use the peer list from the right struct bgpd_config. Don't use the global
conf here eventhough it is the same. OK benno@
Diffstat (limited to 'usr.sbin/bgpd')
-rw-r--r--usr.sbin/bgpd/session.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 3ee4db9921c..c241d5a1a03 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.392 2019/10/01 08:59:43 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.393 2019/10/01 09:03:43 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -3169,7 +3169,7 @@ merge_peers(struct bgpd_config *c, struct bgpd_config *nc)
{
struct peer *p, *np, *next;
- RB_FOREACH(p, peer_head, &conf->peers) {
+ RB_FOREACH(p, peer_head, &c->peers) {
/* templates are handled specially */
if (p->template != NULL)
continue;
@@ -3202,7 +3202,7 @@ merge_peers(struct bgpd_config *c, struct bgpd_config *nc)
/* apply the config to all clones of a template */
if (p->conf.template) {
struct peer *xp;
- RB_FOREACH(xp, peer_head, &conf->peers) {
+ RB_FOREACH(xp, peer_head, &c->peers) {
if (xp->template != p)
continue;
session_template_clone(xp, NULL, xp->conf.id,
@@ -3217,7 +3217,7 @@ merge_peers(struct bgpd_config *c, struct bgpd_config *nc)
/* pfkeys of new peers already loaded by the parent process */
RB_FOREACH_SAFE(np, peer_head, &nc->peers, next) {
RB_REMOVE(peer_head, &nc->peers, np);
- if (RB_INSERT(peer_head, &conf->peers, np) != NULL)
+ if (RB_INSERT(peer_head, &c->peers, np) != NULL)
fatalx("%s: peer tree is corrupt", __func__);
}
}