Date: Sun, 3 Jun 2007 16:47:32 +0200 From: Ed Schouten <ed@fxq.nl> To: Gleb Smirnoff <glebius@FreeBSD.org> Cc: FreeBSD Current <freebsd-current@freebsd.org>, Rudy Rucker <crapsh@monkeybrains.net> Subject: Re: ifconfig carp0 destroy = kernel panic Message-ID: <20070603144732.GA45756@hoeg.nl> In-Reply-To: <20070530105120.GT89017@FreeBSD.org> References: <465BE214.8040502@monkeybrains.net> <20070530105120.GT89017@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
--LZvS9be/3tNcYl/X Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Gleb, * Gleb Smirnoff <glebius@FreeBSD.org> 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 <ed@fxq.nl> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070603144732.GA45756>