LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 12-05-2012, 04:17 PM   #1
lordbone
LQ Newbie
 
Registered: May 2009
Posts: 12

Rep: Reputation: 0
Unhappy Pptpd-1.3.4 on Slackware14.0-x64 pppd 2.4.5 unrecognized option '...' and so on..


Hello LQ Community,

I've recently stumbled upon an error while running pptpd-1.3.4 on Slackware-14.0_x64 . To make a long story short (and not waste anyone's time), here is what happened:

After doing a full install of Slackware14_x64, I've decided to get the ol` pptpd working on the box (never know when you need a vpn on the local network, right?). All seems fine and dandy, compiled the latest (v1.3.4) pptpd on the box, created a user in chap-secrets, and gave it a try.

It seems that pptpd actually does it's job right, but passes something wrong to pppd, from what I see in the logs:

Quote:
Dec 5 22:54:29 pppd[2906]: unrecognized option ' '
Dec 5 22:54:29 pptpd[2905]: GRE: read(fd=6,buffer=606b00,len=8196) from PTY failed: status = -1 error = Input/output error, usually caused by unexpected termination of pppd, check option syntax and pppd logs
Dec 5 23:04:19 pptpd[3051]: CTRL: PTY read or GRE write failed (pty,gre)=(6,7)
From what I see in the debug log, pptpd seems to do it's job of authenticating the client:

Quote:
Dec 5 23:05:59 pptpd[3066]: MGR: Launching /usr/sbin/pptpctrl to handle client
Dec 5 23:05:59 pptpd[3066]: CTRL: local address = xxx.xxx.xxx.xxx
Dec 5 23:05:59 pptpd[3066]: CTRL: remote address = 10.100.10.1
Dec 5 23:05:59 pptpd[3066]: CTRL: pppd options file = /etc/ppp/options.pptpd
Dec 5 23:05:59 pptpd[3066]: CTRL: Received PPTP Control Message (type: 1)
Dec 5 23:05:59 pptpd[3066]: CTRL: Made a START CTRL CONN RPLY packet
Dec 5 23:05:59 pptpd[3066]: CTRL: I wrote 156 bytes to the client.
Dec 5 23:05:59 pptpd[3066]: CTRL: Sent packet to client
Dec 5 23:05:59 pptpd[3066]: CTRL: Received PPTP Control Message (type: 7)
Dec 5 23:05:59 pptpd[3066]: CTRL: Set parameters to 100000000 maxbps, 64 window size
Dec 5 23:05:59 pptpd[3066]: CTRL: Made a OUT CALL RPLY packet
Dec 5 23:05:59 pptpd[3066]: CTRL: pty_fd = 6
Dec 5 23:05:59 pptpd[3066]: CTRL: tty_fd = 7
Dec 5 23:05:59 pptpd[3066]: CTRL: I wrote 32 bytes to the client.
Dec 5 23:05:59 pptpd[3066]: CTRL: Sent packet to client
Dec 5 23:05:59 pptpd[3067]: CTRL (PPPD Launcher): program binary = /usr/sbin/pppd
Dec 5 23:05:59 pptpd[3067]: CTRL (PPPD Launcher): local address = xxx.xxx.xxx.xxx
Dec 5 23:05:59 pptpd[3067]: CTRL (PPPD Launcher): remote address = 10.100.10.1
Dec 5 23:05:59 pptpd[3066]: CTRL: Reaping child PPP[3067]
Dec 5 23:05:59 pptpd[3066]: CTRL: Exiting now
Dec 5 23:05:59 pptpd[3048]: MGR: Reaped child 3066
..but it seems pppd fails with the same unrecognized options.

My config files are as follows:
Quote:
# cat /etc/pptpd.conf | egrep -v "#" | sed '/^$/d'
ppp /usr/sbin/pppd
logwtmp
noipparam
plugin logwtmp.so
option /etc/ppp/options.pptpd
localip xxx.xxx.xxx.xxx
remoteip 10.100.10.1-32
debug

# cat /etc/ppp/options.pptpd | egrep -v "#" | sed '/^$/d'
debug
name pptpd
mtu 1476
mru 1476
-pap
-chap
+mschap-v2
+mppe-128
ms-dns 8.8.8.8
ms-dns 8.8.4.4
proxyarp
nologfd

# cat /etc/ppp/options | egrep -v "#" | sed '/^$/d'
crtscts
lock
modem
proxyarp
lcp-echo-interval 30
lcp-echo-failure 4
debug
It seems this is easy to reproduce. After hitting this bump, I've decided to try pptpd on some other slackware servers I currently have online. All slackware14.0 servers (I only had 64-bit ones available, never tested this on 32-bit), have the same problem! All slackware 13.37 (and below) servers, work flawlessly.

I've tried fiddling with the pppd daemon, compiling and recompiling, trying to find out what actually causes this, but I'm all out of ideas.

I can't figure out if there's a communication problem between the pptp daemon passing information to the ppp daemon, or just the ppp daemon parsing the config file and interpreting the options in a wrong way.

Best regards,
-tbone
 
Old 12-07-2012, 05:31 AM   #2
lordbone
LQ Newbie
 
Registered: May 2009
Posts: 12

Original Poster
Rep: Reputation: 0
...and to answer my own question, after a little bit of digging, I've found the following post:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=693136

In short, the following modifications are needed in pptpctrl.c at around line 762:

Original line says:
Code:
  if (*pppaddrs[0] || *pppaddrs[1]) {
  char pppInterfaceIPs[33];
  sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]);
  pppd_argv[an++] = pppInterfaceIPs;
  }
The fix looks like the following:
Code:
char pppInterfaceIPs[33];
if (*pppaddrs[0] || *pppaddrs[1]) {
   sprintf(pppInterfaceIPs, "%s:%s", pppaddrs[0], pppaddrs[1]);
   pppd_argv[an++] = pppInterfaceIPs;
}
Thank you!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
pppd unrecognized option 'plugin' bluscape Linux - Networking 0 05-15-2012 10:35 AM
[SOLVED] passwd: unrecognized option '--stdin' arun5002 Linux - Server 1 09-07-2011 02:28 PM
unrecognized option '/dev/ttyUSB0' just1newbie Slackware 3 11-08-2009 01:23 PM
gcc unrecognized option ruben22 Linux From Scratch 9 11-12-2008 04:41 AM
Alcatel Speedtouch: pppd[2287]: unrecognized option 'nas0' novazem Linux - Networking 1 03-16-2004 11:19 AM


All times are GMT -5. The time now is 06:11 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration