JBY Technologies

Fixing the pptpd input output error

If you experience unexpected error messages like this "pptpd[pid]: GRE: (readfd=x,buffer=xxxxx,len=xxxx) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
pptpd[pid]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
"

And you compiled your pptpd binary from source, you might want to take a look at the source code directory you compiled pptpd from and check your pptpctrl.c file.

Navigate to line 762 and look for this definition...

char pppInterfaceIPs[33]

That definition should be moved within the following if on line 764

if (*pppaddrs[0] || *pppaddrs[1]){
sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]);
pppd_argv[an++] = pppInterfaceIPs;
}


Like so...

if (*pppaddrs[0] || *pppaddrs[1]){
char pppInterfaceIPs[33]
sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]);
pppd_argv[an++] = pppInterfaceIPs;
}


Then run make and make install again, and have a remote user connect. This solves the problem with pptpd input output errors for me.

Bookmark and Share

Legal Notices