[pptp-server] PoPToP CTRL Troubles

Joshua Nekl jnekl at kc.rr.com
Mon Jun 19 10:45:04 CDT 2000


>  On occasion though, the connection will break between
> the client and the server and the PopTop server will beat itself to
death
> logging the following to /var/log/messages file:

I had this problem in the past. I found in a recent post a patch that
fixes
it. The post also said it has been fixed in the development version.
- Josh

Here's the patch for v1.0.0:
The mail server mangled the patch from the origional post so I had to
clean
it up. If it doesn't take, let me know and I'll send it to you as an
attachment.



diff -uNr pptpd-1.0.0.orig/pptpctrl.c pptpd-1.0.0/pptpctrl.c
--- pptpd-1.0.0.orig/pptpctrl.c Wed Sep 22 19:01:28 1999
+++ pptpd-1.0.0/pptpctrl.c Mon Apr 17 20:52:29 2000
@@ -452,9 +452,17 @@
   tv.tv_usec = 0;

   /* Wait for STOP CTRL CONN RQST or RPLY */
-  while (select(clientSocket + 1, &connSet, NULL, NULL, &tv) == 1) {
-   switch((pkt = read_pptp_packet(clientSocket, packet, rply_packet,
&rply_size))) {
-   case STOP_CTRL_CONN_RQST:
+  while (select(clientSocket + 1, &connSet, NULL, NULL,
+    &tv) == 1) {
+     pkt = read_pptp_packet(clientSocket, packet,
+       rply_packet, &rply_size);
+     if (pkt == 0) {
+        syslog (LOG_WARNING,
+         "EOF reading control message");
+        break;
+     }
+     else switch (pkt) {
+    case STOP_CTRL_CONN_RQST:
     send_pptp_packet(clientSocket, rply_packet, rply_size);
     goto skip;
    case CALL_CLR_RQST:





More information about the pptp-server mailing list