[pptp-server] v0.8.13 released!
David Luyer
luyer at ucs.uwa.edu.au
Fri Jun 11 04:46:43 CDT 1999
And I was just a few minutes too late testing my fix for the 629-on-startup.
The following patch might fix the error 629 on startup and after pppd hasn't
been run a long time, which turns out to be due to reading from/writing to
the pty before pppd has got a chance configure it properly (if it is recently
invoked, then it is in memory, so it doesn't have a problem).
I'd like someone who can reboot their machine a bit more often than I can
to test it; rebooting to get the debug traces to decide that's the probable
problem was enough of a problem :-(
David.
Index: pptpctrl.c
===================================================================
RCS file: /cvs/pptpd/pptpd/pptpctrl.c,v
retrieving revision 1.50
diff -u -r1.50 pptpctrl.c
--- pptpctrl.c 1999/06/10 11:33:49 1.50
+++ pptpctrl.c 1999/06/11 09:43:43
@@ -178,6 +178,8 @@
int stat2 = 0; /* # of bytes we successfully wrote to the client */
+ int init = 0;
+
unsigned char packet[PPTP_MAX_CTRL_PCKT_SIZE];
unsigned char rply_packet[PPTP_MAX_CTRL_PCKT_SIZE];
@@ -194,7 +196,7 @@
FD_SET (clientSocket, &fds);
if(pty_fd != -1)
FD_SET (pty_fd, &fds);
- if(gre_fd != -1)
+ if(gre_fd != -1 && init)
FD_SET (gre_fd, &fds);
/* set timeout */
@@ -244,6 +246,9 @@
break;
}
+ /* detect startup of pppd */
+ if (!init && pty_fd != -1 && FD_ISSET(pty_fd, &fds))
+ init = 1;
/* handle actual packets */
More information about the pptp-server
mailing list