summaryrefslogtreecommitdiff
path: root/usr.sbin/bgpd/session.c
diff options
context:
space:
mode:
authorHenning Brauer <henning@cvs.openbsd.org>2003-12-20 20:24:58 +0000
committerHenning Brauer <henning@cvs.openbsd.org>2003-12-20 20:24:58 +0000
commit6815345aa8fdc3d3edc487cc1972657d0793c78a (patch)
treeecb24dfba493e2f465f78e9beba56404086cab36 /usr.sbin/bgpd/session.c
parent32bcb32b20711879f3097d9b7e644c12870527a8 (diff)
revert last
Diffstat (limited to 'usr.sbin/bgpd/session.c')
-rw-r--r--usr.sbin/bgpd/session.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 642d95134b9..f53fadf57d8 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.17 2003/12/20 20:09:34 henning Exp $ */
+/* $OpenBSD: session.c,v 1.18 2003/12/20 20:24:57 henning Exp $ */
/*
* Copyright (c) 2003 Henning Brauer <henning@openbsd.org>
@@ -1206,7 +1206,7 @@ void
session_dispatch_imsg(int fd, int idx)
{
struct imsg imsg;
- struct peer_config pconf;
+ struct peer_config *pconf;
struct peer *p, *next;
enum reconf_action reconf;
@@ -1226,8 +1226,8 @@ session_dispatch_imsg(int fd, int idx)
case IMSG_RECONF_PEER:
if (idx != PFD_PIPE_MAIN)
fatal("reconf request not from parent", 0);
- memcpy(&pconf, imsg.data, sizeof(pconf));
- p = getpeerbyip(pconf.remote_addr.sin_addr.s_addr);
+ pconf = imsg.data;
+ p = getpeerbyip(pconf->remote_addr.sin_addr.s_addr);
if (p == NULL) {
if ((p = calloc(1, sizeof(struct peer))) ==
NULL)
@@ -1240,21 +1240,21 @@ session_dispatch_imsg(int fd, int idx)
} else
reconf = RECONF_KEEP;
- if (bcmp(&p->conf.remote_addr, &pconf.remote_addr,
+ if (bcmp(&p->conf.remote_addr, &pconf->remote_addr,
sizeof(struct sockaddr_in)))
reconf = RECONF_REINIT;
- if (bcmp(&p->conf.local_addr, &pconf.local_addr,
+ if (bcmp(&p->conf.local_addr, &pconf->local_addr,
sizeof(struct sockaddr_in)))
reconf = RECONF_REINIT;
- if (p->conf.remote_as != pconf.remote_as)
+ if (p->conf.remote_as != pconf->remote_as)
reconf = RECONF_REINIT;
- if (p->conf.distance != pconf.distance)
+ if (p->conf.distance != pconf->distance)
reconf = RECONF_REINIT;
- memcpy(&p->conf, &pconf, sizeof(pconf));
+ memcpy(&p->conf, pconf, sizeof(struct peer_config));
p->conf.reconf_action = reconf;
- if (pconf.reconf_action > reconf)
- p->conf.reconf_action = pconf.reconf_action;
+ if (pconf->reconf_action > reconf)
+ p->conf.reconf_action = pconf->reconf_action;
if (p->state >= STATE_OPENSENT) {
if (p->holdtime == conf->holdtime &&