summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/exec.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1999-11-06 22:50:59 +0000
committerbrian <brian@FreeBSD.org>1999-11-06 22:50:59 +0000
commitcac81ba45e2e673e229f5ea7773bab9d5a35b735 (patch)
tree05464cda97fbc141305fb350e1211787d0b945dc /usr.sbin/ppp/exec.c
parent5e8870e5439ac382bd1d3732b119bf5cf81405b6 (diff)
downloadFreeBSD-src-cac81ba45e2e673e229f5ea7773bab9d5a35b735.zip
FreeBSD-src-cac81ba45e2e673e229f5ea7773bab9d5a35b735.tar.gz
Support PPPoE
Help (lots) from: julian, archie Facilities from: ahebert@pubnix.net
Diffstat (limited to 'usr.sbin/ppp/exec.c')
-rw-r--r--usr.sbin/ppp/exec.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ppp/exec.c b/usr.sbin/ppp/exec.c
index de9e632..80f8343 100644
--- a/usr.sbin/ppp/exec.c
+++ b/usr.sbin/ppp/exec.c
@@ -77,12 +77,13 @@ static struct device execdevice = {
NULL,
NULL,
NULL,
+ NULL,
NULL
};
struct device *
exec_iov2device(int type, struct physical *p, struct iovec *iov,
- int *niov, int maxiov)
+ int *niov, int maxiov, int *auxfd, int *nauxfd)
{
if (type == EXEC_DEVICE) {
free(iov[(*niov)++].iov_base);
@@ -99,6 +100,8 @@ exec_Create(struct physical *p)
if (p->fd < 0 && *p->name.full == '!') {
int fids[2];
+ p->fd--; /* We own the device but maybe can't use it - change fd */
+
if (socketpair(AF_UNIX, SOCK_STREAM, PF_UNSPEC, fids) < 0)
log_Printf(LogPHASE, "Unable to create pipe for line exec: %s\n",
strerror(errno));
OpenPOWER on IntegriCloud