Date: Fri, 25 Nov 2016 16:04:59 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-net@FreeBSD.org Subject: [Bug 213410] [carp] service netif restart causes hang only when carp is enabled Message-ID: <bug-213410-2472-nNK87GnGYg@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-213410-2472@https.bugs.freebsd.org/bugzilla/> References: <bug-213410-2472@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D213410 Kristof Provost <kp@freebsd.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kp@freebsd.org --- Comment #1 from Kristof Provost <kp@freebsd.org> --- I=E2=80=99ve had a very quick look, and at first glance it seems like an ov= erly strict KASSERT() more than anything else. Basically, during service netif restart the scripts try to set up carp on an address that=E2=80=99s already got it configured. That runs into the assert= and panics the box (or actually panics later on if INVARIANTS is not set). Simply replacing the KASSERT with a check (and returning errors) prevents t= he panic. I don=E2=80=99t have a carp test setup, but this should make things a lot b= etter already. Can you check if this works for you? diff --git a/sys/netinet/ip_carp.c b/sys/netinet/ip_carp.c index 7855af2..ea27f0a 100644 --- a/sys/netinet/ip_carp.c +++ b/sys/netinet/ip_carp.c @@ -1804,7 +1804,8 @@ carp_attach(struct ifaddr *ifa, int vhid) struct carp_softc *sc; int index, error; - KASSERT(ifa->ifa_carp =3D=3D NULL, ("%s: ifa %p attached", __func__= , ifa)); + if (ifa->ifa_carp !=3D NULL) + return (EBUSY); switch (ifa->ifa_addr->sa_family) { #ifdef INET --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-213410-2472-nNK87GnGYg>