ifconfig carp0 destroy = kernel panic
    Ed Schouten 
    ed at fxq.nl
       
    Sun Jun  3 14:47:34 UTC 2007
    
    
  
Gleb,
* Gleb Smirnoff <glebius at 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 at fxq.nl>
 WWW: http://g-rave.nl/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20070603/c42cc61d/attachment.pgp
    
    
More information about the freebsd-current
mailing list