From owner-freebsd-bugs@FreeBSD.ORG Fri Oct 13 12:32:00 2006 Return-Path: X-Original-To: freebsd-bugs@hub.freebsd.org Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB0EC16A4AB for ; Fri, 13 Oct 2006 12:31:59 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B783543DBC for ; Fri, 13 Oct 2006 12:30:23 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k9DCUN2C023595 for ; Fri, 13 Oct 2006 12:30:23 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k9DCUNtO023593; Fri, 13 Oct 2006 12:30:23 GMT (envelope-from gnats) Resent-Date: Fri, 13 Oct 2006 12:30:23 GMT Resent-Message-Id: <200610131230.k9DCUNtO023593@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ari Suutari Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5F44016A415 for ; Fri, 13 Oct 2006 12:21:09 +0000 (UTC) (envelope-from asu@guinness.syncrontech.com) Received: from espresso2.syncrontech.com (sync-old.syncrontech.com [213.28.98.35]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C7DA43D80 for ; Fri, 13 Oct 2006 12:21:05 +0000 (GMT) (envelope-from asu@guinness.syncrontech.com) Received: from guinness.syncrontech.com (guinness.syncrontech.com [62.71.8.57]) by espresso2.syncrontech.com (8.13.1/8.13.1) with ESMTP id k9DCL3rx049802 for ; Fri, 13 Oct 2006 15:21:03 +0300 (EEST) (envelope-from asu@guinness.syncrontech.com) Received: from guinness.syncrontech.com (localhost.syncrontech.com [127.0.0.1]) by guinness.syncrontech.com (8.13.4/8.13.4) with ESMTP id k9DCL3Mh014156 for ; Fri, 13 Oct 2006 15:21:03 +0300 (EEST) (envelope-from asu@guinness.syncrontech.com) Received: (from asu@localhost) by guinness.syncrontech.com (8.13.4/8.13.4/Submit) id k9DCL3DR014155; Fri, 13 Oct 2006 15:21:03 +0300 (EEST) (envelope-from asu) Message-Id: <200610131221.k9DCL3DR014155@guinness.syncrontech.com> Date: Fri, 13 Oct 2006 15:21:03 +0300 (EEST) From: Ari Suutari To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: kern/104377: CARP interface doesn't go up on VmWare X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ari Suutari List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Oct 2006 12:32:00 -0000 >Number: 104377 >Category: kern >Synopsis: CARP interface doesn't go up on VmWare >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Fri Oct 13 12:30:20 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Ari Suutari >Release: FreeBSD 6.2-PRERELEASE i386 >Organization: Syncron Tech Oy >Environment: FreeBSD glass.syncrontech.com 6.2-PRERELEASE FreeBSD 6.2-PRERELEASE #0: Fri Oct 13 14:23:21 EEST 2006 asu@glass.syncrontech.com:/usr/src/sys/i386/compile/CARP_GENERIC i386 >Description: When using CARP on system where physical network interface doesn't support link stat reporting, carp device doesn't go up during boot. One can manually up it, but it requires a additional script to be run during boot. This is problem at least under VmWare, but should occur also with older network cards. >How-To-Repeat: Put following lines into /etc/rc.conf on VmWare guest machine: cloned_interfaces="carp0" ifconfig_carp0="inet 192.168.5.59/24 vhid 55 pass xxx123" Reboot the machine. After machine is up, run ifconfig carp0. It displays that interface is not up, and it is in INIT state. >Fix: Apply following patch. It changes the bahaviour of CARP so that it assumes that link is UP unless specifically told by physical interface that it is down (ie. handle LINK_STATE_UNKNOWN more gracefully). I tested this under VmWare (ie. lnc interface) and under real machine (fxp ethernet interface - supports link state reporting, as far as I understad). Both worked ok. Index: ip_carp.c =================================================================== RCS file: /opt/freebsd-cvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.27.2.8 diff -c -r1.27.2.8 ip_carp.c *** ip_carp.c 25 Sep 2006 13:01:59 -0000 1.27.2.8 --- ip_carp.c 13 Oct 2006 11:11:08 -0000 *************** *** 2116,2122 **** { CARP_SCLOCK_ASSERT(sc); ! if (sc->sc_carpdev->if_link_state != LINK_STATE_UP || !(sc->sc_carpdev->if_flags & IFF_UP)) { sc->sc_flags_backup = SC2IFP(sc)->if_flags; SC2IFP(sc)->if_flags &= ~IFF_UP; --- 2116,2122 ---- { CARP_SCLOCK_ASSERT(sc); ! if (sc->sc_carpdev->if_link_state == LINK_STATE_DOWN || !(sc->sc_carpdev->if_flags & IFF_UP)) { sc->sc_flags_backup = SC2IFP(sc)->if_flags; SC2IFP(sc)->if_flags &= ~IFF_UP; >Release-Note: >Audit-Trail: >Unformatted: