From owner-freebsd-pf@FreeBSD.ORG Mon Jun 13 16:00:38 2005 Return-Path: X-Original-To: freebsd-pf@freebsd.org 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 3F02B16A41C for ; Mon, 13 Jun 2005 16:00:38 +0000 (GMT) (envelope-from josh.kayse@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.196]) by mx1.FreeBSD.org (Postfix) with ESMTP id D176F43D55 for ; Mon, 13 Jun 2005 16:00:37 +0000 (GMT) (envelope-from josh.kayse@gmail.com) Received: by wproxy.gmail.com with SMTP id 70so2151796wra for ; Mon, 13 Jun 2005 09:00:37 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kXIEaF9emsp4M4eo0uf3kFWonVbmEBUTKjlS9U9X/Dvo6VxTfzt6UnWMj1leOd1jctvx5fdQfXsZIWkySzkHrk2WqbvdYqvf7JrMVRMSLf0mwiA42HCwsJRK0ilJcNM9vTp9hLPdlv0D5ujXkQDOkJxlRT/MpgQRS0wQTy1Ytvg= Received: by 10.54.144.9 with SMTP id r9mr2606833wrd; Mon, 13 Jun 2005 09:00:36 -0700 (PDT) Received: by 10.54.23.52 with HTTP; Mon, 13 Jun 2005 09:00:36 -0700 (PDT) Message-ID: <7c8f2792050613090040c924c3@mail.gmail.com> Date: Mon, 13 Jun 2005 12:00:36 -0400 From: Josh Kayse To: Yar Tikhiy In-Reply-To: <20050613153550.GA54388@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <7c8f2792050610090049064e11@mail.gmail.com> <7c8f279205061116021f55e8da@mail.gmail.com> <7c8f279205061307103b1782f4@mail.gmail.com> <20050613153550.GA54388@comp.chem.msu.su> Cc: freebsd-net@freebsd.org, freebsd-pf@freebsd.org Subject: Re: Carp Suppression X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gtg062h@mail.gatech.edu 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: Mon, 13 Jun 2005 16:00:38 -0000 Definitely a typo on my part. It should be ifp->if_link_state =3D LINK_STATE_UP The reason we are using CARP on a PLIP interface is to allow us to have redundant connections between 2 transparent bridging firewalls.=20 Instead of sending packets over our network, we isolate them onto a PLIP interface and crossover interface. We then use ifstaded to monitor the carp interfaces and shut down bridging on one of the machines. I will refrain from submitting any code to the community in the future. On 6/13/05, Yar Tikhiy wrote: > On Mon, Jun 13, 2005 at 10:10:54AM -0400, Josh Kayse wrote: > > One last comment, > > > > I managed to fix it so that carp runs on the plip interface by adding: > > ifp->if_flags =3D LINK_STATE_UP; > > > > Here is the diff: > > > > diff -Nur /usr.orig/src/sys/dev/ppbus/if_plip.c /usr/src/sys/dev/ppbus/= if_plip.c > > --- /usr.orig/src/sys/dev/ppbus/if_plip.c Wed Sep 15 11:14:18 200= 4 > > +++ /usr/src/sys/dev/ppbus/if_plip.c Mon Jun 13 10:05:56 2005 > > @@ -359,6 +359,7 @@ > > > > ppb_wctr(ppbus, IRQENABLE); > > ifp->if_flags |=3D IFF_RUNNING; > > + ifp->if_flags =3D LINK_STATE_UP; > > } > > break; >=20 > I'm afraid you're totally wrong here. >=20 > First, I can't see how CARP is supposed to work on a PLIP interface > or any point-to-point interface at all. CARP is for broadcast > interfaces, such as Ethernet or FDDI, which do ARP. You seem to miss > the point. >=20 > Second, you can't store an arbitrary value into a variable or field > and expect the things to work right. LINK_STATE_UP simply is not for > ifp->if_flags. Please make yourself familiar with the basics of > computer programming before offering your patches to the community. >=20 > -- > Yar >=20 --=20 Joshua Kayse Computer Engineering