On Sat, 31 Dec 2016 20:57:25 +0000 (UTC)
Stuart Henderson <s...@spacehopper.org> wrote:

> On 2016-12-15, Tom <bul...@posteo.net> wrote:
> >> Thanks. I was wondering about a bug with LCP echoes I accidentally
> >> introduced that made it into 5.9 (fixed for 6.0).  
> > could you please point me to the changes you are talking about here.
> > I started using pppoe in 5.9 and the LCP-echo gave me a hard time. I
> > frequently told my ISP (Deutsche Telekom) to drop the line because I
> > was hitting the MAXALIVECNT value in if_spppsubr.  
> 
> We sent our own LCP echo requests, but the bug stopped this from working,
> so would have caused timeouts depending on how often user data was seen and
> the ISP's echo req timer. This was the fix:
> 
> Index: if_spppsubr.c
> ===================================================================
> RCS file: /cvs/src/sys/net/if_spppsubr.c,v
> retrieving revision 1.150
> retrieving revision 1.151
> diff -u -p -r1.150 -r1.151
> --- if_spppsubr.c     18 Apr 2016 14:38:09 -0000      1.150
> +++ if_spppsubr.c     1 May 2016 14:08:39 -0000       1.151
> @@ -4094,7 +4094,7 @@ sppp_keepalive(void *dummy)
>               }
>               if (sp->pp_alivecnt < MAXALIVECNT)
>                       ++sp->pp_alivecnt;
> -             else if (sp->pp_phase >= PHASE_AUTHENTICATE) {
> +             if (sp->pp_phase >= PHASE_AUTHENTICATE) {
>                       u_int32_t nmagic = htonl(sp->lcp.magic);
>                       sp->lcp.echoid = ++sp->pp_seq;
>                       sppp_cp_send (sp, PPP_LCP, ECHO_REQ,
> 
> > as I was in the "lucky" situation that nobody was penetrating me on
> > ports like ssh, telnet or smtp from outside. I made a modification to
> > send 'sp->pp_alivecnt' to syslog anytime it was changed in addition to
> > packet capturing. It turned out that my ISP sends LCP-keepalives in a
> > 45s interval and not every 15s. This means I might eventually get my
> > first LCP-echo from the provider when pppoe is already timing out. I
> > would be glad though if there was a way to address this problem without
> > a custum kernel.  
> 
> I think 6.0 should fix this for you.
> 

Thanks for the info Stuart. Indeed different behavior.
I can confirm that my suggested modification is not nessecary any more
with 6.0.

No more timeouts for almost five days:

pppoe0: flags=208851<UP,POINTOPOINT,RUNNING,SIMPLEX,MULTICAST,AUTOCONF6> 
mtu 1492 index 9 priority 0 llprio 3
        dev: em0 state: session
        sid: 0x299a PADI retries: 1 PADR retries: 0 time: 4d 18:32:29
        sppp: phase network authproto pap
        groups: pppoe egress
        status: active

Reply via email to