Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Oct 2002 13:42:18 +0900
From:      SUZUKI Shinsuke <suz@freebsd.org>
To:        "luke mazza" <lukemazza@hotmail.com>
Cc:        freebsd-bugs@FreeBSD.ORG
Subject:   Re: system kill
Message-ID:  <x7k7kbm6dx.wl@s30.crl.hitachi.co.jp>
In-Reply-To: <F141xN1GwljxkhQVWN1000046d3@hotmail.com>
References:  <F141xN1GwljxkhQVWN1000046d3@hotmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Multipart_Tue_Oct_22_13:42:18_2002-1
Content-Type: text/plain; charset=US-ASCII

Hello Luke,

>>>>> On Sun, 20 Oct 2002 16:31:56 -0700
>>>>> lukemazza@hotmail.com("luke mazza")  said:

> well when playing around trying to troubleshoot some ipv6 issues i came 
> across something i think you guys might want to take a look at
> 
> when i issue the command
> ifconfig stf0 inet 66.69.16.11 alias
> 
> everything crashes and forces reboot
Could you please try this patch?
(it's a patch for current, but I believe it works for 4.7-RELEASE, too)

If you can confirm it works fine, I'll commit it to freebsd-current
(and MFC later).

Thanks,
----
SUZUKI, Shinsuke @ Hitachi / KAME Project



--Multipart_Tue_Oct_22_13:42:18_2002-1
Content-Type: text/plain; charset=US-ASCII

Index: in.c
===================================================================
RCS file: /home/ncvs/src/sys/netinet/in.c,v
retrieving revision 1.66
diff -u -r1.66 in.c
--- in.c	10 Jun 2002 20:05:36 -0000	1.66
+++ in.c	22 Oct 2002 04:37:21 -0000
@@ -664,7 +664,12 @@
 	int s = splimp(), flags = RTF_UP, error = 0;
 
 	oldaddr = ia->ia_addr;
+	if (oldaddr.sin_family == AF_INET)
+		LIST_REMOVE(ia, ia_hash);
 	ia->ia_addr = *sin;
+	if (ia->ia_addr.sin_family == AF_INET)
+		LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr),
+		    ia, ia_hash);
 	/*
 	 * Give the interface a chance to initialize
 	 * if this is its first address,
@@ -673,14 +678,13 @@
 	if (ifp->if_ioctl &&
 	    (error = (*ifp->if_ioctl)(ifp, SIOCSIFADDR, (caddr_t)ia))) {
 		splx(s);
+		/* LIST_REMOVE(ia, ia_hash) is done in in_control */
 		ia->ia_addr = oldaddr;
+		if (ia->ia_addr.sin_family == AF_INET)
+			LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr),
+			    ia, ia_hash);
 		return (error);
 	}
-	if (oldaddr.sin_family == AF_INET)
-		LIST_REMOVE(ia, ia_hash);
-	if (ia->ia_addr.sin_family == AF_INET)
-		LIST_INSERT_HEAD(INADDR_HASH(ia->ia_addr.sin_addr.s_addr),
-		    ia, ia_hash);
 	splx(s);
 	if (scrub) {
 		ia->ia_ifa.ifa_addr = (struct sockaddr *)&oldaddr;

--Multipart_Tue_Oct_22_13:42:18_2002-1--

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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