diff options
author | Paul Mackerras <paulus@samba.org> | 1999-03-22 05:55:59 +0000 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 1999-03-22 05:55:59 +0000 |
commit | bfe37cc730fff78eb1af00892b9416926dc09d17 (patch) | |
tree | 18680f8ade9fee45931db62321752c6a39fe9088 /modules | |
parent | 5ba9d88b943e9d5a3ababdadf1d2e246581dfdc6 (diff) | |
download | ppp-bfe37cc730fff78eb1af00892b9416926dc09d17.tar.gz |
handle M_FLUSH and M_IOCTL messages in lrput routine.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/ppp.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/modules/ppp.c b/modules/ppp.c index 164f1c8..5e47a62 100644 --- a/modules/ppp.c +++ b/modules/ppp.c @@ -24,7 +24,7 @@ * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, * OR MODIFICATIONS. * - * $Id: ppp.c,v 1.17 1999/03/08 05:34:16 paulus Exp $ + * $Id: ppp.c,v 1.18 1999/03/22 05:55:59 paulus Exp $ */ /* @@ -1967,6 +1967,25 @@ ppplrput(q, mp) mblk_t *mp; { queue_t *uq; + struct iocblk *iop; + + switch (mp->b_datap->db_type) { + case M_IOCTL: + iop = (struct iocblk *) mp->b_rptr; + iop->ioc_error = EINVAL; + mp->b_datap->db_type = M_IOCNAK; + qreply(q, mp); + return 0; + case M_FLUSH: + if (*mp->b_rptr & FLUSHR) + flushq(q, FLUSHDATA); + if (*mp->b_rptr & FLUSHW) { + *mp->b_rptr &= ~FLUSHR; + qreply(q, mp); + } else + freemsg(mp); + return 0; + } /* * If we can't get the lower lock straight away, queue this one |