diff options
Diffstat (limited to 'usr.sbin/traceroute6/traceroute6.c')
-rw-r--r-- | usr.sbin/traceroute6/traceroute6.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/usr.sbin/traceroute6/traceroute6.c b/usr.sbin/traceroute6/traceroute6.c index b2647fb80c4..af4a4b9c452 100644 --- a/usr.sbin/traceroute6/traceroute6.c +++ b/usr.sbin/traceroute6/traceroute6.c @@ -1,4 +1,4 @@ -/* $OpenBSD: traceroute6.c,v 1.44 2008/03/15 16:43:59 deraadt Exp $ */ +/* $OpenBSD: traceroute6.c,v 1.45 2008/03/24 16:11:06 deraadt Exp $ */ /* $KAME: traceroute6.c,v 1.63 2002/10/24 12:53:25 itojun Exp $ */ /* @@ -344,7 +344,7 @@ main(int argc, char *argv[]) { int mib[4] = { CTL_NET, PF_INET6, IPPROTO_IPV6, IPV6CTL_DEFHLIM }; char hbuf[NI_MAXHOST], src0[NI_MAXHOST], *ep; - int ch, i, on = 1, seq, rcvcmsglen, rcvcmsgspace, error, minlen; + int ch, i, on = 1, seq, rcvcmsglen, error, minlen; struct addrinfo hints, *res; static u_char *rcvcmsgbuf; u_long probe, hops, lport; @@ -590,12 +590,10 @@ main(int argc, char *argv[]) rcvmhdr.msg_namelen = sizeof(Rcv); rcvmhdr.msg_iov = rcviov; rcvmhdr.msg_iovlen = 1; - rcvcmsgspace = CMSG_SPACE(sizeof(struct in6_pktinfo)) + - CMSG_SPACE(sizeof(int)); rcvcmsglen = CMSG_SPACE(sizeof(struct in6_pktinfo)) + - CMSG_LEN(sizeof(int)); + CMSG_SPACE(sizeof(int)); - if ((rcvcmsgbuf = malloc(rcvcmsgspace)) == NULL) { + if ((rcvcmsgbuf = malloc(rcvcmsglen)) == NULL) { fprintf(stderr, "traceroute6: malloc failed\n"); exit(1); } |