#37 Protocol errors related to ICMP/GRE

open
nobody
Bug (28)
5
2012-09-17
2005-04-19
No

Hi,

As per this unresolved discussion in the list [1], I have
been having the same problems. I patched up the most
recent pptpctrl.c of pptpd as below. Everything works
now.

Cheers

-b

[1] http://marc.theaimsgroup.com/?l=poptop-
server&m=109301203710004&w=2

--- pptpd-1.2.1/pptpctrl.c Wed Apr 28 13:36:07
2004
+++ pptpd-1.2.1-geht/pptpctrl.c Fri Aug 20 15:36:52
2004
@@ -233,6 +233,7 @@
#endif
int pty_fd = -1; / File
descriptor of pty
/
int gre_fd = -1; / Network
file descriptor
/
+ int running = 0;

unsigned char packet

[PPTP_MAX_CTRL_PCKT_SIZE];
unsigned char rply_packet
[PPTP_MAX_CTRL_PCKT_SIZE];
@@ -294,14 +295,17 @@
#endif

    /* handle actual packets */

-
/ send from pty off via GRE /
- if (pty_fd != -1 && FD_ISSET
(pty_fd, &fds) && decaps_hdlc(pty_fd, encaps_gre, \ gre_fd) < 0) { + if (running && pty_fd !
= -1 && FD_ISSET(pty_fd, &fds) && \ decaps_hdlc(pty_fd, encaps_gre, gre_fd) < 0) { syslog
(LOG_ERR, "CTRL: PTY read or \ GRE write failed (pty,gre)=(%d,%d)", pty_fd, gre_fd);
break;
}
/ send from GRE off to pty /
+ if (gre_fd != -1 && FD_ISSET
(gre_fd, &fds))
+ running=1;
+
if (gre_fd != -1 && FD_ISSET
(gre_fd, &fds) && decaps_gre(gre_fd, encaps_hdlc, \ pty_fd) < 0) { + running=1;
if (gre_fd == 6 &&
pty_fd == 5) {
syslog
(LOG_ERR, "CTRL: GRE-tunnel has collapsed (GRE
read or PTY write failed \ (gre,pty)=(%d,%d))", gre_fd, pty_fd); } else {

Discussion


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks