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>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] Gleb, * Gleb Smirnoff <glebius@FreeBSD.org> wrote: > Please confirm, that this patch fixes your problem: > > http://www.freebsd.org/cgi/cvsweb.cgi/src/sys/netinet/ip_carp.c.diff?r1=text&tr1=1.45&r2=text&tr2=1.47 > > 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 = (struct carp_if *)sc->sc_carpdev->if_carp; TAILQ_FOREACH(vr, &cif->vhif_vrs, sc_list) if (vr != sc && - vr->sc_vhid == carpr.carpr_vhid) - return EEXIST; + vr->sc_vhid == carpr.carpr_vhid) { + error = EEXIST; + goto out; + } } sc->sc_vhid = carpr.carpr_vhid; IFP2ENADDR(sc->sc_ifp)[0] = 0; @@ -1933,6 +1935,7 @@ error = EINVAL; } +out: if (locked) CARP_SCUNLOCK(sc); %%% 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=kern/92776 Yours, -- Ed Schouten <ed@fxq.nl> WWW: http://g-rave.nl/ [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (FreeBSD) iD8DBQFGYtSE52SDGA2eCwURAhAJAJ9PdFRrUmq7rZ1Ry8SjSQXZaqhEqQCfZHEq lcQnshtt//kRFqQYJCub124= =CoeT -----END PGP SIGNATURE-----help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20070603144732.GA45756>
