Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/rtadvd Fix regression on sending RA messages



details:   https://anonhg.NetBSD.org/src/rev/45aa88cd4973
branches:  trunk
changeset: 809033:45aa88cd4973
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Jun 15 04:15:33 2015 +0000

description:
Fix regression on sending RA messages

r1.48 dropped hoplimit cmsg but forgot to adjust cmsg buffer length.

Reported by Timo Buhrmester

diffstat:

 usr.sbin/rtadvd/rtadvd.c |  5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diffs (19 lines):

diff -r ee4901722342 -r 45aa88cd4973 usr.sbin/rtadvd/rtadvd.c
--- a/usr.sbin/rtadvd/rtadvd.c  Mon Jun 15 02:55:02 2015 +0000
+++ b/usr.sbin/rtadvd/rtadvd.c  Mon Jun 15 04:15:33 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: rtadvd.c,v 1.49 2015/06/05 15:41:59 roy Exp $  */
+/*     $NetBSD: rtadvd.c,v 1.50 2015/06/15 04:15:33 ozaki-r Exp $      */
 /*     $KAME: rtadvd.c,v 1.92 2005/10/17 14:40:02 suz Exp $    */
 
 /*
@@ -1503,8 +1503,7 @@
                exit(1);
        }
 
-       sndcmsgbuflen = CMSG_SPACE(sizeof(struct in6_pktinfo)) + 
-                               CMSG_SPACE(sizeof(int));
+       sndcmsgbuflen = CMSG_SPACE(sizeof(struct in6_pktinfo));
        sndcmsgbuf = malloc(sndcmsgbuflen);
        if (sndcmsgbuf == NULL) {
                syslog(LOG_ERR, "<%s> malloc: %m", __func__);



Home | Main Index | Thread Index | Old Index