summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-09-03 09:06:21 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-09-03 09:06:21 +0000
commit5481162de6431180299147cb307fb08fe2b21b46 (patch)
tree0cd4dcc85e824c840e4afc6f8a22361378e6d33e /usr.sbin
parentec2dc3d89b8fdb08fb78b751a22d47edb67bbc0c (diff)
Use correct destination in memcpy(). Fixes PR6218, OK henning
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/bgpd/session.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c
index 6ed127a8d00..c2f28ed759c 100644
--- a/usr.sbin/bgpd/session.c
+++ b/usr.sbin/bgpd/session.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: session.c,v 1.296 2009/09/02 08:06:42 claudio Exp $ */
+/* $OpenBSD: session.c,v 1.297 2009/09/03 09:06:20 claudio Exp $ */
/*
* Copyright (c) 2003, 2004, 2005 Henning Brauer <henning@openbsd.org>
@@ -2656,7 +2656,7 @@ getpeerbyip(struct sockaddr *ip)
newpeer->conf.remote_masklen = 32;
}
if (newpeer->conf.remote_addr.af == AF_INET6) {
- memcpy(&p->conf.remote_addr.v6,
+ memcpy(&newpeer->conf.remote_addr.v6,
&((struct sockaddr_in6 *)ip)->sin6_addr,
sizeof(newpeer->conf.remote_addr.v6));
newpeer->conf.remote_masklen = 128;