* OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS,
* OR MODIFICATIONS.
*
- * $Id: ppp.c,v 1.6 1996/06/26 00:53:38 paulus Exp $
+ * $Id: ppp.c,v 1.8 1996/09/14 05:18:45 paulus Exp $
*/
/*
static upperstr_t *find_dest __P((upperstr_t *, int));
static int putctl2 __P((queue_t *, int, int, int));
static int putctl4 __P((queue_t *, int, int, int));
+static int pass_packet __P((upperstr_t *ppa, mblk_t *mp, int outbound));
#define PPP_ID 0xb1a6
static struct module_info ppp_info = {
#ifdef LACHTCP
case SIOCSIFNAME:
- printf("SIOCSIFNAME\n");
/* Sent from IP down to us. Attach the ifstats structure. */
if (iop->ioc_count != sizeof(struct ifreq) || us->ppa == 0)
break;
break;
case SIOCGIFFLAGS:
- printf("SIOCGIFFLAGS\n");
if (!(us->flags & US_CONTROL)) {
if (us->ppa)
us = us->ppa;
break;
case SIOCSIFFLAGS:
- printf("SIOCSIFFLAGS\n");
if (!(us->flags & US_CONTROL)) {
if (us->ppa)
us = us->ppa;
break;
case SIOCSIFADDR:
- printf("SIOCSIFADDR\n");
if (!(us->flags & US_CONTROL)) {
if (us->ppa)
us = us->ppa;
if ((q = ppa->lowerq) == 0) {
/* try to send it up the control stream */
if (canputnext(ppa->q)) {
- putnext(ppa->q, mp);
+ /*
+ * The message seems to get corrupted for some reason if
+ * we just send the message up as it is, so we send a copy.
+ */
+ mblk_t *np = copymsg(mp);
+ freemsg(mp);
+ if (np != 0)
+ putnext(ppa->q, np);
return 1;
}
} else {