diff options
author | brian <brian@FreeBSD.org> | 2002-05-01 10:04:49 +0000 |
---|---|---|
committer | brian <brian@FreeBSD.org> | 2002-05-01 10:04:49 +0000 |
commit | e9f489edca8b3e305df5e4a1138a5ef853894d38 (patch) | |
tree | b9e2bf50ded14d08b35e3f6f3a3874b0e28f08ab /usr.sbin/ppp | |
parent | 21257e117d533a15a7b84cd235b2b7773417143d (diff) | |
download | FreeBSD-src-e9f489edca8b3e305df5e4a1138a5ef853894d38.zip FreeBSD-src-e9f489edca8b3e305df5e4a1138a5ef853894d38.tar.gz |
If we receive a config request while Open, call TLD *before* decoding
the request as TLD may initialise fields that are set when decoding the
request.
MFC after: 1 week
Diffstat (limited to 'usr.sbin/ppp')
-rw-r--r-- | usr.sbin/ppp/fsm.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/ppp/fsm.c b/usr.sbin/ppp/fsm.c index 2a108c2..bfa3eed 100644 --- a/usr.sbin/ppp/fsm.c +++ b/usr.sbin/ppp/fsm.c @@ -482,6 +482,12 @@ FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) return; } + /* Some things must be done before we Decode the packet */ + switch (fp->state) { + case ST_OPENED: + (*fp->fn->LayerDown)(fp); + } + dec.ackend = dec.ack; dec.nakend = dec.nak; dec.rejend = dec.rej; @@ -526,10 +532,8 @@ FsmRecvConfigReq(struct fsm *fp, struct fsmheader *lhp, struct mbuf *bp) return; case ST_STOPPED: FsmInitRestartCounter(fp, FSM_REQ_TIMER); - FsmSendConfigReq(fp); - break; + /* Drop through */ case ST_OPENED: - (*fp->fn->LayerDown)(fp); FsmSendConfigReq(fp); break; } |