From owner-freebsd-pf@FreeBSD.ORG Mon Jun 13 15:35:59 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 51CF816A41C; Mon, 13 Jun 2005 15:35:59 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (comp.chem.msu.su [158.250.32.97]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3925643D1D; Mon, 13 Jun 2005 15:35:56 +0000 (GMT) (envelope-from yar@comp.chem.msu.su) Received: from comp.chem.msu.su (localhost [127.0.0.1]) by comp.chem.msu.su (8.13.3/8.13.3) with ESMTP id j5DFZpWU055649; Mon, 13 Jun 2005 19:35:51 +0400 (MSD) (envelope-from yar@comp.chem.msu.su) Received: (from yar@localhost) by comp.chem.msu.su (8.13.3/8.13.3/Submit) id j5DFZprB055648; Mon, 13 Jun 2005 19:35:51 +0400 (MSD) (envelope-from yar) Date: Mon, 13 Jun 2005 19:35:50 +0400 From: Yar Tikhiy To: Josh Kayse Message-ID: <20050613153550.GA54388@comp.chem.msu.su> References: <7c8f2792050610090049064e11@mail.gmail.com> <7c8f279205061116021f55e8da@mail.gmail.com> <7c8f279205061307103b1782f4@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7c8f279205061307103b1782f4@mail.gmail.com> User-Agent: Mutt/1.5.9i 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 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 15:35:59 -0000 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 = 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 2004 > +++ /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 |= IFF_RUNNING; > + ifp->if_flags = LINK_STATE_UP; > } > break; I'm afraid you're totally wrong here. 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. 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. -- Yar