diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-15 16:25:01 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2008-03-15 16:25:01 +0000 |
commit | 8332edeb582077739f86f898af5876386fbefc00 (patch) | |
tree | 0bd3f1a3f041252e7c1653278f43184cce9771a3 /usr.sbin/ripd/packet.c | |
parent | 76cd87afedab46927375dd0ceabdedd0d5d56714 (diff) |
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.c | 4 |
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) |