From 34bc592815f7d9a537b944143fdefed6ec5be1a4 Mon Sep 17 00:00:00 2001 From: hm Date: Sat, 21 Jul 2001 11:52:31 +0000 Subject: [PATCH] Add a patch from the isdn mailinglist, Juha writes: ppp in 4.x apparently does a close(2) after opening the tun device; i4brunppp starts up with only file descriptors 0 and 1 open (to the rbch device) -> tun gets opened as 2 -> tun gets closed -> later use results in EBADF. A quick fix to i4brunppp.c makes the thing work (I know, this is ugly, but I needed it up quick...): Submitted by: Juha-Matti Liukkonen --- share/examples/isdn/i4brunppp/i4brunppp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/share/examples/isdn/i4brunppp/i4brunppp.c b/share/examples/isdn/i4brunppp/i4brunppp.c index 50c4dc3fdb5b..cb239d8e32c1 100644 --- a/share/examples/isdn/i4brunppp/i4brunppp.c +++ b/share/examples/isdn/i4brunppp/i4brunppp.c @@ -164,6 +164,7 @@ main(int argc, char **argv) i = getdtablesize(); for(;i >= 0; i--) + if (i != 2) close(i); /* fiddle a terminating zero after the rbch unit number */