diff options
author | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-17 14:40:17 +0000 |
---|---|---|
committer | Henning Brauer <henning@cvs.openbsd.org> | 2004-02-17 14:40:17 +0000 |
commit | 702683a1d4b10d5288762fe29cdd853ed3de4552 (patch) | |
tree | 0a5755e87af5246baa2396f2b1f74c6f7b69ece2 /usr.sbin | |
parent | 20e8412ded310b1f505273cc43fdc6b05bac041e (diff) |
init len for getsockname and getpeername, found and ok claudio
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/session.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.sbin/bgpd/session.c b/usr.sbin/bgpd/session.c index e908a9ee0cd..f46c42acc6f 100644 --- a/usr.sbin/bgpd/session.c +++ b/usr.sbin/bgpd/session.c @@ -1,4 +1,4 @@ -/* $OpenBSD: session.c,v 1.110 2004/02/16 13:17:31 claudio Exp $ */ +/* $OpenBSD: session.c,v 1.111 2004/02/17 14:40:16 henning Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -873,9 +873,11 @@ session_tcp_established(struct peer *peer) socklen_t len; session_socket_blockmode(peer->sock, BM_NORMAL); + len = sizeof(peer->sa_local); if (getsockname(peer->sock, (struct sockaddr *)&peer->sa_local, &len) == -1) log_warn("getsockname"); + len = sizeof(peer->sa_remote); if (getpeername(peer->sock, (struct sockaddr *)&peer->sa_remote, &len) == -1) log_warn("getpeername"); |