summaryrefslogtreecommitdiffstats
path: root/libexec/tftp-proxy/tftp-proxy.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-03-24 16:10:55 +0000
committerderaadt <deraadt@openbsd.org>2008-03-24 16:10:55 +0000
commitda15c7b92fde251b1a299693e955917f5aad6df0 (patch)
tree1d86283d59f1d1f4553cd8a4f1f23b37e3de5f92 /libexec/tftp-proxy/tftp-proxy.c
parentWe were led astray (like many others before us) to believe that (diff)
downloadwireguard-openbsd-da15c7b92fde251b1a299693e955917f5aad6df0.tar.xz
wireguard-openbsd-da15c7b92fde251b1a299693e955917f5aad6df0.zip
msg_controllen has to be CMSG_SPACE so that the kernel can account for
each cmsg_len (ie. msg_controllen = sum of CMSG_ALIGN(cmsg_len). This works now that kernel fd passing has been fixed to accept a bit of sloppiness because of this ABI repair. lots of discussion with kettenis
Diffstat (limited to 'libexec/tftp-proxy/tftp-proxy.c')
-rw-r--r--libexec/tftp-proxy/tftp-proxy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/tftp-proxy/tftp-proxy.c b/libexec/tftp-proxy/tftp-proxy.c
index af1b35dbd69..52db0d683c7 100644
--- a/libexec/tftp-proxy/tftp-proxy.c
+++ b/libexec/tftp-proxy/tftp-proxy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tftp-proxy.c,v 1.4 2008/03/15 16:25:00 deraadt Exp $
+/* $OpenBSD: tftp-proxy.c,v 1.5 2008/03/24 16:11:00 deraadt Exp $
*
* Copyright (c) 2005 DLS Internet Services
* Copyright (c) 2004, 2005 Camiel Dobbelaar, <cd@sentia.nl>
@@ -164,7 +164,7 @@ main(int argc, char *argv[])
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = &cmsgbuf.buf;
- msg.msg_controllen = CMSG_LEN(sizeof(struct sockaddr_storage));
+ msg.msg_controllen = sizeof(cmsgbuf.buf);
if (recvmsg(fd, &msg, 0) < 0) {
syslog(LOG_ERR, "recvmsg: %m");