Bug 191415 - [carp] CARP password with "-" causes /etc/rc.d/netif to infinite loop
Summary: [carp] CARP password with "-" causes /etc/rc.d/netif to infinite loop
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 10.0-RELEASE
Hardware: Any Any
: Normal Affects Some People
Assignee: Hiroki Sato
Depends on:
Reported: 2014-06-26 16:54 UTC by Vick Khera
Modified: 2015-11-12 12:02 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Vick Khera 2014-06-26 16:54:49 UTC
I just upgraded a system from freebsd 9.1 to 10.0-p6. It is a member of a CARP
cluster, so I updated the configuration as follows:

 ifconfig_em0_alias0="inet vhid 205 advskew 100 pass aaa-bbb"

in my /etc/rc.conf file. Previously, it was on a cloned interface carp0. The
em0 interface also has its own IP address for the machine.

On reboot, the machine 'hangs' running /etc/rc.d/netif. Booting into single
user and commenting out that one line lets it boot, albeit without the
necessary CARP address activated.

I played around with it, and I discovered that if I remove the "-" in the
password, the netif script completes.

However, it still does not apply the CARP address alias, but this PR is about
the infinite loop, and likely I'm doing something wrong to set the address.

System: FreeBSD redfish.kcilink.com 10.0-RELEASE-p6 FreeBSD 10.0-RELEASE-p6 #2 r267868: Wed Jun 25 09:49:14 EDT 2014 vivek@lorax.kcilink.com:/u/lorax1/usr10/obj/u/lorax1/usr10/src/sys/KCI64 amd64

add an alias similar to the one above, then run

sh -x /etc/rc.d/netif restart

to watch it go into an infinite loop.

Do not use "-" in the CARP password of an ifconfig alias in /etc/rc.conf
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-07-08 02:06:41 UTC
Over to -net; notify -rc.
Comment 2 Hiroki Sato freebsd_committer 2014-11-03 01:26:05 UTC
Comment 3 Hiroki Sato freebsd_committer 2014-11-04 00:37:34 UTC
This issue was fixed in r272858 on stable/10.  For 10.0-R you can apply a change of r272858 or replace /etc/network.subr with the latest version.
Comment 4 Anton Yuzhaninov 2015-11-12 12:02:14 UTC
I use FreeBSD 10 with this fix (r290229) but still my server hang on /etc/rc.d/netif restart if "-" used in carp password.

top from console show high CPU usage by sh /etc/rc.d/netif - seems to be infinite loop somewhere.

ifconfig_vlan301_alias5="vhid 140 advskew 50 pass foo01-bar_abc" # infinite loop

ifconfig_vlan301_alias5="vhid 140 advskew 50 pass foo01_abc" # works