From owner-freebsd-current@FreeBSD.ORG Sun Jun 3 14:47:34 2007 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D780C16A400 for ; Sun, 3 Jun 2007 14:47:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [83.98.131.211]) by mx1.freebsd.org (Postfix) with ESMTP id 9E22C13C447 for ; Sun, 3 Jun 2007 14:47:34 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: by palm.hoeg.nl (Postfix, from userid 1000) id CCC1A1CD65; Sun, 3 Jun 2007 16:47:32 +0200 (CEST) Date: Sun, 3 Jun 2007 16:47:32 +0200 From: Ed Schouten To: Gleb Smirnoff Message-ID: <20070603144732.GA45756@hoeg.nl> References: <465BE214.8040502@monkeybrains.net> <20070530105120.GT89017@FreeBSD.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="LZvS9be/3tNcYl/X" Content-Disposition: inline In-Reply-To: <20070530105120.GT89017@FreeBSD.org> User-Agent: Mutt/1.5.15 (2007-04-06) Cc: FreeBSD Current , Rudy Rucker Subject: Re: ifconfig carp0 destroy = kernel panic X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Jun 2007 14:47:34 -0000 --LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Gleb, * Gleb Smirnoff wrote: > Please confirm, that this patch fixes your problem: >=20 > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/ip_carp.c.diff?r1= =3Dtext&tr1=3D1.45&r2=3Dtext&tr2=3D1.47 >=20 > I will merge it to RELENG_6. Please take a look at this patch as well. It has been lying around in GNATS for some time and it really makes me go insane a lot of times: %%% --- src/sys/netinet/ip_carp.c Sat Jan 20 00:01:33 2007 +++ src/sys/netinet/ip_carp.c Sun Feb 18 23:13:01 2007 @@ -1882,8 +1882,10 @@ cif =3D (struct carp_if *)sc->sc_carpdev->if_carp; TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list) if (vr !=3D sc && - vr->sc_vhid =3D=3D carpr.carpr_vhid) - return EEXIST; + vr->sc_vhid =3D=3D carpr.carpr_vhid) { + error =3D EEXIST; + goto out; + } } sc->sc_vhid =3D carpr.carpr_vhid; IFP2ENADDR(sc->sc_ifp)[0] =3D 0; @@ -1933,6 +1935,7 @@ error =3D EINVAL; } =20 +out: if (locked) CARP_SCUNLOCK(sc); =20 %%% Just assign the same VHID to two CARP interfaces and your box panics because it forgets to unlock the CARP device. See also: http://www.freebsd.org/cgi/query-pr.cgi?pr=3Dkern/92776 Yours, --=20 Ed Schouten WWW: http://g-rave.nl/ --LZvS9be/3tNcYl/X Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGYtSE52SDGA2eCwURAhAJAJ9PdFRrUmq7rZ1Ry8SjSQXZaqhEqQCfZHEq lcQnshtt//kRFqQYJCub124= =CoeT -----END PGP SIGNATURE----- --LZvS9be/3tNcYl/X--