diff options
Diffstat (limited to 'usr.sbin/rtsold/probe.c')
-rw-r--r-- | usr.sbin/rtsold/probe.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/rtsold/probe.c b/usr.sbin/rtsold/probe.c index d6b42445863..33720656bc5 100644 --- a/usr.sbin/rtsold/probe.c +++ b/usr.sbin/rtsold/probe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: probe.c,v 1.10 2003/10/05 15:29:28 deraadt Exp $ */ +/* $OpenBSD: probe.c,v 1.11 2008/03/18 19:32:19 deraadt Exp $ */ /* $KAME: probe.c,v 1.16 2002/06/10 20:00:36 itojun Exp $ */ /* @@ -64,11 +64,13 @@ int probe_init(void) { int scmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) + + CMSG_LEN(sizeof(int)); + int scmsgspace = CMSG_SPACE(sizeof(struct in6_pktinfo)) + CMSG_SPACE(sizeof(int)); static u_char *sndcmsgbuf = NULL; if (sndcmsgbuf == NULL && - (sndcmsgbuf = (u_char *)malloc(scmsglen)) == NULL) { + (sndcmsgbuf = (u_char *)malloc(scmsgspace)) == NULL) { warnmsg(LOG_ERR, __func__, "malloc failed"); return(-1); } |