diff options
Diffstat (limited to 'sbin/isakmpd/monitor_fdpass.c')
-rw-r--r-- | sbin/isakmpd/monitor_fdpass.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sbin/isakmpd/monitor_fdpass.c b/sbin/isakmpd/monitor_fdpass.c index 2ead0b48896..aef0e998bd8 100644 --- a/sbin/isakmpd/monitor_fdpass.c +++ b/sbin/isakmpd/monitor_fdpass.c @@ -1,4 +1,4 @@ -/* $OpenBSD: monitor_fdpass.c,v 1.13 2008/03/02 18:47:29 hshoexer Exp $ */ +/* $OpenBSD: monitor_fdpass.c,v 1.14 2008/03/13 01:49:52 deraadt Exp $ */ /* * Copyright 2001 Niels Provos <provos@citi.umich.edu> @@ -41,16 +41,16 @@ mm_send_fd(int socket, int fd) struct msghdr msg; union { struct cmsghdr hdr; - char tmp[CMSG_SPACE(sizeof(int))]; - } tmp; + char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; char ch = '\0'; struct cmsghdr *cmsg; struct iovec vec; ssize_t n; bzero(&msg, sizeof msg); - msg.msg_control = (caddr_t)&tmp; - msg.msg_controllen = CMSG_LEN(sizeof(int)); + msg.msg_control = (caddr_t)&cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = CMSG_LEN(sizeof(int)); cmsg->cmsg_level = SOL_SOCKET; @@ -80,8 +80,8 @@ mm_receive_fd(int socket) struct msghdr msg; union { struct cmsghdr hdr; - char tmp[CMSG_SPACE(sizeof(int))]; - } tmp; + char buf[CMSG_SPACE(sizeof(int))]; + } cmsgbuf; char ch; struct cmsghdr *cmsg; struct iovec vec; @@ -93,8 +93,8 @@ mm_receive_fd(int socket) vec.iov_len = 1; msg.msg_iov = &vec; msg.msg_iovlen = 1; - msg.msg_control = &tmp; - msg.msg_controllen = sizeof tmp; + msg.msg_control = &cmsgbuf.buf; + msg.msg_controllen = sizeof(cmsgbuf.buf); if ((n = recvmsg(socket, &msg, 0)) == -1) { log_error("mm_receive_fd: recvmsg"); |