summaryrefslogtreecommitdiff
path: root/usr.sbin/route6d/route6d.c
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-24 16:11:09 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2008-03-24 16:11:09 +0000
commit0bdf18c9edb2e6a9fa89a28e89d11e7b6785b1fd (patch)
treebd0dc86a525e38150bde9f0c3d55ad9dfeb4e6a2 /usr.sbin/route6d/route6d.c
parent6e48c70f167662c7aec42af9bafc316e322ef92a (diff)
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 'usr.sbin/route6d/route6d.c')
-rw-r--r--usr.sbin/route6d/route6d.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/route6d/route6d.c b/usr.sbin/route6d/route6d.c
index 4b67a6cfa0b..12f7bf9259c 100644
--- a/usr.sbin/route6d/route6d.c
+++ b/usr.sbin/route6d/route6d.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route6d.c,v 1.50 2008/03/15 16:23:27 deraadt Exp $ */
+/* $OpenBSD: route6d.c,v 1.51 2008/03/24 16:11:05 deraadt Exp $ */
/* $KAME: route6d.c,v 1.111 2006/10/25 06:38:13 jinmei Exp $ */
/*
@@ -31,7 +31,7 @@
*/
#if 0
-static char _rcsid[] = "$OpenBSD: route6d.c,v 1.50 2008/03/15 16:23:27 deraadt Exp $";
+static char _rcsid[] = "$OpenBSD: route6d.c,v 1.51 2008/03/24 16:11:05 deraadt Exp $";
#endif
#include <stdio.h>
@@ -965,7 +965,7 @@ sendpacket(struct sockaddr_in6 *sin6, int len)
} else {
memset(&cmsgbuf, 0, sizeof(cmsgbuf));
m.msg_control = (caddr_t)&cmsgbuf.buf;
- m.msg_controllen = CMSG_LEN(sizeof(struct in6_pktinfo));
+ m.msg_controllen = sizeof(cmsgbuf.buf);
cm = CMSG_FIRSTHDR(&m);
cm->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
cm->cmsg_level = IPPROTO_IPV6;
@@ -1023,7 +1023,7 @@ riprecv(void)
m.msg_iov = iov;
m.msg_iovlen = 1;
m.msg_control = (caddr_t)&cmsgbuf.buf;
- m.msg_controllen = CMSG_LEN(sizeof(struct in6_pktinfo));
+ m.msg_controllen = sizeof(cmsgbuf.buf);
if ((len = recvmsg(ripsock, &m, 0)) < 0) {
fatal("recvmsg");
/*NOTREACHED*/