Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 26 Oct 2002 05:56:37 +1000 (EST)
From:      Bruce Evans <bde@zeta.org.au>
To:        Bakul Shah <bakul@bitblocks.com>
Cc:        Brooks Davis <brooks@one-eyed-alien.net>, Dave Evans <devans@hclb.demon.co.uk>, <freebsd-current@FreeBSD.ORG>
Subject:   Re: pppd not working on latest current 2002-10-20 
Message-ID:  <20021026054152.N5135-100000@gamplex.bde.org>
In-Reply-To: <200210251841.OAA09782@valiant.cnchost.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 25 Oct 2002, Bakul Shah wrote:

> > On Fri, Oct 25, 2002 at 06:15:55PM +0000, Dave Evans wrote:
> > > Is anyone using pppd on CURRENT.  somewhere between may and October it
> > > seems to have broken.  My KERNEL is GENERIC, my sources are dated cvs
> > > -D2002-10-20, but I now get a message about needing facilities in the
> > > kernel. However, the kernel has many ppp entry points, I haven't
> > > modified GENERIC which loads the ppp device, I've tried loading modules
> > > with ppp in their name all to no avail.
> >
> > You need to create an interface first. Run "ifconfig ppp create".
>
> Until pppd is taught to create the interface if one doesn't
> exist, this information needs to be in /usr/src/UPDATING.

The kernel side of ppp was changed to create 0 ppp interfaces by default.
This is incompatible with the user side of ppp, which determines if ppp
is in the kernel by checking if there is a ppp interface.  I use the
following low-quality work around:

%%%
Index: sys-bsd.c
===================================================================
RCS file: /home/ncvs/src/usr.sbin/pppd/sys-bsd.c,v
retrieving revision 1.18
diff -u -2 -r1.18 sys-bsd.c
--- sys-bsd.c	17 Sep 2002 15:52:35 -0000	1.18
+++ sys-bsd.c	17 Sep 2002 19:16:58 -0000
@@ -183,4 +183,19 @@
 	return 1;		/* can't tell */

+    /*
+     * XXX interface doesn't exist until you look at it right.
+     * devfs me harder.
+     */
+    {
+    int fd, newdisc, olddisc;
+
+    fd = open("/dev/cuaa1", O_RDWR);	/* XXX my tty hard-coded. */
+    ioctl(fd, TIOCGETD, &olddisc);	/* XXX no error handling. */
+    newdisc = PPPDISC;
+    ioctl(fd, TIOCSETD, &newdisc);	/* XXX no error handling. */
+    ioctl(fd, TIOCSETD, &olddisc);	/* XXX no error handling. */
+    close(fd);
+    }
+
     strncpy(ifr.ifr_name, "ppp0", sizeof (ifr.ifr_name));
     ok = ioctl(s, SIOCGIFFLAGS, (caddr_t) &ifr) >= 0;
%%%

devfs is not really involved here.  The bug just belongs to the same
class of complications given by devfs.

Bruce


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021026054152.N5135-100000>