Subject: Re: In-kernel pppoe doesn't seem to detect connection loss
To: None <netbsd-users@netbsd.org>
From: Juha K Kallio <bunnyh@psychedelic.baana.suomi.net>
List: netbsd-users
Date: 04/23/2003 15:31:02
On Wed, Apr 23, 2003 at 02:24:35PM +0200, Martin Husemann wrote:
> On Wed, Apr 23, 2003 at 03:08:22PM +0300, Juha K Kallio wrote:
> > It clearly seems that for some weird reason, the in-kernel pppoe is not checking the connection at all. I can't see a 
> > setting for that anywhere.
> 
> There is no setting for it, it's always active for PPPoE connections.
> Since it works everywhere and you are the only one able to reproduce the
> problem, you are the only one who can debug it.
> 
> Look at sys/net/if_spppsubr.c and search for the sppp_keepalive function.
> This is called every 10 seconds and checks all interfaces. Add a few printfs
> there and find out why it does not hit the 
> 
>    if (sp->pp_alivecnt == MAXALIVECNT) {
> 
> clause in line 4693.
> 
> 
> Martin

My knowledge of C is extremly basic, so I really have no idea of debugging this. But what's this in if_spppsubr.c:

/* Keepalive mode disabled or channel down? */
if (! (sp->pp_flags & PP_KEEPALIVE) ||
    ! (ifp->if_flags & IFF_RUNNING))
        continue;

I know there is nothing about LCP echoes in any man pages or such, but I tested with 
tcpdump -vvv -i rtk0 eth src <my mac address> |grep -v psychedelic.baana.suomi.net and got only LCP echo _replies_ from my 
peer.