summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ripd/packet.c
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2008-03-15 16:24:58 +0000
committerderaadt <deraadt@openbsd.org>2008-03-15 16:24:58 +0000
commitab3651eb083efd2fd0cb3b11f10d41dbb487ef9c (patch)
treefd47f396f559c0b803955fd8f5e0f6fd5f509c65 /usr.sbin/ripd/packet.c
parentrepair msg_controllen and also an errant buf[CMSG_LEN(..)] decl (diff)
downloadwireguard-openbsd-ab3651eb083efd2fd0cb3b11f10d41dbb487ef9c.tar.xz
wireguard-openbsd-ab3651eb083efd2fd0cb3b11f10d41dbb487ef9c.zip
Repair more msg_controllen dealing with structures or arrays of
descriptors; ok hshoexer, also looked at by kettenis and henning
Diffstat (limited to 'usr.sbin/ripd/packet.c')
-rw-r--r--usr.sbin/ripd/packet.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/ripd/packet.c b/usr.sbin/ripd/packet.c
index e314cbadeab..697abf93e69 100644
--- a/usr.sbin/ripd/packet.c
+++ b/usr.sbin/ripd/packet.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: packet.c,v 1.8 2008/03/13 01:49:53 deraadt Exp $ */
+/* $OpenBSD: packet.c,v 1.9 2008/03/15 16:24:58 deraadt Exp $ */
/*
* Copyright (c) 2006 Michele Marchetto <mydecay@openbeer.it>
@@ -113,7 +113,7 @@ recv_packet(int fd, short event, void *bula)
msg.msg_iov = &iov;
msg.msg_iovlen = 1;
msg.msg_control = &cmsgbuf.buf;
- msg.msg_controllen = sizeof(&cmsgbuf.buf);
+ msg.msg_controllen = CMSG_LEN(sizeof(struct sockaddr_dl));
if ((r = recvmsg(fd, &msg, 0)) == -1) {
if (errno != EINTR && errno != EAGAIN)