From nobody@FreeBSD.org  Thu Oct 17 10:48:55 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115])
	(using TLSv1 with cipher ADH-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by hub.freebsd.org (Postfix) with ESMTP id DCCEE768
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Oct 2013 10:48:55 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by mx1.freebsd.org (Postfix) with ESMTPS id B032624E6
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Oct 2013 10:48:55 +0000 (UTC)
Received: from oldred.freebsd.org ([127.0.1.6])
	by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r9HAmtL0038597
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 17 Oct 2013 10:48:55 GMT
	(envelope-from nobody@oldred.freebsd.org)
Received: (from nobody@localhost)
	by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r9HAmtKu038593;
	Thu, 17 Oct 2013 10:48:55 GMT
	(envelope-from nobody)
Message-Id: <201310171048.r9HAmtKu038593@oldred.freebsd.org>
Date: Thu, 17 Oct 2013 10:48:55 GMT
From: Ole Myhre <ole@dataoppdrag.no>
To: freebsd-gnats-submit@FreeBSD.org
Subject: carp stuck in INIT state
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         183047
>Category:       kern
>Synopsis:       [carp] carp stuck in INIT state
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    glebius
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 10:50:00 UTC 2013
>Closed-Date:    
>Last-Modified:  Sun May 04 05:27:26 UTC 2014
>Originator:     Ole Myhre
>Release:        10.0-BETA1
>Organization:
Dataoppdrag AS
>Environment:
FreeBSD fw1.internal 10.0-BETA1 FreeBSD 10.0-BETA1 #0: Wed Oct 16 12:03:07 CEST 2013     root@fw1.internal:/usr/obj/usr/src/sys/FIREWALL  amd64
>Description:
When configuring carp on an interface that has no previous configuration (such as during boot), carp is stuck in INIT until vhid and inet address are set two more times.
>How-To-Repeat:
[root@fw1 ~]# ifconfig lagg0.1200 create
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 vhid 1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
        carp: INIT vhid 1 advbase 1 advskew 0
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
ifconfig: ioctl (SIOCAIFADDR): Protocol not available
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
[root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24
[root@fw1 ~]# ifconfig lagg0.1200
lagg0.1200: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> metric 0 mtu 9000
        options=303<RXCSUM,TXCSUM,TSO4,TSO6>
        ether 00:25:90:9a:a6:e0
        inet 10.0.0.1 netmask 0xffffff00 broadcast 10.0.0.255 vhid 1
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
        media: Ethernet autoselect
        status: active
        vlan: 1200 parent interface: lagg0
        carp: MASTER vhid 1 advbase 1 advskew 0
[root@fw1 ~]#

>Fix:


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->glebius 
Responsible-Changed-By: glebius 
Responsible-Changed-When: Thu Oct 17 14:50:17 UTC 2013 
Responsible-Changed-Why:  
Mine 

http://www.freebsd.org/cgi/query-pr.cgi?pr=183047 

From: Gleb Smirnoff <glebius@FreeBSD.org>
To: Ole Myhre <ole@dataoppdrag.no>
Cc: freebsd-gnats-submit@FreeBSD.org
Subject: Re: kern/183047: carp stuck in INIT state
Date: Thu, 17 Oct 2013 18:49:51 +0400

   Ole,
 
 O> When configuring carp on an interface that has no previous configuration (such as during boot), carp is stuck in INIT until vhid and inet address are set two more times.
 
 Yep, known problem. :( I tried to fix it a year ago, but backed out
 fix due to some fallouts. I promise to get back to it, but won't
 be in time before 10.0-RELEASE.
 
 Meanwhile, the working command sequence would be:
 
 [root@fw1 ~]# ifconfig lagg0.1200 create
 [root@fw1 ~]# ifconfig lagg0.1200 vhid 1 10.0.0.1/24 up
 
 Notice the "up" keyword. It will make ifconfig(8) to do SIOCSIFFLAGS
 kick to the interface.
 
 In rc.conf you need to specify it too:
 
 ifconfig_lagg0="vhid 1 10.0.0.1/24 up"
 
 P.S. For reference, here is my bad attempt on fixing this:
 
 http://freshbsd.org/commit/freebsd/r244678
 
 It was reverted later.
 
 -- 
 Totus tuus, Glebius.
>Unformatted:
