Subject: bin/11615: pim6sd(8) has alignment problem
To: None <gnats-bugs@gnats.netbsd.org>
From: None <ura@hiru.aoba.yokohama.jp>
List: netbsd-bugs
Date: 11/30/2000 05:51:16
>Number:         11615
>Category:       bin
>Synopsis:       pim6sd(8) has alignment problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 30 05:51:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     URA Hiroshi
>Release:        kernel 1.5K (2000/11/11) / userland 1.5G (2000/10/25)
>Organization:
>Environment:
System: NetBSD uzuki.hiru.aoba.yokohama.jp 1.5K NetBSD 1.5K (UZUKI) #18: Sat Nov 11 22:53:48 JST 2000 ura@uzuki.hiru.aoba.yokohama.jp:/amd/yayoi/usr/local/src/NetBSD/current/src/sys/arch/sparc/compile/UZUKI sparc


>Description:
When pim6sd(8) sends mld6 packets, it writes the following warning messages
to /var/log/pim6sd.log.

pim6sd: 22:41:12.605 warning - sendmsg to ff02::1 with src fe80::a00:20ff:fe11:45f1 on le0: Invalid argument
pim6sd: 22:41:12.611 warning - sendmsg to ff02::1 with src fe80::a00:20ff:fe11:45f1 on gif0: Invalid argument

>How-To-Repeat:
on NetBSD/sparc, try to pim6sd and see /var/log/pim6sd.log

	
>Fix:
	apply this path.

Index: mld6.c
===================================================================
RCS file: /cvsroot/netbsd/basesrc/usr.sbin/pim6sd/mld6.c,v
retrieving revision 1.6
diff -u -u -r1.6 mld6.c
--- mld6.c	2000/10/12 06:33:24	1.6
+++ mld6.c	2000/11/30 13:24:55
@@ -473,7 +473,7 @@
 	    if (ifindex != -1 || src) {
 		    struct in6_pktinfo *pktinfo;
 
-		    cmsgp->cmsg_len = CMSG_SPACE(sizeof(struct in6_pktinfo));
+		    cmsgp->cmsg_len = CMSG_LEN(sizeof(struct in6_pktinfo));
 		    cmsgp->cmsg_level = IPPROTO_IPV6;
 		    cmsgp->cmsg_type = IPV6_PKTINFO;
 		    pktinfo = (struct in6_pktinfo *)CMSG_DATA(cmsgp);
@@ -489,7 +489,7 @@
 		    int currentlen;
 		    void *hbhbuf, *optp = NULL;
 
-		    cmsgp->cmsg_len = CMSG_SPACE(hbhlen);
+		    cmsgp->cmsg_len = CMSG_LEN(hbhlen);
 		    cmsgp->cmsg_level = IPPROTO_IPV6;
 		    cmsgp->cmsg_type = IPV6_HOPOPTS;
 		    hbhbuf = CMSG_DATA(cmsgp);
>Release-Note:
>Audit-Trail:
>Unformatted: