Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 13 Jun 2005 19:35:50 +0400
From:      Yar Tikhiy <yar@comp.chem.msu.su>
To:        Josh Kayse <josh.kayse@gmail.com>
Cc:        freebsd-net@freebsd.org, freebsd-pf@freebsd.org
Subject:   Re: Carp Suppression
Message-ID:  <20050613153550.GA54388@comp.chem.msu.su>
In-Reply-To: <7c8f279205061307103b1782f4@mail.gmail.com>
References:  <7c8f2792050610090049064e11@mail.gmail.com> <7c8f279205061116021f55e8da@mail.gmail.com> <7c8f279205061307103b1782f4@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050613153550.GA54388>