Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 20 May 2001 11:16:36 +0200
From:      Gary Jennejohn <garyj@jennejohn.org>
To:        Nicolas Souchu <nsouch@fr.alcove.com>, freebsd-isdn@freebsd.org
Subject:   Re: Provider's LCP requests :(
Message-ID:  <01052011163602.37452@peedub.muc.de>
In-Reply-To: <01052009280600.37452@peedub.muc.de>
References:  <20010519234306.A12266@ontario.alcove-fr> <01052009280600.37452@peedub.muc.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sunday 20 May 2001 09:28, Gary Jennejohn wrote:
> On Saturday 19 May 2001 23:43, Nicolas Souchu wrote:
> > My provider send every 10s an LCP request. The interface never
> > disconnect because of this traffic.
> >
> > I've applied Gary's patch on my 4.3-stable but it does not seem to
> > work :(
> >
> > How does this patch work actually? There's nothing related to LCP
> > requests in it. Surprisingly, the patch has been reported to work
> > last year.
> >
> > Thanks in advance.
>
> Hmmm... remind me which patch this is (there's been a lot of water under
> the bridge since then) and I'll try to explain how it works. A reference to
> something in the mailling list archive would be nice.

OK, I now know what the patch is supposed to do. Funny that it's only in 
-current but never made it into -stable.

Basically the patch adds 2 new fields to struct sppp - pp_last_{sent,recv}.
NOTE: this change to struct sppp means that you _must_ also recompile 
spppcontrol !

The new fields are set in if_spppsubr.c whenever a "normal" packet goes 
out/comes in over the interface in sppp_output() and sppp_input() resp. 
Control packets such as LCP stuff should not be reflected since sppp_input() 
should be exited early and sppp_output() isn't used to send such packets.

There's a new routine in i4b_l4.c called i4b_get_idletime() which calls the 
routine i4bisppp_idletime() in i4b_isppp.c if the interface is sppp. The 
latter returns the larger of pp_last_sent and pp_last_recv.

Now, i4b_get_idletime() is used in all the shorthold routines in i4b_l4.c to 
get the active time. The returned value is used appropriately to figure out 
whether the idle timeout has expired.

Since the routines in if_spppsubr.c should only update the pp_last_* fields 
for "normal" packets, traffic for control packets should never have any 
effect on the idle timeout calculations. At least, that's the theory.

Did the patch apply cleanly ? I'd be amazed if it did.

-- 
Gary Jennejohn garyj@jennejohn.org gj@freebsd.org

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isdn" in the body of the message




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