You are not logged in.

#1 2012-05-03 09:06:23

snek
Member
Registered: 2012-05-03
Posts: 1

pptpd / pppd: unrecognized option '[]'

I am having trouble setting up a simple pptpd server on my homeserver.

My server has ip 192.168.0.2
It connects to a router which has ip 192.168.0.1
I'm trying to connect using an iPad 3 from my work.

Output from /var/log/everything when connecting:

May  3 10:52:56 localhost pptpd[26750]: MGR: Launching /usr/sbin/pptpctrl to handle client
May  3 10:52:56 localhost pptpd[26750]: CTRL: local address = 192.168.0.2
May  3 10:52:56 localhost pptpd[26750]: CTRL: remote address = 192.168.0.234
May  3 10:52:56 localhost pptpd[26750]: CTRL: pppd options file = /etc/ppp/options.pptpd
May  3 10:52:56 localhost pptpd[26750]: CTRL: Client XX.XX.XXX.XX control connection started
May  3 10:52:56 localhost pptpd[26750]: CTRL: Received PPTP Control Message (type: 1)
May  3 10:52:56 localhost pptpd[26750]: CTRL: Made a START CTRL CONN RPLY packet
May  3 10:52:56 localhost pptpd[26750]: CTRL: I wrote 156 bytes to the client.
May  3 10:52:56 localhost pptpd[26750]: CTRL: Sent packet to client
May  3 10:52:56 localhost pptpd[26750]: CTRL: Received PPTP Control Message (type: 7)
May  3 10:52:56 localhost pptpd[26750]: CTRL: Set parameters to 100000000 maxbps, 64 window size
May  3 10:52:56 localhost pptpd[26750]: CTRL: Made a OUT CALL RPLY packet
May  3 10:52:56 localhost pptpd[26750]: CTRL: Starting call (launching pppd, opening GRE)
May  3 10:52:56 localhost pptpd[26750]: CTRL: pty_fd = 6
May  3 10:52:56 localhost pptpd[26750]: CTRL: tty_fd = 7
May  3 10:52:56 localhost pptpd[26750]: CTRL: I wrote 32 bytes to the client.
May  3 10:52:56 localhost pptpd[26750]: CTRL: Sent packet to client
May  3 10:52:56 localhost pptpd[26751]: CTRL (PPPD Launcher): program binary = /usr/sbin/pppd
May  3 10:52:56 localhost pptpd[26751]: CTRL (PPPD Launcher): local address = 192.168.0.2
May  3 10:52:56 localhost pptpd[26751]: CTRL (PPPD Launcher): remote address = 192.168.0.234
May  3 10:52:56 localhost pppd[26751]: unrecognized option ''
May  3 10:52:56 localhost pptpd[26750]: GRE: read(fd=6,buffer=6075a0,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
May  3 10:52:56 localhost pptpd[26750]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
May  3 10:52:56 localhost pptpd[26750]: CTRL: Reaping child PPP[26751]
May  3 10:52:56 localhost pptpd[26750]: CTRL: Client XX.XX.XXX.XX control connection finished
May  3 10:52:56 localhost pptpd[26750]: CTRL: Exiting now
May  3 10:52:56 localhost pptpd[26747]: MGR: Reaped child 26750

Notice the line unrecognized option '', it has a square between the '' (like '[]')meaning it can't display that char, but I have no idea in which config file that could be...


Output from /var/log/everything when restarting pptpd (rc.d restart pptpd):

May  3 11:01:36 localhost pptpd[26965]: MGR: Maximum of 100 connections reduced to 6, not enough IP addresses given
May  3 11:01:36 localhost pptpd[26966]: MGR: Manager process started
May  3 11:01:36 localhost pptpd[26966]: MGR: Maximum of 6 connections available

My /etc/ppp/options.pptpd

name pptpd
refuse-pap
refuse-chap
refuse-mschap
require-mschap-v2
require-mppe-128
ms-dns 208.67.222.222
ms-dns 208.67.220.220
proxyarp
debug
lock
nobsdcomp
novj
novjccomp
nologfd

My /etc/pptpd.conf

option /etc/ppp/options.pptpd
debug
logwtmp
localip 192.168.0.2
remoteip 192.168.0.234-238,192.168.0.245

I hope someone can help me with this!

Offline

#2 2012-05-05 13:17:00

hsys
Member
Registered: 2011-10-19
Posts: 1

Re: pptpd / pppd: unrecognized option '[]'

I met the same problem after upgrading my pptpd. It seems to be a upstream bug, as I find the following code snippet in pptpctrl.c :

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

the pointer to "pppInterfaceIPs" becomes invalid after the if block.

I simply move the "char pppInterfaceIPs[33];" line out of the if block and recompile the package. Then it works again.

Offline

#3 2012-05-06 06:14:49

Shahab
Member
Registered: 2011-10-15
Posts: 30

Re: pptpd / pppd: unrecognized option '[]'

hsys wrote:

I simply move the "char pppInterfaceIPs[33];" line out of the if block and recompile the package. Then it works again.

That fixed my problem, thanks hsys.

Offline

Board footer

Powered by FluxBB