Subject: kern/29766: Error in comments in sys/netinet/in.c
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: Chris Ross <cross+netbsd@distal.com>
List: netbsd-bugs
Date: 03/22/2005 23:01:00
>Number:         29766
>Category:       kern
>Synopsis:       Incomplete correction of comments in netinet/in.c
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Mar 22 23:01:00 +0000 2005
>Originator:     Chris Ross
>Release:        NetBSD 2.0.1, 2.99.16, 3.99.1
>Organization:
>Environment:
System: NetBSD skaro.distal.com 2.99.16 NetBSD 2.99.16 (GENERIC.MPACPI) #6: Fri Feb 18 03:30:16 EST 2005 cross@skaro.distal.com:/data/obj/NetBSD.i386/data/NetBSD/src/sys/arch/i386/compile/GENERIC.MPACPI i386
Architecture: i386
Machine: i386
>Description:
	In May of 2004, a correction was made (by itojun) to 
sys/netinet/in.c, adjusting the SIOC[AD]LIFADDR calls so that
they were for IPv4, rather than IPv6.  He only changed one
line of functional code, but the changes he made to the two
comment lines were incorrect.  It now references a symbol that
doesn't exist.
>How-To-Repeat:
	Look at sys/netinet/in.c
>Fix:
	Simple patch included:

--- in.c.orig	2005-03-21 09:10:27.000000000 -0500
+++ in.c	2005-03-22 17:59:06.000000000 -0500
@@ -663,7 +663,7 @@
 		if (iflr->flags & IFLR_PREFIX)
 			return EINVAL;
 
-		/* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR_IN). */
+		/* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR). */
 		bzero(&ifra, sizeof(ifra));
 		bcopy(iflr->iflr_name, ifra.ifra_name,
 			sizeof(ifra.ifra_name));
@@ -751,7 +751,7 @@
 		} else {
 			struct in_aliasreq ifra;
 
-			/* fill in_aliasreq and do ioctl(SIOCDIFADDR_IN) */
+			/* fill in_aliasreq and do ioctl(SIOCDIFADDR) */
 			bzero(&ifra, sizeof(ifra));
 			bcopy(iflr->iflr_name, ifra.ifra_name,
 				sizeof(ifra.ifra_name));