Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 4 Jan 2012 13:23:51 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r229476 - head/sys/netinet
Message-ID:  <201201041323.q04DNppc079595@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Wed Jan  4 13:23:51 2012
New Revision: 229476
URL: http://svn.freebsd.org/changeset/base/229476

Log:
  Fix the SIOC[DG]LIFADDR ioctls in in_lifaddr_ioctl() to work with IPv4
  interface address rather than IPv6.
  
  Submitted by:	hrs
  Reviewed by:	bz
  MFC after:	1 week

Modified:
  head/sys/netinet/in.c

Modified: head/sys/netinet/in.c
==============================================================================
--- head/sys/netinet/in.c	Wed Jan  4 12:54:35 2012	(r229475)
+++ head/sys/netinet/in.c	Wed Jan  4 13:23:51 2012	(r229476)
@@ -735,7 +735,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo
 		if (iflr->flags & IFLR_PREFIX)
 			return (EINVAL);
 
-		/* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR_IN6). */
+		/* copy args to in_aliasreq, perform ioctl(SIOCAIFADDR). */
 		bzero(&ifra, sizeof(ifra));
 		bcopy(iflr->iflr_name, ifra.ifra_name,
 			sizeof(ifra.ifra_name));
@@ -785,7 +785,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo
 		}
 
 		TAILQ_FOREACH(ifa, &ifp->if_addrhead, ifa_link)	{
-			if (ifa->ifa_addr->sa_family != AF_INET6)
+			if (ifa->ifa_addr->sa_family != AF_INET)
 				continue;
 			if (match.s_addr == 0)
 				break;
@@ -817,7 +817,7 @@ in_lifaddr_ioctl(struct socket *so, u_lo
 		} else {
 			struct in_aliasreq ifra;
 
-			/* fill in_aliasreq and do ioctl(SIOCDIFADDR_IN6) */
+			/* fill in_aliasreq and do ioctl(SIOCDIFADDR) */
 			bzero(&ifra, sizeof(ifra));
 			bcopy(iflr->iflr_name, ifra.ifra_name,
 				sizeof(ifra.ifra_name));



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201041323.q04DNppc079595>