From owner-freebsd-current Sat Dec 12 15:20:59 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id PAA09814 for freebsd-current-outgoing; Sat, 12 Dec 1998 15:20:59 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.40.131]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id PAA09800; Sat, 12 Dec 1998 15:20:54 -0800 (PST) (envelope-from phk@critter.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.9.1/8.8.5) with ESMTP id AAA08713; Sun, 13 Dec 1998 00:20:45 +0100 (CET) To: current@FreeBSD.ORG, isdn@FreeBSD.ORG Subject: if_sppp is BROKEN!!! From: Poul-Henning Kamp Date: Sun, 13 Dec 1998 00:20:42 +0100 Message-ID: <8711.913504842@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG I think I have finally found out what the problem is with the state machine in the if_sppp implementation. Whoever wrote the implementation didn't carefully consider the inter-layer calls tls and tlf. If one applies a lot of patches like this one: case STATE_OPENED: - (cp->tld)(sp); sp->rst_counter[cp->protoidx] = 0; sppp_cp_change_state(cp, sp, STATE_STOPPING); + (cp->tld)(sp); goto sta; break; Then things actually start to make sense... The problem is that the tld and tlf functions often just call the pp_up and pp_down routines directly, and therefore most if not all of the expected up and down events happen in the previous state as opposed to the next state. Flipping it around like I have done above, on the other hand, may not be a good idea either, since it means we can nest another layer on the stack and get somewhat confused on the way down. It is quite obvious that this will need some more work to sort out, anybody interested in participating ? -- Poul-Henning Kamp FreeBSD coreteam member phk@FreeBSD.ORG "Real hackers run -current on their laptop." "ttyv0" -- What UNIX calls a $20K state-of-the-art, 3D, hi-res color terminal To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message