[pptp-server] pptpd loop

ajlill at ajlc.waterloo.on.ca ajlill at ajlc.waterloo.on.ca
Tue Oct 12 12:57:32 CDT 1999


pptpd just went into an endless loop (filling /var in the process):

Oct 10 14:21:35 gate pptpd[24686]: CTRL: EOF or bad error reading ctrl packet length.
Oct 10 14:21:35 gate pptpd[24686]: CTRL: couldn't read packet header (exit)
Oct 10 14:21:35 gate pptpd[24686]: CTRL: Unexpected control message 0 in disconnect sequence

Here's a patch I think will fix it. In pptpctrl.c, read_pptp_packet
will return 0 for a serious read error, but this doesn't break out of the
loop.

Index: pptpctrl.c
===================================================================
RCS file: /CVSROOT/network/vpn/pptpd/pptpctrl.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 pptpctrl.c
*** pptpctrl.c	1999/09/05 00:41:42	1.1.1.1
--- pptpctrl.c	1999/10/12 17:39:41
***************
*** 460,465 ****
--- 460,468 ----
  				break;
  			case STOP_CTRL_CONN_RPLY:
  				goto skip;
+ 			case 0:
+ 			    /* Read error, bail */
+ 			    break;
  			default:
  				syslog(LOG_WARNING, "CTRL: Unexpected control message %d in disconnect sequence", pkt);
  			}

--
Tony Lill,                         Tony.Lill at AJLC.Waterloo.ON.CA
President, A. J. Lill Consultants        fax/data (519) 650 3571
539 Grand Valley Dr., Cambridge, Ont. N3H 2S2     (519) 241 2461
--------------- http://www.ajlc.waterloo.on.ca/ ----------------
"Welcome to All Things UNIX, where if it's not UNIX, it's CRAP!"




More information about the pptp-server mailing list