]> git.ozlabs.org Git - ppp.git/commitdiff
handle M_FLUSH and M_IOCTL messages in lrput routine.
authorPaul Mackerras <paulus@samba.org>
Mon, 22 Mar 1999 05:55:59 +0000 (05:55 +0000)
committerPaul Mackerras <paulus@samba.org>
Mon, 22 Mar 1999 05:55:59 +0000 (05:55 +0000)
modules/ppp.c

index 164f1c87cc64083877015771cd7ad31c0f7d04a6..5e47a62b200776dd0d2baf959751a0ba2d7b2f81 100644 (file)
@@ -24,7 +24,7 @@
  * OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
  * OR MODIFICATIONS.
  *
  * 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;
     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
 
     /*
      * If we can't get the lower lock straight away, queue this one