diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/bgpd/imsg.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospf6d/packet.c | 4 | ||||
-rw-r--r-- | usr.sbin/ospfd/packet.c | 4 | ||||
-rw-r--r-- | usr.sbin/ppp/ppp/bundle.c | 6 | ||||
-rw-r--r-- | usr.sbin/relayd/imsg.c | 4 | ||||
-rw-r--r-- | usr.sbin/ripd/packet.c | 4 |
6 files changed, 13 insertions, 13 deletions
diff --git a/usr.sbin/bgpd/imsg.c b/usr.sbin/bgpd/imsg.c index a939876e637..c9b964507f7 100644 --- a/usr.sbin/bgpd/imsg.c +++ b/usr.sbin/bgpd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.40 2008/03/13 01:49:53 deraadt Exp $ */ +/* $OpenBSD: imsg.c,v 1.41 2008/03/15 16:25:00 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -57,7 +57,7 @@ imsg_read(struct imsgbuf *ibuf) 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(int) * 16); if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { if (errno != EINTR && errno != EAGAIN) { diff --git a/usr.sbin/ospf6d/packet.c b/usr.sbin/ospf6d/packet.c index 96058ebfe52..d6d5e63edb9 100644 --- a/usr.sbin/ospf6d/packet.c +++ b/usr.sbin/ospf6d/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.7 2008/03/13 01:49:53 deraadt Exp $ */ +/* $OpenBSD: packet.c,v 1.8 2008/03/15 16:25:00 deraadt Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -147,7 +147,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 in6_pktinfo)); if ((r = recvmsg(fd, &msg, 0)) == -1) { if (errno != EAGAIN && errno != EINTR) diff --git a/usr.sbin/ospfd/packet.c b/usr.sbin/ospfd/packet.c index 1f63836f7dc..d39e142db75 100644 --- a/usr.sbin/ospfd/packet.c +++ b/usr.sbin/ospfd/packet.c @@ -1,4 +1,4 @@ -/* $OpenBSD: packet.c,v 1.23 2008/03/13 01:49:53 deraadt Exp $ */ +/* $OpenBSD: packet.c,v 1.24 2008/03/15 16:25:00 deraadt Exp $ */ /* * Copyright (c) 2004, 2005 Esben Norby <norby@openbsd.org> @@ -140,7 +140,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 != EAGAIN && errno != EINTR) diff --git a/usr.sbin/ppp/ppp/bundle.c b/usr.sbin/ppp/ppp/bundle.c index 17fad31be59..fd18a89d4ee 100644 --- a/usr.sbin/ppp/ppp/bundle.c +++ b/usr.sbin/ppp/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $OpenBSD: bundle.c,v 1.72 2008/03/13 01:49:53 deraadt Exp $ + * $OpenBSD: bundle.c,v 1.73 2008/03/15 16:25:00 deraadt Exp $ */ #include <sys/param.h> @@ -1418,7 +1418,7 @@ bundle_ReceiveDatalink(struct bundle *bundle, int s) msg.msg_iov = iov; msg.msg_iovlen = 1; /* Only send the version at the first pass */ msg.msg_control = cmsgbuf.buf; - msg.msg_controllen = sizeof cmsgbuf.buf; + msg.msg_controllen = CMSG_LEN(sizeof(int) * SEND_MAXFD); cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = sizeof cmsgbuf.buf; cmsg->cmsg_level = SOL_SOCKET; @@ -1591,7 +1591,7 @@ bundle_SendDatalink(struct datalink *dl, int s, struct sockaddr_un *sun) msg.msg_iovlen = 1; msg.msg_iov = iov; msg.msg_control = &cmsgbuf.buf; - msg.msg_controllen = CMSG_SPACE(sizeof(int) * nfd); + msg.msg_controllen = CMSG_LEN(sizeof(int) * nfd); msg.msg_flags = 0; cmsg = CMSG_FIRSTHDR(&msg); cmsg->cmsg_len = msg.msg_controllen; diff --git a/usr.sbin/relayd/imsg.c b/usr.sbin/relayd/imsg.c index 5915b1fcdb3..d42dc9c252f 100644 --- a/usr.sbin/relayd/imsg.c +++ b/usr.sbin/relayd/imsg.c @@ -1,4 +1,4 @@ -/* $OpenBSD: imsg.c,v 1.12 2008/03/13 01:49:53 deraadt Exp $ */ +/* $OpenBSD: imsg.c,v 1.13 2008/03/15 16:25:00 deraadt Exp $ */ /* * Copyright (c) 2003, 2004 Henning Brauer <henning@openbsd.org> @@ -68,7 +68,7 @@ imsg_read(struct imsgbuf *ibuf) 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(int) * 16); if ((n = recvmsg(ibuf->fd, &msg, 0)) == -1) { if (errno != EINTR && errno != EAGAIN) { 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) |