From owner-freebsd-pf@FreeBSD.ORG Thu Nov 18 01:06:31 2004 Return-Path: Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5E5BA16A4CE for ; Thu, 18 Nov 2004 01:06:31 +0000 (GMT) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id E4E9843D49 for ; Thu, 18 Nov 2004 01:06:30 +0000 (GMT) (envelope-from max@love2party.net) Received: from [212.227.126.205] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1CUako-0006GD-00; Thu, 18 Nov 2004 02:06:30 +0100 Received: from [217.83.7.105] (helo=donor.laier.local) by mrelayng.kundenserver.de with asmtp (TLSv1:RC4-MD5:128) (Exim 3.35 #1) id 1CUakn-0008O0-00; Thu, 18 Nov 2004 02:06:30 +0100 From: Max Laier To: freebsd-pf@freebsd.org Date: Thu, 18 Nov 2004 02:06:49 +0100 User-Agent: KMail/1.7.1 References: <20041117125515.O693@localhost> In-Reply-To: <20041117125515.O693@localhost> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart5026856.xoVJoGibPO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200411180206.51218.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:61c499deaeeba3ba5be80f48ecc83056 Subject: Re: carp observations X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical discussion and general questions about packet filter (pf) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Nov 2004 01:06:31 -0000 --nextPart5026856.xoVJoGibPO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Wednesday 17 November 2004 19:06, Matthew George wrote: > a couple of things I've noticed playing with carp ... Thanks. I'll work through it over the weekend, I guess. > 1) carp0 can't be destroyed, but there's no problem with carp[>0] > > mdg# ifconfig carp0 192.168.3.0/24 > mdg# ifconfig carp0 destroy > ifconfig: SIOCIFDESTROY: Invalid argument > mdg# ifconfig carp1 create > mdg# ifconfig carp1 destroy > [carp1 gone] Okay, this is a oneliner in the CLONE macro: =2D-- /tmp/tmp.2611.0 Thu Nov 18 02:04:58 2004 +++ /home/mlaier/devel/p4/carp2/sys/netinet/ip_carp.c Thu Nov 18 02:04:53= =20 2004 @@ -205,7 +205,7 @@ #endif static LIST_HEAD(, carp_softc) carpif_list; =2DIFC_SIMPLE_DECLARE(carp, 1); +IFC_SIMPLE_DECLARE(carp, 0); static __inline u_int16_t carp_cksum(struct mbuf *m, int len) > 2) here I'm trying to setup carp for a network that isn't assigned to any > of my interfaces > > mdg# ifconfig carp0 192.168.7.0/24 > ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address > > somewhat expected, so I assign an address to dc3 and try again: > > mdg# ifconfig dc3 192.168.7.1/24 > mdg# ifconfig carp0 192.168.7.0/24 > ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address > > interestingly enough, the same does not apply to a new carp interface. > once it sees I've assigned the address to dc3, it stops complaining. > > mdg# ifconfig dc3 delete > mdg# ifconfig carp1 create > mdg# ifconfig carp1 inet 192.168.7.0/24 > ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address > mdg# ifconfig dc3 192.168.7.1/24 > mdg# ifconfig carp1 inet 192.168.7.0/24 > [created no problem] > > so carp1 will work properly, but carp0 still won't: > > mdg# ifconfig carp1 delete > mdg# ifconfig carp0 192.168.7.0/24 > ifconfig: ioctl (SIOCAIFADDR): Can't assign requested address > > I find that carp0 will be fine after a reboot as long as the ethernet > interface is configured before the carp interface, but a reboot does seem > to be necessary to recover. Hmmm ... I seem to mess some state on this particular error return. I'll lo= ok=20 at it. Thank you very much, helpful report! =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart5026856.xoVJoGibPO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.6 (FreeBSD) iD8DBQBBm/WrXyyEoT62BG0RAjXxAJ9x5u4iD3CPEl0R/yGd19QddaJDjACfQ5N8 nv8bZ9d00hPG6E/dSCx18lw= =4ECV -----END PGP SIGNATURE----- --nextPart5026856.xoVJoGibPO--