ppp-project / ppp Goto Github PK
View Code? Open in Web Editor NEWPaul's PPP Package: PPP daemon and associated utilities | Official GitHub repo: https://github.com/ppp-project/ppp
Home Page: https://github.com/ppp-project/ppp
License: Other
Paul's PPP Package: PPP daemon and associated utilities | Official GitHub repo: https://github.com/ppp-project/ppp
Home Page: https://github.com/ppp-project/ppp
License: Other
This is the README file for ppp-2.5, a package which implements the Point-to-Point Protocol (PPP) to provide Internet connections over serial lines and other types of links which can be considered to be point-to-point links. Introduction. ************* The Point-to-Point Protocol (PPP) provides a standard way to establish a network connection over a serial link. At present, this package supports IP and IPV6 and the protocols layered above them, such as TCP and UDP. This PPP implementation consists of two parts: - Kernel code, which establishes a network interface and passes packets between the serial port, the kernel networking code and the PPP daemon (pppd). This code is implemented using STREAMS modules on Solaris, and as a line discipline under Linux. - The PPP daemon (pppd), which negotiates with the peer to establish the link and sets up the ppp network interface. Pppd includes support for authentication, so you can control which other systems may make a PPP connection and what IP addresses they may use. The platforms supported by this package are Linux and Solaris. I have code for NeXTStep, FreeBSD, SunOS 4.x, SVR4, Tru64 (Digital Unix), AIX and Ultrix but no active maintainers for these platforms. Code for all of these except AIX is included in the ppp-2.3.11 release. The kernel code for Linux is no longer distributed with this package, since the relevant kernel code is in the official Linux kernel source (and has been for many years) and is included in all reasonably modern Linux distributions. The Linux kernel code supports using PPP over things other than serial ports, such as PPP over Ethernet and PPP over ATM. Installation. ************* The file SETUP contains general information about setting up your system for using PPP. There is also a README file for each supported system, which contains more specific details for installing PPP on that system. The supported systems, and the corresponding README files, are: Linux README.linux Solaris README.sol2 In each case you start by running the ./configure script. This works out which operating system you are using and creates the appropriate makefiles. You then run `make' to compile the user-level code, and (as root) `make install' to install the user-level programs pppd, chat and pppstats. N.B. Since 2.3.0, leaving the permitted IP addresses column of the pap-secrets or chap-secrets file empty means that no addresses are permitted. You need to put a "*" in that column to allow the peer to use any IP address. (This only applies where the peer is authenticating itself to you, of course.) What's new in ppp-2.5.1 *********************** * Pppd can now measure and log the round-trip time (RTT) of LCP echo-requests and record them in a binary file structured as a circular buffer. Other programs or scripts can examine the file and provide real-time statistics on link latency. This is enabled by a new "lcp-rtt-file" option. * New scripts net-init, net-pre-up and net-down are executed in the process of bringing the network interface up and down. They provide additional, more deterministic ways for pppd to interact with the rest of the networking configuration. * Pppd will now create the directory for the TDB connection database if it doesn't already exist. * Various other bug fixes and minor enhancements. What was new in ppp-2.5.0. ************************** The 2.5.0 release is a major release of pppd which contains breaking changes for third-party plugins, a complete revamp of the build-system and that allows for flexibility of configuring features as needed. In Summary: * Support for PEAP authentication by Eivind Næss and Rustam Kovhaev * Support for loading PKCS12 certificate envelopes * Adoption of GNU Autoconf / Automake build environment, by Eivind Næss and others. * Support for pkgconfig tool has been added by Eivind Næss. * Bunch of fixes and cleanup to PPPoE and IPv6 support by Pali Rohár. * Major revision to PPPD's Plugin API by Eivind Næss. - Defines in which describes what features was included in pppd - Functions now prefixed with explicit ppp_* to indicate that pppd functions being called. - Header files were renamed to better align with their features, and now use proper include guards - A pppdconf.h file is supplied to allow third-party modules to use the same feature defines pppd was compiled with. - No extern declarations of internal variable names of pppd, continued use of these extern variables are considered unstable. * Lots of internal fixes and cleanups for Radius and PPPoE by Jaco Kroon * Dropped IPX support, as Linux has dropped support in version 5.15 for this protocol. * Many more fixes and cleanups. * Pppd is no longer installed setuid-root. * New pppd options: - ipv6cp-noremote, ipv6cp-nosend, ipv6cp-use-remotenumber, ipv6-up-script, ipv6-down-script - -v, show-options - usepeerwins, ipcp-no-address, ipcp-no-addresses, nosendip * On Linux, any baud rate can be set on a serial port provided the kernel serial driver supports that. Note that if you have built and installed previous versions of this package and you want to continue having configuration and TDB files in /etc/ppp, you will need to use the --sysconfdir option to ./configure. For a list of the changes made during the 2.4 series releases of this package, see the Changes-2.4 file. Compression methods. ******************** This package supports two packet compression methods: Deflate and BSD-Compress. Other compression methods which are in common use include Predictor, LZS, and MPPC. These methods are not supported for two reasons - they are patent-encumbered, and they cause some packets to expand slightly, which pppd doesn't currently allow for. BSD-Compress and Deflate (which uses the same algorithm as gzip) don't ever expand packets. Contacts. ********* Most communication relating to this package happens on github at https://github.com/ppp-project/ppp/. The [email protected] mailing list also exists and can be used. If you find bugs in this package, the best thing to do is to create an issue on github. If you can't or don't want to do that, you can post to [email protected], or report them to the maintainer for the port for the operating system you are using: Linux Paul Mackerras <[email protected]> Solaris James Carlson <[email protected]> Copyrights: *********** All of the code can be freely used and redistributed. The individual source files each have their own copyright and permission notice. Pppd, pppstats and pppdump are under BSD-style notices. Some of the pppd plugins are GPL'd. Chat is public domain. Distribution: ************* The primary site for releases of this software is: ftp://ftp.samba.org/pub/ppp/
There is a bug in pppol2tp plugin (in this example - via xl2tpd, Ubuntu 14.10 server, linux core 3.16.0-29-generic):
Jan 14 00:56:27 iorange pppd[20230]: Plugin pppol2tp.so loaded.
Jan 14 00:56:27 iorange pppd[20230]: pppd options in effect:
Jan 14 00:56:27 iorange pppd[20230]: debug debug#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: nodetach#011#011# (from command line)
Jan 14 00:56:27 iorange pppd[20230]: logfile /var/log/ppp0-dbg.log#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: unit 0#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: dump#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: plugin pppol2tp.so#011#011# (from command line)
Jan 14 00:56:27 iorange pppd[20230]: noauth#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: name shooorf#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange pppd[20230]: remotename l2tp#011#011# (from /etc/ppp/options.xl2tpd)
Jan 14 00:56:27 iorange kernel: [266504.060596] pppd[20230]: segfault at 0 ip 0000000000424960 sp 00007fff609ac230 error 4 in pppd[400000+5a000]
Bug could be reproduced only when ppp option "dump" is active and pppol2tp is used.
Seg fault caused by function "print_option" in options.c
Stack trace
/usr/sbin/pppd(vslprintf+0x6a)[0x427454]
/usr/sbin/pppd(pr_log+0xba)[0x428ab7]
/usr/sbin/pppd[0x425603]
/usr/sbin/pppd[0x42576a]
/usr/sbin/pppd(print_options+0x87)[0x425814]
/usr/sbin/pppd(main+0x319)[0x40ac55]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)[0x7f52ba596ec5]
/usr/sbin/pppd[0x40a7e9]
The reason of segfault is invalid parameter declaration in source code of pppol2tp plugin:
static char *pppol2tp_fd_str;
...
static option_t pppol2tp_options[] = {
{ "pppol2tp", o_special, &setdevname_pppol2tp,
"FD for PPPoL2TP socket", OPT_DEVNAM | OPT_A2STRVAL ,
&pppol2tp_fd_str }, ...
Parameter should be declared as OPT_STATIC as well.
I'm trying to connect to GPRS network through a serial port connected GSM modem.
OS is Debian 7, pppd 2.4.5.
pppd is run with nodetach
option to make stay in terminal foreground.
When I call /usr/sbin/pppd call <peer_name>
from the command line, it correctly receives and handles Ctrl+C from keyboard.
But when I put the exact same command in an empty shell script (with or without the shebang #! at the top), chmod +x
it and run it from the shell prompt, then pppd starts to run - But it totally ignores Ctrl+C key combination. Ctrl+Z works normally though.
We use a daemon to restart pppd to recover when connections are not working properly. However, the recovery mechanism failed at least once, because pppd doesn't respond to SIGTERM.
We are using pppd 2.4.5 on a Multi-Tech MTCDP-G2-GP with core-cdp version 2.2.2.
Herewith a more detailed description of the recovery mechanism and some log snippets.
The recovery dameon sends the TERM signal to pppd using touch /tmp/reset-radio; killall pppd
. It does so once per 30 minutes (max). pppd is configured to run an init script. This init scripts reset the GSM-modem if the file /tmp/reset-radio exists.
$ cat options
/dev/ttyS1
lock
debug
init /var/config/ppp/modem_init
linkname ppp0
230400
defaultroute
replacedefaultroute
usepeerdns
ipcp-max-failure 4
ipcp-restart 10
lcp-echo-failure 4
lcp-echo-interval 30
noauth
show-password
noccp
crtscts
persist
novj
modem
maxfail 10
holdoff 30
$ cat /var/config/ppp/modem_init
if [ ! -e /tmp/reset-radio ] ; then
exit 0 # no need to reset modem
fi
echo 0 > /sys/devices/platform/mtcdp/radio-reset
sleep 8
rm /tmp/reset-radio
However, as you can see in the following log, pppd doesn't terminate (the pid doesn't change for over 2 weeks). Except for "Terminating on signal 15", there is no other output from pppd, nor from chat.
Jul 12 12:52:09 mtcdp daemon.info pppd[5776]: Terminating on signal 15
Jul 12 13:22:11 mtcdp daemon.info pppd[5776]: Terminating on signal 15
Jul 12 13:52:13 mtcdp daemon.info pppd[5776]: Terminating on signal 15
[........ this continues for many days) ......]
Aug 4 02:56:13 mtcdp daemon.info pppd[5776]: Terminating on signal 15
The problem restored when the modem was reset by manually echoing 0 to a designated device to trigger a reset of the modem chip. After that, pppd got unstuck with the following log lines:
Aug 4 03:26:42 mtcdp daemon.info pppd[5776]: Hangup (SIGHUP)
Aug 4 03:26:42 mtcdp daemon.notice pppd[5776]: Modem hangup
Aug 4 03:26:42 mtcdp daemon.notice pppd[5776]: Connection terminated.
Aug 4 03:26:43 mtcdp daemon.info pppd[5776]: Exit.
Prior to pppd getting stuck, a serial loopback was detected (see log snippet below). This may or may not be related. This unit has been running without problems for over a year, and we haven't noticed a serial loopback before.
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x33 <magic 0xcab2d158>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x33 <magic 0xcab2d158>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x34 <asyncmap 0x0> <magic 0x7702a5a7> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x34 <asyncmap 0x0> <magic 0x7702a5a7> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x34 <magic 0xf5cc024d>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x34 <magic 0xf5cc024d>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x35 <asyncmap 0x0> <magic 0x2d7bf86a> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x35 <asyncmap 0x0> <magic 0x2d7bf86a> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x35 <magic 0xc75b0bc8>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x35 <magic 0xc75b0bc8>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x36 <asyncmap 0x0> <magic 0xae6d13a9> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x36 <asyncmap 0x0> <magic 0xae6d13a9> ]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x36 <magic 0x638bcda>]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x36 <magic 0x638bcda>]
Jul 12 12:50:57 mtcdp daemon.notice pppd[5776]: Serial line is looped back.
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP TermReq id=0x37 "Loopback detected"]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP TermReq id=0x37 "Loopback detected"]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: sent [LCP TermAck id=0x37]
Jul 12 12:50:57 mtcdp daemon.debug pppd[5776]: rcvd [LCP TermAck id=0x37]
Jul 12 12:50:57 mtcdp daemon.notice pppd[5776]: Connection terminated.
Jul 12 12:51:29 mtcdp daemon.debug pppd[5776]: Script /var/config/ppp/modem_init finished (pid 7447), status = 0x0
Jul 12 12:51:29 mtcdp daemon.info pppd[5776]: Serial port initialized.
Jul 12 12:51:29 mtcdp local2.info chat[7450]: send (\d+++\d^M)
Jul 12 12:51:31 mtcdp local2.info chat[7450]: send (ATZ^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: expect (OK)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: +++^MATZ^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK
Jul 12 12:51:32 mtcdp local2.info chat[7450]: -- got it
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: abort on (NO CARRIER)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: abort on (BUSY)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: abort on (CONNECTED)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: abort on (ERROR)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT+CPIN?^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT+CSQ^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT+CREG?^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: expect (OK)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: ^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK
Jul 12 12:51:32 mtcdp local2.info chat[7450]: -- got it
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (AT+CGDCONT=1,"IP","internet.beeline.kz"^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: expect (OK)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: ^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT+CPIN?^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: +CPIN: READY^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT+CSQ^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: +CSQ: 31,0^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: ^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK
Jul 12 12:51:32 mtcdp local2.info chat[7450]: -- got it
Jul 12 12:51:32 mtcdp local2.info chat[7450]: send (ATD_99_1#^M)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: expect (CONNECT)
Jul 12 12:51:32 mtcdp local2.info chat[7450]: ^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT+CREG?^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: +CREG: 0,1^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: ^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: AT+CGDCONT=1,"IP","internet.beeline.kz"^M^M
Jul 12 12:51:32 mtcdp local2.info chat[7450]: OK^M
Jul 12 12:51:33 mtcdp local2.info chat[7450]: ATD991#^M^M
Jul 12 12:51:33 mtcdp local2.info chat[7450]: CONNECT
Jul 12 12:51:33 mtcdp local2.info chat[7450]: -- got it
Jul 12 12:51:33 mtcdp local2.info chat[7450]: send (^M)
Jul 12 12:51:33 mtcdp daemon.debug pppd[5776]: Script /usr/sbin/chat -v -t 90 -f /etc/ppp/peers/gsm_chat -T internet.beeline.kz finished (pid 7449), status = 0x0
Jul 12 12:51:33 mtcdp daemon.info pppd[5776]: Serial connection established.
Jul 12 12:51:33 mtcdp daemon.debug pppd[5776]: using channel 449
Jul 12 12:51:33 mtcdp daemon.info pppd[5776]: Using interface ppp0
Jul 12 12:51:33 mtcdp daemon.notice pppd[5776]: Connect: ppp0 <--> /dev/ttyS1
Jul 12 12:51:34 mtcdp daemon.warn pppd[5776]: Warning - secret file /etc/ppp/pap-secrets has world and/or group access
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x38 <asyncmap 0x0> <magic 0x330ce210> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x38 <asyncmap 0x0> <magic 0x330ce210> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x38 <magic 0x67bcec8e>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x38 <magic 0x67bcec8e>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x39 <asyncmap 0x0> <magic 0xeedf8a51> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x39 <asyncmap 0x0> <magic 0xeedf8a51> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x39 <magic 0x885728b4>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x39 <magic 0x885728b4>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3a <asyncmap 0x0> <magic 0xd84b1277> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3a <asyncmap 0x0> <magic 0xd84b1277> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3a <magic 0x6fc39098>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3a <magic 0x6fc39098>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3b <asyncmap 0x0> <magic 0x2042c322> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3b <asyncmap 0x0> <magic 0x2042c322> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3b <magic 0x605a6061>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3b <magic 0x605a6061>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3c <asyncmap 0x0> <magic 0xf35fcb8d> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3c <asyncmap 0x0> <magic 0xf35fcb8d> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3c <magic 0xbf4c31dc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3c <magic 0xbf4c31dc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3d <asyncmap 0x0> <magic 0xb3cc9578> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3d <asyncmap 0x0> <magic 0xb3cc9578> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3d <magic 0xd42e0fcc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3d <magic 0xd42e0fcc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3e <asyncmap 0x0> <magic 0x7c7d215c> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3e <asyncmap 0x0> <magic 0x7c7d215c> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3e <magic 0x582a736a>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3e <magic 0x582a736a>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x3f <asyncmap 0x0> <magic 0x9b331f89> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x3f <asyncmap 0x0> <magic 0x9b331f89> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x3f <magic 0xe75c39fc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x3f <magic 0xe75c39fc>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x40 <asyncmap 0x0> <magic 0x705321dd> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x40 <asyncmap 0x0> <magic 0x705321dd> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x40 <magic 0x767156b0>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x40 <magic 0x767156b0>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfReq id=0x41 <asyncmap 0x0> <magic 0x7e535b2f> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfReq id=0x41 <asyncmap 0x0> <magic 0x7e535b2f> ]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP ConfNak id=0x41 <magic 0xa374451f>]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP ConfNak id=0x41 <magic 0xa374451f>]
Jul 12 12:51:34 mtcdp daemon.notice pppd[5776]: Serial line is looped back.
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP TermReq id=0x42 "Loopback detected"]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP TermReq id=0x42 "Loopback detected"]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: sent [LCP TermAck id=0x42]
Jul 12 12:51:34 mtcdp daemon.debug pppd[5776]: rcvd [LCP TermAck id=0x42]
Jul 12 12:51:34 mtcdp daemon.notice pppd[5776]: Connection terminated.
Jul 12 12:52:06 mtcdp daemon.debug pppd[5776]: Script /var/config/ppp/modem_init finished (pid 7795), status = 0x0
Jul 12 12:52:06 mtcdp daemon.info pppd[5776]: Serial port initialized.
Pretty much what the title says.
Here's the fix: #30
Hi, the ftp url given on the home page seems to be down (ftp://ftp.samba.org/pub/ppp/). Resulting in the package ppp-mppe from AUR failing to install. Don't know if it's ok to post this here.
The man page pppd(8) should perhaps include a reference to
RFC1990 The PPP Multilink Protocol (MP).
http://ppp.samba.org/pppdump.8.html (linked to from http://ppp.samba.org/pppd.html) returns 404 not found.
Please answer and close the bug if it's still maintained by someone.
I get the following warnings when building with -Wall. This may be resolved by defining the MPPE macro when building this file (-DMPPE).
winbind.c: In function ‘winbind_chap_verify’:
winbind.c:585:4: warning: implicit declaration of function ‘mppe_set_keys’ [-Wimplicit-function-declaration]
mppe_set_keys(challenge, session_key);
^
winbind.c:630:4: warning: implicit declaration of function ‘mppe_set_keys2’ [-Wimplicit-function-declaration]
mppe_set_keys2(session_key, &response[MS_CHAP2_NTRESP],
^
pppol2tp plugin fails to build with linux 4.9 headers and musl libc with:
| In file included from pppol2tp.c:34:0:
| /usr/include/linux/if.h:97:2: error: expected identifier before numeric constant
| IFF_LOWER_UP = 1<<16, /* __volatile__ */
I've fixed this locally by removing #include <linux/if_pppox.h>
from openl2tp.c and pppol2tp.c as the include isn't actually needed, but I'm unsure whether this is the fix you'd like upstream... Let me know if you'd rather have a PR.
I am experiencing this problem on Debian Wheezy.
If pppd hangs up for whatever reason (for example because of an LCP echo failure), pppd does not exit, preventing wvdial from re-establishing the connection.
How can I fix this issue?
It seems that no matter what I do I am seeing pppd request the async control character map of 0x00000000 during LCP negotiation with my router during PPTP setup. The router rejects the async control character map parameter and there is no way to remove this from the negotiation it seems. This is connecting using ppp 2.4.7 to my Mikrotik router.
I have a pcap with this failure from wireshark.
Following patch [1] fixes the issue. Though it might be better to divide this patch in logical chunks.
If no disconnection script provided and pppd being halted with SIGTERM, CLOCAL is not re-set during disconnect_tty(). This leads to some nasty race conditions during disconnection of mobile broadband modems in NetworkManager/ModemManager.
See patch at:
https://aleksander.es/patches/0001-pppd-ensure-CLOCAL-is-set-upon-disconnection.patch
Some more background....
pppd will by default unset CLOCAL in the tty termios when connected, in order to use modem control lines. But when pppd is stopped with SIGTERM, CLOCAL is not being reset in the tty.
NetworkManager and ModemManager use pppd to setup the mobile broadband modem connections. Once MM sets the tty in connected mode, NM launches pppd in the tty and the session is established. When the user requests to stop the connection, NM sends a SIGTERM to pppd to get disconnected. Once pppd performs its own disconnection sequence it exits, and once pppd exits, NM will tell MM to handle the disconnection.
Now, if pppd doesn't re-set CLOCAL before exiting, there will be some time (between pppd exit and MM re-setting CLOCAL) where CLOCAL is unset and modem control lines are in effect. If the kernel gets the DCD input control line to low during that time, it may end up launching a full hungup of the device, see Linux kernel's cdc-acm driver snippet:
case USB_CDC_NOTIFY_SERIAL_STATE:
newctrl = get_unaligned_le16(data);
if (!acm->clocal && (acm->ctrlin & ~newctrl & ACM_CTRL_DCD)) {
dev_dbg(&acm->control->dev, "%s - calling hangup\n", __func__);
tty_port_tty_hangup(&acm->port, false);
}
So, rather than exiting with CLOCAL unset, make sure it is always re-set. It currently was only being re-set in non-hungup cases if there was a disconnection script provided.
Is this the correct approach to solve the issue? Or am I missing something?
Cheers!
I'm sorry to say this is about an ancient version of pppd, 2.4.3, but that's what's on the box.
If I have an eth0 set up as 192.168.1.123 mask 255.255.0.0.
( Sorry this is an end-user config, and they were clearly only thinking about their own local networking needs, not the GPRS link I might want to add. )
Then I start up a GPRS session.
I found the GPRS link has configured itself as 192.168.111.1 - clearly not a happy situation.
Now I see on the web that if I omit both auth and noauth options, then the negotiation ought to avoid clashing address ranges. Something didn't work as well as documented.
It is just about possible that the default route via eth0 has been taken down before the negotiation happens, but I don't think that is the case.
Is there anything obvious I can do ( apart from trying to retro-fit the latest pppd )
The PPPoE Access Concentrator of my ISP offers MRU values of both 1492 and 1442. ppp-2.4.5 in Ubuntu 14.04 adopts 1492 as the MTU of the ppp device, while ppp-2.4.7 in Ubuntu 16.04 (xenial developement) adopts 1442. Choosing the lower MTU on the WAN link (ppp0) exposes users to the nasty PMTU-D problem, especially for remote VPN clients. I also reproduced the same problem in openwrt 15.05 and dd-wrt r29085, both of which come with ppp-2.4.7.
ppp-2.4.5 (Ubuntu 14.04):
Feb 19 17:24:42 micky pppd[5479]: sent [LCP ConfReq id=0x1 <mru 1492> <magic 0x83ccc32e>]
Feb 19 17:24:42 micky pppd[5479]: rcvd [LCP ConfAck id=0x1 <mru 1492> <magic 0x83ccc32e>]
Feb 19 17:24:45 micky pppd[5479]: rcvd [LCP ConfReq id=0x2 <mru 1492> <magic 0xf96f421e>]
Feb 19 17:24:45 micky pppd[5479]: sent [LCP ConfAck id=0x2 <mru 1492> <magic 0xf96f421e>]
Feb 19 17:24:45 micky pppd[5479]: sent [LCP EchoReq id=0x0 magic=0x83ccc32e]
Feb 19 17:24:45 micky pppd[5479]: sent [PAP AuthReq id=0x1 user="" password=]
Feb 19 17:24:45 micky pppd[5479]: rcvd [LCP EchoRep id=0x0 magic=0xf96f421e]
Feb 19 17:24:46 micky pppd[5479]: rcvd [LCP ConfReq id=0x8d <mru 1442> <magic 0x457aa88f>]
Feb 19 17:24:46 micky pppd[5479]: sent [LCP ConfReq id=0x2 <mru 1492> <magic 0x2cd5dabd>]
Feb 19 17:24:46 micky pppd[5479]: sent [LCP ConfAck id=0x8d <mru 1442> <magic 0x457aa88f>]
Feb 19 17:24:46 micky pppd[5479]: rcvd [LCP ConfAck id=0x2 <mru 1492> <magic 0x2cd5dabd>]
Feb 19 17:24:46 micky pppd[5479]: sent [LCP EchoReq id=0x0 magic=0x2cd5dabd]
Feb 19 17:24:46 micky pppd[5479]: sent [PAP AuthReq id=0x2 user="" password=]
Feb 19 17:24:46 micky pppd[5479]: rcvd [LCP EchoRep id=0x0 magic=0x457aa88f]
Feb 19 17:24:46 micky pppd[5479]: rcvd [PAP AuthAck id=0x2 ""]
Feb 19 17:24:46 micky pppd[5479]: PAP authentication succeeded
ppp-2.4.7 (Ubuntu xenial development):
Feb 20 08:45:20 micky pppd[3837]: sent [LCP ConfReq id=0x1 <mru 1492> <magic 0xee104411>]
Feb 20 08:45:20 micky pppd[3837]: rcvd [LCP ConfAck id=0x1 <mru 1492> <magic 0xee104411>]
Feb 20 08:45:23 micky pppd[3837]: rcvd [LCP ConfReq id=0x2 <mru 1492> <magic 0xff9adf45>]
Feb 20 08:45:23 micky pppd[3837]: sent [LCP ConfAck id=0x2 <mru 1492> <magic 0xff9adf45>]
Feb 20 08:45:23 micky pppd[3837]: sent [LCP EchoReq id=0x0 magic=0xee104411]
Feb 20 08:45:23 micky pppd[3837]: sent [PAP AuthReq id=0x1 user="" password=]
Feb 20 08:45:23 micky pppd[3837]: rcvd [LCP EchoRep id=0x0 magic=0xff9adf45]
Feb 20 08:45:23 micky pppd[3837]: rcvd [LCP ConfReq id=0xa1 <mru 1442> <magic 0x316220a6>]
Feb 20 08:45:23 micky pppd[3837]: sent [LCP ConfReq id=0x2 <mru 1492> <magic 0xbca3ad64>]
Feb 20 08:45:23 micky pppd[3837]: sent [LCP ConfAck id=0xa1 <mru 1442> <magic 0x316220a6>]
Feb 20 08:45:23 micky pppd[3837]: rcvd [LCP ConfAck id=0x2 <mru 1492> <magic 0xbca3ad64>]
Feb 20 08:45:23 micky pppd[3837]: sent [LCP EchoReq id=0x0 magic=0xbca3ad64]
Feb 20 08:45:23 micky pppd[3837]: sent [PAP AuthReq id=0x2 user="" password=]
Feb 20 08:45:23 micky pppd[3837]: rcvd [LCP EchoRep id=0x0 magic=0x316220a6]
Feb 20 08:45:23 micky pppd[3837]: rcvd [PAP AuthAck id=0x2 ""]
Feb 20 08:45:23 micky pppd[3837]: PAP authentication succeeded
See https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1547754 and http://svn.dd-wrt.com/ticket/5221 for more detailed information.
I am seeing PPTP fail during lcp negotiation with a particular firewall. I believe the issue may be that ppp is neither acknowledging nor rejecting the configuration requests sent by the firewall.
In this case the server is sending callback, CBCP, BACP and a multilink endpoint discriminator parameters.
I have attached a GRE capture using wireshark
pppd , demand.c , demand_conf()
When it never dials up ok, every demand-dial will apply a memory,but never free.
framemax = PPP_MRU;
framemax += PPP_HDRLEN + PPP_FCSLEN;
frame = malloc(framemax);
suggestion:
if (NULL == frame)
{
frame = malloc(framemax);
}
Hi
pptp doesn't add host route entry in route table. It was working before.
Linux arch 4.10.10-1-ARCH x86_64
pptpclient 1.8.0-2
This infrastructure would greatly simplify packagers work, especially for cross-compilated distributions like Buildroot, OpenWrt etc.
I think this patch fixes the problem - exit when the file fails to open.
Otherwise it tries to open files that don't exist about a million times:
XXX XX 00:00:38 localhost pppd[29325]: Failed to open /dev/pts/1: No such file or directory
Until you restart it.
Fix:
diff --git a/pppd/tty.c b/pppd/tty.c
index d571b11..0fb8964 100644
--- a/pppd/tty.c
+++ b/pppd/tty.c
@@ -579,6 +579,7 @@ int connect_tty()
if (err != EINTR) {
error("Failed to open %s: %m", devnam);
status = EXIT_OPEN_FAILED;
+ goto errret;
}
if (!persist || err != EINTR)
goto errret;
Hi, I am running pppd on a linux 4.9 kernel.
I get the above warning quite a lot and I am wondering how this can be solved.
I am using a SIM5360 USB modem. I read the FAQ.
Here is an example of the complete logs:
Apr 24 07:32:52 sazabi daemon.info pppd[1036]: CHAP authentication succeeded
Apr 24 07:32:52 sazabi daemon.notice pppd[1036]: CHAP authentication succeeded
Apr 24 07:32:52 sazabi daemon.debug pppd[1036]: sent [CCP ConfReq id=0x4 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Apr 24 07:32:52 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:32:52 sazabi daemon.debug pppd[1036]: rcvd [LCP ProtRej id=0xb 80 fd 01 04 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Apr 24 07:32:52 sazabi daemon.debug pppd[1036]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Apr 24 07:32:53 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 04 00 04
Apr 24 07:32:53 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:32:53 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x14 00 03 04 00 04]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x4 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: rcvd [IPCP ConfReq id=0x3]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: sent [IPCP ConfNak id=0x3 <addr 0.0.0.0>]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: rcvd [IPCP ConfNak id=0x4 <addr 10.140.247.181> <ms-dns1 100.127.0.53> <ms-dns2 100.127.1.53>]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x5 <addr 10.140.247.181> <ms-dns1 100.127.0.53> <ms-dns2 100.127.1.53>]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: rcvd [IPCP ConfReq id=0x4]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: sent [IPCP ConfAck id=0x4]
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: rcvd [IPCP ConfAck id=0x5 <addr 10.140.247.181> <ms-dns1 100.127.0.53> <ms-dns2 100.127.1.53>]
Apr 24 07:32:55 sazabi daemon.warn pppd[1036]: Could not determine remote IP address: defaulting to 10.64.64.64
Apr 24 07:32:55 sazabi daemon.notice pppd[1036]: local IP address 10.140.247.181
Apr 24 07:32:55 sazabi daemon.notice pppd[1036]: remote IP address 10.64.64.64
Apr 24 07:32:55 sazabi daemon.notice pppd[1036]: primary DNS address 100.127.0.53
Apr 24 07:32:55 sazabi daemon.notice pppd[1036]: secondary DNS address 100.127.1.53
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: Script /etc/ppp/ip-up started (pid 1052)
Apr 24 07:32:55 sazabi daemon.debug pppd[1036]: Script /etc/ppp/ip-up finished (pid 1052), status = 0x0
Apr 24 07:32:57 sazabi daemon.info ntpd[929]: Listen normally on 2 ppp0 10.140.247.181:123
Apr 24 07:32:57 sazabi daemon.debug ntpd[929]: new interface(s) found: waking up resolver
Sometimes, it retries several times and it can take some time to have ppp0 up. As the following logs show:
Apr 24 07:31:02 sazabi daemon.info pppd[1036]: Serial connection established.
Apr 24 07:31:02 sazabi daemon.debug pppd[1036]: using channel 5
Apr 24 07:31:02 sazabi daemon.info pppd[1036]: Using interface ppp0
Apr 24 07:31:02 sazabi daemon.notice pppd[1036]: Connect: ppp0 <--> /dev/ttyUSB3
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x16c97e7e> <pcomp> <accomp>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x135d42d1> <pcomp> <accomp>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x135d42d1> <pcomp> <accomp>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x16c97e7e> <pcomp> <accomp>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [LCP DiscReq id=0x1 magic=0x135d42d1]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [CHAP Challenge id=0x1 <a2c470e4d8dc7da7d03e2e3880e61d64>, name = "UMTS_CHAP_SRVR"]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: sent [CHAP Response id=0x1 <0a3ba61c4029c4d6e919714ac56e0049>, name = "sora"]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [CHAP Success id=0x1 ""]
Apr 24 07:31:03 sazabi daemon.info pppd[1036]: CHAP authentication succeeded
Apr 24 07:31:03 sazabi daemon.notice pppd[1036]: CHAP authentication succeeded
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Apr 24 07:31:03 sazabi daemon.debug pppd[1036]: Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
Apr 24 07:31:04 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:04 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:04 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x2 00 03 01 00 04]
Apr 24 07:31:06 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:07 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:07 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:07 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x3 00 03 01 00 04]
Apr 24 07:31:09 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:10 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:10 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:10 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x4 00 03 01 00 04]
Apr 24 07:31:12 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:13 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:13 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:13 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x5 00 03 01 00 04]
Apr 24 07:31:15 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:16 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:16 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:16 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x6 00 03 01 00 04]
Apr 24 07:31:18 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:19 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:19 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:19 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x7 00 03 01 00 04]
Apr 24 07:31:21 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:22 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:22 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:22 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x8 00 03 01 00 04]
Apr 24 07:31:24 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:25 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:25 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:25 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0x9 00 03 01 00 04]
Apr 24 07:31:27 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:28 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:28 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:28 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0xa 00 03 01 00 04]
Apr 24 07:31:30 sazabi daemon.debug pppd[1036]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
Apr 24 07:31:31 sazabi daemon.debug pppd[1036]: rcvd [proto=0x3] 01 00 04
Apr 24 07:31:31 sazabi daemon.warn pppd[1036]: Unsupported protocol 0x3 received
Apr 24 07:31:31 sazabi daemon.debug pppd[1036]: sent [LCP ProtRej id=0xb 00 03 01 00 04]
Apr 24 07:31:33 sazabi daemon.warn pppd[1036]: IPCP: timeout sending Config-Requests
Apr 24 07:31:33 sazabi daemon.debug pppd[1036]: sent [LCP TermReq id=0xc "No network protocols running"]
Apr 24 07:31:33 sazabi daemon.debug pppd[1036]: rcvd [LCP TermAck id=0xc]
Apr 24 07:31:33 sazabi daemon.notice pppd[1036]: Connection terminated.
pppd will the retry and retry until it succeeds. In the end, it always succeeds but it can take one or two minutes sometime (sometimes up to 5 minutes until it succeeds). Is there any way to avoid this warning and succeed on the first try? Thanks.
[root@MyServer ppp-2.4.7]#make
cd chat; make all
make[1]: Entering directory /root/ppp-2.4.7/chat' make[1]: Nothing to be done for
all'.
make[1]: Leaving directory /root/ppp-2.4.7/chat' cd pppd/plugins; make all make[1]: Entering directory
/root/ppp-2.4.7/pppd/plugins'
for d in rp-pppoe pppoatm pppol2tp radius; do make -w -C $d all; done
make[2]: Entering directory /root/ppp-2.4.7/pppd/plugins/rp-pppoe' make[2]: Nothing to be done for
all'.
make[2]: Leaving directory /root/ppp-2.4.7/pppd/plugins/rp-pppoe' make[2]: Entering directory
/root/ppp-2.4.7/pppd/plugins/pppoatm'
make[2]: Nothing to be done for all'. make[2]: Leaving directory
/root/ppp-2.4.7/pppd/plugins/pppoatm'
make[2]: Entering directory /root/ppp-2.4.7/pppd/plugins/pppol2tp' /usr/local/bin/gcc -O2 -g -I. -I../.. -I../../../include -fPIC -c -o pppol2tp.o pppol2tp.c pppol2tp.c:50:31: fatal error: linux/if_pppol2tp.h: No such file or directory #include <linux/if_pppol2tp.h> ^ compilation terminated. make[2]: *** [pppol2tp.o] Error 1 make[2]: Leaving directory
/root/ppp-2.4.7/pppd/plugins/pppol2tp'
make[2]: Entering directory /root/ppp-2.4.7/pppd/plugins/radius' make[2]: Nothing to be done for
all'.
make[2]: Leaving directory /root/ppp-2.4.7/pppd/plugins/radius' make[1]: Leaving directory
/root/ppp-2.4.7/pppd/plugins'
cd pppd; make all
make[1]: Entering directory /root/ppp-2.4.7/pppd' make[1]: Nothing to be done for
all'.
make[1]: Leaving directory /root/ppp-2.4.7/pppd' cd pppstats; make all make[1]: Entering directory
/root/ppp-2.4.7/pppstats'
make[1]: Nothing to be done for all'. make[1]: Leaving directory
/root/ppp-2.4.7/pppstats'
cd pppdump; make all
make[1]: Entering directory /root/ppp-2.4.7/pppdump' make[1]: Nothing to be done for
all'.
make[1]: Leaving directory `/root/ppp-2.4.7/pppdump'
[root@MyServer ppp-2.4.7]#
Hi,
I've been trying to debug this for two weeks.
I'm on a GPON PPPoE service here, and observing the following while trying to get 1500 byte MTU working (per RFC4683):
When I connect we are passing PPP-Max-Payload tags around, and both sides seem to accept (including the 05 DC value which is 1500 in hex)
But pppd seems to be forgetting to let the other side know in the LCP stage that we are looking to up that MTU/MRU to 1500.
Using lower value (ie 1400 does get picked up, even though the provider pushes it back up to 1492)
Thinking this has something to do with udev/systemd config no longer having /dev entries for the network device and pppd s skipping the MTU check?
Sample log, arch linux box
Oct 17 11:32:40 router pppd[400]: Plugin rp-pppoe.so loaded.
Oct 17 11:32:40 router pppd[400]: RP-PPPoE plugin version 3.8p compiled against pppd 2.4.7
Oct 17 11:32:40 router pppd[401]: pppd 2.4.7 started by root, uid 0
Oct 17 11:32:40 router pppd[401]: Send PPPOE Discovery V1T1 PADI session 0x0 length 18
Oct 17 11:32:40 router pppd[401]: dst ff:ff:ff:ff:ff:ff src 00:22:xx:xx:xx:xx
Oct 17 11:32:40 router pppd[401]: [service-name] [host-uniq 91 01 00 00] [PPP-max-payload 05 dc]
Oct 17 11:32:40 router pppd[401]: Recv PPPOE Discovery V1T1 PADO session 0x0 length 77
Oct 17 11:32:40 router pppd[401]: dst 00:22:xx:xx:xx:xx src 00:24:14:9a:b9:20
Oct 17 11:32:40 router pppd[401]: [vendor-specific 00 00 0d e9 01 0f 41 56 43 30 30 30 30 31 32 30 37 35 32 34 31] [service-name] [host-uniq 91 01 00 00] [PPP-max-payload 05 dc] [AC-name lns20.syd7] [AC-cookie 81 9c de 28 84 8b f1 97 46 60 37 6f b0 ee c2 a6]
Oct 17 11:32:40 router pppd[401]: Send PPPOE Discovery V1T1 PADR session 0x0 length 38
Oct 17 11:32:40 router pppd[401]: dst 00:24:14:9a:b9:20 src 00:22:xx:xx:xx:xx
Oct 17 11:32:40 router pppd[401]: [service-name] [host-uniq 91 01 00 00] [PPP-max-payload 05 dc] [AC-cookie 81 9c de 28 84 8b f1 97 46 60 37 6f b0 ee c2 a6]
Oct 17 11:32:40 router pppd[401]: Recv PPPOE Discovery V1T1 PADS session 0xc394 length 63
Oct 17 11:32:40 router pppd[401]: dst 00:22:xx:xx:xx:xx src 00:24:14:9a:b9:20
Oct 17 11:32:40 router pppd[401]: [vendor-specific 00 00 0d e9 01 0f 41 56 43 30 30 30 30 31 32 30 37 35 32 34 31] [service-name] [host-uniq 91 01 00 00] [PPP-max-payload 05 dc] [AC-cookie 81 9c de 28 84 8b f1 97 46 60 37 6f b0 ee c2 a6]
Oct 17 11:32:40 router pppd[401]: PADS: Service-Name: ''
Oct 17 11:32:40 router pppd[401]: PPP session is 50068
Oct 17 11:32:40 router pppd[401]: Connected to 00:24:14:9a:b9:20 via interface enp2s0
Oct 17 11:32:40 router pppd[401]: using channel 2
Oct 17 11:32:40 router pppd[401]: Using interface ppp0
Oct 17 11:32:40 router pppd[401]: Connect: ppp0 <--> enp2s0
Oct 17 11:32:40 router pppd[401]: sent [LCP ConfReq id=0x1 <magic 0x4b115da4>]
Oct 17 11:32:40 router pppd[401]: rcvd [LCP ConfReq id=0x1 <auth chap MD5> <magic 0x4fd132e9>]
Oct 17 11:32:40 router pppd[401]: sent [LCP ConfAck id=0x1 <auth chap MD5> <magic 0x4fd132e9>]
Oct 17 11:32:40 router pppd[401]: rcvd [LCP ConfAck id=0x1 <magic 0x4b115da4>]
Oct 17 11:32:40 router pppd[401]: sent [LCP EchoReq id=0x0 magic=0x4b115da4]
Oct 17 11:32:40 router pppd[401]: rcvd [CHAP Challenge id=0x1 <e46bacc5ec157c649008ad0dfa333efa>, name = "lns20.syd7"]
Oct 17 11:32:40 router pppd[401]: sent [CHAP Response id=0x1 <2df5ba7689b3627e44ac24341ed3bcb5>, name = "[email protected]"]
Oct 17 11:32:40 router pppd[401]: rcvd [LCP EchoRep id=0x0 magic=0x4fd132e9]
Oct 17 11:32:40 router pppd[401]: rcvd [CHAP Success id=0x1 ""]
Oct 17 11:32:40 router pppd[401]: CHAP authentication succeeded
Oct 17 11:32:40 router pppd[401]: CHAP authentication succeeded
Oct 17 11:32:40 router pppd[401]: peer from calling number 00:24:14:9A:B9:20 authorized
Oct 17 11:32:40 router pppd[401]: sent [IPCP ConfReq id=0x1 <addr 0.0.0.0>]
Oct 17 11:32:40 router pppd[401]: sent [IPV6CP ConfReq id=0x1 <addr fe80::f9a2:xx:xx:xx>]
Oct 17 11:32:40 router pppd[401]: rcvd [IPCP ConfReq id=0x1 <addr 150.101.199.219>]
Oct 17 11:32:40 router pppd[401]: sent [IPCP ConfAck id=0x1 <addr 150.101.199.219>]
Oct 17 11:32:40 router systemd-networkd[391]: ppp0: Gained carrier
Oct 17 11:32:40 router pppd[401]: rcvd [IPCP ConfNak id=0x1 <addr xx.xx.xx.xx>]
Oct 17 11:32:40 router pppd[401]: sent [IPCP ConfReq id=0x2 <addr xx.xx.xx.xx>]
Oct 17 11:32:40 router pppd[401]: rcvd [IPV6CP ConfReq id=0x1 <addr fe80::0224:14ff:fe9a:b910>]
Oct 17 11:32:40 router pppd[401]: sent [IPV6CP ConfAck id=0x1 <addr fe80::0224:14ff:fe9a:b910>]
Oct 17 11:32:40 router pppd[401]: rcvd [IPV6CP ConfAck id=0x1 <addr fe80::f9a2:xx:xx:xx>]
Oct 17 11:32:40 router pppd[401]: local LL address fe80::f9a2:xx:xx:xx
Oct 17 11:32:40 router pppd[401]: remote LL address fe80::0224:14ff:fe9a:b910
Oct 17 11:32:40 router pppd[401]: Script /etc/ppp/ipv6-up started (pid 405)
Oct 17 11:32:40 router pppd[401]: rcvd [IPCP ConfAck id=0x2 <addr xx.xx.xx.xx>]
Oct 17 11:32:40 router pppd[401]: Cannot determine ethernet address for proxy ARP
Oct 17 11:32:40 router pppd[401]: local IP address xx.xx.xx.xx
Oct 17 11:32:40 router pppd[401]: remote IP address 150.101.199.219
Oct 17 11:32:41 router pppd[401]: Script /etc/ppp/ip-up started (pid 407)
Oct 17 11:32:41 router pppd[401]: Script /etc/ppp/ipv6-up finished (pid 405), status = 0x0
Oct 17 11:32:41 router pppd[401]: Script /etc/ppp/ip-up finished (pid 407), status = 0x0
Oct 17 11:33:06 router pppd[401]: Terminating on signal 15
Oct 17 11:33:06 router pppd[401]: Connect time 0.5 minutes.
Oct 17 11:33:06 router pppd[401]: Sent 48 bytes, received 496 bytes.
Oct 17 11:33:06 router pppd[401]: Script /etc/ppp/ip-down started (pid 421)
Oct 17 11:33:06 router systemd-networkd[391]: ppp0: Lost carrier
Oct 17 11:33:06 router pppd[401]: Script /etc/ppp/ipv6-down started (pid 422)
Oct 17 11:33:06 router pppd[401]: sent [LCP TermReq id=0x2 "User request"]
Oct 17 11:33:06 router pppd[401]: Script /etc/ppp/ipv6-down finished (pid 422), status = 0x0
Oct 17 11:33:06 router pppd[401]: rcvd [LCP TermAck id=0x2]
Oct 17 11:33:06 router pppd[401]: Connection terminated.
Oct 17 11:33:06 router pppd[401]: Connect time 0.5 minutes.
Hi. How about add patch for configure optional usage mppe from here:
https://bugs.launchpad.net/ubuntu/+source/ppp/+bug/88986
It's add "mppe-optional" option, which allow connect with mppe to hosts with mppe support and allow work without mppe if host not support mppe. It may be useful to connect from/to different devices with and without mppe support in same time.
Greetings!
As I noticed there is no PADT
packet sending on termination in PPPoE
plugin in function PPPOEDisconnectDevice
.
There is a comment instead: /* don't send PADT?? */
.
So, I'd like to ask about that. That's very annoying while ISP has high keepalive timeouts (in my case about 5-40 mins of hanging with message Remote message: % Sessions limit exceeded.
) when one disconnects.
What's the point of not sending it on disconnect? Or maybe I have misunderstood that logic?
Thanks!
Alarig Le Lay reported an issue about handling IPv6 radius attributes, and proposed a patch in https://marc.info/?l=linux-ppp&m=145226335014356&w=2
The patch has been proposed to debian in
https://bugs.debian.org/874620
and I am just forwarding the patch here for making it more visible.
A patched ppp version is currently being used by grifon.fr ISP.
Cheers,
Santiago
There are some new files not included in the diffs, but this should be enough ...
--- /home/ole/ppp-2.4.7/pppd/auth.c Sat Aug 9 14:31:39 2014
+++ auth.c Sat Dec 27 12:11:07 2014
@@ -81,7 +81,13 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/socket.h>
-#include <utmp.h>
+#ifdef SUPPORT_UTMP
+#endif
+#ifdef SUPPORT_UTMPX
+#include <utmpx.h>
+#include <util.h>
+#endif
@@ -114,7 +120,9 @@
+#ifndef PPP_ECP
+#include "bsd.h"
+#endif
static const char rcsid[] = RCSID;
/* Bits in scan_authfile return value */
@@ -241,7 +249,9 @@
static char uafname; / name of most recent +ua file */
+#ifndef FreeBSD
extern char *crypt __P((const char *, const char *));
+#endif
/* Prototypes for procedures local to this file. */
@@ -872,6 +882,9 @@
#ifdef PPP_FILTER
if (!demand)
set_filters(&pass_filter, &active_filter);
+
/* set_filters(&pass_filter_in, &pass_filter_out,
&active_filter_in, &active_filter_out); NetBSD _/
#endif
/_ Start CCP and ECP */
for (i = 0; (protp = protocols[i]) != NULL; ++i)
@@ -2230,7 +2243,12 @@
if (ap == NULL)
novm("authorized addresses");
ap->word = (char *) (ap + 1);
+#if 0
/\* gcc : warning: strcpy() is almost always misused, please use strlcpy()*/
strcpy(ap->word, word);
+#else
strlcpy(ap->word, word, strlen(word) + 1);
+#endif
*app = ap;
app = &ap->next;
}
--- /home/ole/ppp-2.4.7/pppd/cbcp.c Sat Aug 9 14:31:39 2014
+++ cbcp.c Sun Jan 4 15:20:48 2015
@@ -166,7 +166,7 @@
if (pktlen < CBCP_MINLEN) {
if (debug)
dbglog("CBCP packet is too small");
dbglog("CBCP: Packet too short (%d)", pktlen); /*NetBSD patch */
return;
}
@@ -176,7 +176,7 @@
if (len > pktlen || len < CBCP_MINLEN) {
if (debug)
dbglog("CBCP packet: invalid length %d", len);
dbglog("CBCP: Invalid packet length (%d/%d)", len, pktlen);/*NetBSD patch */
return;
@@ -319,7 +319,11 @@
GETCHAR(type, pckt);
GETCHAR(opt_len, pckt);
if (opt_len < 2 || opt_len > len)
if (debug)
dbglog("CBCP: Malformed option length (%d/%d)", opt_len, len);
break;
if (opt_len > 2)
GETCHAR(delay, pckt);
--- /home/ole/ppp-2.4.7/pppd/ccp.c Sat Aug 9 14:31:39 2014
+++ ccp.c Sun Jan 4 15:26:08 2015
@@ -41,7 +41,10 @@
+#ifndef CI_MPPE
+#include "bsd.h"
+#endif
static const char rcsid[] = RCSID;
@@ -679,7 +682,10 @@
+ (go->deflate? CILEN_DEFLATE: 0)
+ (go->predictor_1? CILEN_PREDICTOR_1: 0)
+ (go->predictor_2? CILEN_PREDICTOR_2: 0)
/*
--- /home/ole/ppp-2.4.7/pppd/chap_ms.c Sat Aug 9 14:31:39 2014
+++ chap_ms.c Thu Dec 18 12:29:42 2014
@@ -397,7 +397,7 @@
NULL,
our_name, secret, secret_len, response, auth_response,
our_name, secret, secret_len, response, private,
MS_CHAP2_AUTHENTICATEE);
chapms2_add_to_response_cache(id, challenge, response, auth_response);
}
@@ -639,7 +639,7 @@
/* LANMan password is case insensitive */
BZERO(UcasePassword, sizeof(UcasePassword));
for (i = 0; i < secret_len; i++)
UcasePassword[i] = (u_char)toupper(secret[i]);
UcasePassword[i] = (u_char)toupper((unsigned char)secret[i]);
(void) DesSetkey(UcasePassword + 0);
DesEncrypt( StdText, PasswordHash + 0 );
(void) DesSetkey(UcasePassword + 7);
@@ -691,7 +691,8 @@
/* Convert to ASCII hex string. */
for (i = 0; i < MAX((MS_AUTH_RESPONSE_LENGTH / 2), sizeof(Digest)); i++)
sprintf((char *)&authResponse[i * 2], "%02X", Digest[i]);
snprintf((char *)&authResponse[i \* 2],
MS_AUTH_RESPONSE_LENGTH + 1, "%02X", Digest[i]);
}
--- /home/ole/ppp-2.4.7/pppd/demand.c Sat Aug 9 14:31:39 2014
+++ demand.c Sun Jan 4 15:42:55 2015
@@ -44,7 +44,11 @@
#include <sys/stat.h>
#include <sys/socket.h>
#ifdef PPP_FILTER
+#ifdef IS_BSD
+#include <pcap.h>
+#else
#include <pcap-bpf.h>
+#endif
#endif
#include "pppd.h"
--- /home/ole/ppp-2.4.7/pppd/eap.c Sat Aug 9 14:31:39 2014
+++ eap.c Sun Jan 4 16:47:20 2015
@@ -60,6 +60,9 @@
#include <assert.h>
#include <errno.h>
+#ifndef PPP_EAP
+#include "bsd.h"
+#endif
#include "pppd.h"
#include "pathnames.h"
#include "md5.h"
@@ -179,6 +182,21 @@
/* Local forward declarations. */
static void eap_server_timeout __P((void *arg));
+static const char *eap_state_name __P((enum eap_state_code));
+static void eap_client_timeout __P((void *arg));
+static void eap_send_failure __P((eap_state *));
+static void eap_send_success __P((eap_state *));
+static void eap_figure_next_state __P((eap_state *, int));
+static void eap_send_request __P((eap_state *));
+static void eap_rechallenge __P((void *));
+static void srp_lwrechallenge __P((void *));
+static void eap_send_response __P((eap_state *, u_char, u_char, const char *, int));
+static void eap_chap_response __P((eap_state *, u_char, const u_char *, const char *, int));
+static void eap_send_nak __P((eap_state *,u_char,u_char));
+static void eap_request __P((eap_state *, u_char *, int, int));
+static void eap_response __P((eap_state *, u_char *, int, int));
+static void eap_success __P((eap_state *, u_char *, int, int));
+static void eap_failure __P((eap_state *, u_char *, int, int));
/*
Convert EAP state code to printable string for debug.
@@ -1043,7 +1061,7 @@
eap_state esp;
u_char id;
u_char typenum;
-u_char *str;
+const char *str;
int lenstr;
{
u_char *outp;
@@ -1073,8 +1091,8 @@
eap_chap_response(esp, id, hash, name, namelen)
eap_state *esp;
u_char id;
-u_char *hash;
-char *name;
+const u_char *hash;
+const char *name;
int namelen;
{
u_char *outp;
@@ -1366,7 +1384,7 @@
esp->es_usedpseudo = 1;
/ Try to get a pseudonym */
if ((fd = open_pn_file(O_RDONLY)) >= 0) {
strcpy(rhostname, SRP_PSEUDO_ID);
strlcpy(rhostname, SRP_PSEUDO_ID, sizeof(rhostname));
len = read(fd, rhostname + SRP_PSEUDO_LEN,
sizeof (rhostname) - SRP_PSEUDO_LEN);
/\* XXX NAI unsupported */
static option_t ecp_option_list[] = {
{ "noecp", o_bool, &ecp_protent.enabled_flag,
--- /home/ole/ppp-2.4.7/pppd/eui64.c Sat Aug 9 14:31:39 2014
+++ eui64.c Thu Dec 18 14:24:29 2014
@@ -34,6 +34,7 @@
*
*/
+#ifdef INET6
@@ -55,3 +56,4 @@
e.e8[4], e.e8[5], e.e8[6], e.e8[7]);
return buf;
}
+#endif /inet6/
--- /home/ole/ppp-2.4.7/pppd/fsm.c Sat Aug 9 14:31:39 2014
+++ fsm.c Sun Jan 4 17:01:40 2015
@@ -65,6 +65,7 @@
static void fsm_rtermack __P((fsm *));
static void fsm_rcoderej __P((fsm *, u_char *, int));
static void fsm_sconfreq __P((fsm *, int));
+static void terminate_layer __P((fsm *, int));
#define PROTO_NAME(f) ((f)->callbacks->proto_name)
@@ -306,7 +307,7 @@
case ACKRCVD:
case ACKSENT:
if (f->retransmits <= 0) {
warn("%s: timeout sending Config-Requests\n", PROTO_NAME(f));
warn("%s: timeout sending Config-Requests", PROTO_NAME(f));/*netbsd hack*/
f->state = STOPPED;
if( (f->flags & OPT_PASSIVE) == 0 && f->callbacks->finished )
(*f->callbacks->finished)(f);
--- /home/ole/ppp-2.4.7/pppd/ipcp.c Sat Aug 9 14:31:39 2014
+++ ipcp.c Sun Jan 4 17:07:43 2015
@@ -1873,12 +1873,12 @@
}
/* assign a default route through the interface if required */
if (ipcp_wantoptions[f->unit].default_route)
if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].default_route) /*nb hack*/
if (sifdefaultroute(f->unit, go->ouraddr, ho->hisaddr))
default_route_set[f->unit] = 1;
/* Make a proxy ARP entry if requested. */
if (ho->hisaddr != 0 && ipcp_wantoptions[f->unit].proxy_arp)
if (ipcp_wantoptions[f->unit].proxy_arp)/_nb hack_/
if (sifproxyarp(f->unit, ho->hisaddr))
proxy_arp_set[f->unit] = 1;
--- /home/ole/ppp-2.4.7/pppd/ipv6cp.c Sat Aug 9 14:31:39 2014
+++ ipv6cp.c Sun Jan 4 17:19:24 2015
@@ -137,6 +137,7 @@
*
@@ -203,6 +204,7 @@
static void ipv6cp_up __P((fsm )); / We're UP _/
static void ipv6cp_down _P((fsm *)); / We're DOWN _/
static void ipv6cp_finished _P((fsm *)); / Don't need lower layer */
+static char *llv6_ntoa __P((eui64_t));
fsm ipv6cp_fsm[NUM_PPP]; /* IPV6CP fsm structure */
@@ -337,6 +339,9 @@
struct in6_addr addr;
static int prio_local, prio_remote;
+#ifndef s6_addr32
+#define s6_addr32 __u6_addr.__u6_addr32 /* non-standard */
+#endif
#define VALIDID(a) ( (((a).s6_addr32[0] == 0) && ((a).s6_addr32[1] == 0)) &&
(((a).s6_addr32[2] != 0) || ((a).s6_addr32[3] != 0)) )
@@ -384,8 +389,6 @@
return 1;
}
static void
printifaceid(opt, printer, arg)
option_t opt;
@@ -404,13 +407,13 @@
/
@@ -1388,9 +1391,10 @@
char strspeed[32], strlocal[32], strremote[32];
char *argv[8];
sprintf(strspeed, "%d", baud_rate);
strcpy(strlocal, llv6_ntoa(ipv6cp_gotoptions[0].ourid));
strcpy(strremote, llv6_ntoa(ipv6cp_hisoptions[0].hisid));
snprintf(strspeed, sizeof(strspeed), "%d", baud_rate);
strlcpy(strlocal, llv6_ntoa(ipv6cp_gotoptions[0].ourid), sizeof(strlocal));
strlcpy(strremote, llv6_ntoa(ipv6cp_hisoptions[0].hisid),
sizeof(strremote));
argv[0] = script;
argv[1] = ifname;
@@ -1542,3 +1546,4 @@
return 0;
return 1;
}
+#endif /INET6/
--- /home/ole/ppp-2.4.7/pppd/lcp.c Sat Aug 9 14:31:39 2014
+++ lcp.c Sun Jan 4 17:27:24 2015
@@ -55,6 +55,9 @@
+#ifndef PPP_EAP
+#include "bsd.h"
+#endif
static const char rcsid[] = RCSID;
--- /home/ole/ppp-2.4.7/pppd/main.c Fri Jan 2 18:37:46 2015
+++ main.c Fri Jan 2 18:38:45 2015
@@ -91,6 +91,10 @@
#include <netinet/in.h>
#include <arpa/inet.h>
+#ifndef PPP_EAP
+#include "bsd.h"
+#endif
+
#include "pppd.h"
#include "magic.h"
#include "fsm.h"
@@ -1589,7 +1593,7 @@
dup2(infd, 0);
if (outfd != 1)
dup2(outfd, 1);
if (log_to_fd > 2)
@@ -1604,7 +1608,8 @@
close(infd);
if (outfd != 1)
close(outfd);
notify(fork_notifier, 0);
@@ -1684,7 +1689,7 @@
++conn_running;
pid = safe_fork(in, out, errfd);
if (pid < 0) {
@@ -1825,7 +1830,7 @@
setuid(0); /* set real UID = root */
setgid(getegid());
-#ifdef BSD
+#ifdef IS_BSD
/* Force the priority back to zero if pppd is running higher. /
if (setpriority (PRIO_PROCESS, 0, 0) < 0)
warn("can't reset priority to 0: %m");
--- /home/ole/ppp-2.4.7/pppd/md4.c Sat Aug 9 14:31:39 2014
+++ md4.c Mon Dec 2 09:25:58 2013
@@ -30,6 +30,8 @@
/ Implementation notes:
** This implementation assumes that ints are 32-bit quantities.
*/
+#ifndef NetBSD
+#ifdef CHAPMS
#define TRUE 1
#define FALSE 0
@@ -293,7 +295,8 @@
}
}
+#endif
+#endif /* netbsd_/
/_
** End of md4.c
_(cut)_*******/
--- /home/ole/ppp-2.4.7/pppd/multilink.c Sat Aug 9 14:31:39 2014
+++ multilink.c Sun Jan 4 17:48:32 2015
@@ -27,6 +27,8 @@
for (p = str; isxdigit(*p); ++p)
for (p = str; isxdigit((unsigned char)*p); ++p)
;
+#endif /HAVE_MULTILINK/
--- /home/ole/ppp-2.4.7/pppd/options.c Sat Aug 9 14:31:39 2014
+++ options.c Sun Jan 4 17:56:59 2015
@@ -84,7 +84,7 @@
struct option_value {
struct option_value *next;
const char *source;
/*
@@ -346,7 +346,7 @@
-static char *usage_string = "
+static const char *usage_string = "
pppd version %s\n
Usage: %s [ options ], where options are:\n
Communicate over the named device\n
@@ -591,17 +591,17 @@
*/
static int
match_option(name, opt, dowild)
if (dowild != (opt->type == o_wild))
return 0;
if (!dowild)
return strcmp(name, opt->name) == 0;
@@ -793,11 +793,11 @@
if (!(*parser)(argv))
return 0;
if (opt->flags & OPT_A2LIST) {
ovp = malloc(sizeof(_ovp) + strlen(_argv));
if (ovp != 0) {
strcpy(ovp->value, *argv);
struct option_value ov;
struct option_value *ovp= &ov;
struct option_value *pp;
if (ovp != NULL) {
strlcpy(ovp->value, *argv, sizeof(ovp->value));
ovp->source = option_source;
ovp->next = NULL;
if (opt->addr2 == NULL) {
if ((eqp = strchr(arg, '=')) == NULL) {
option_error("missing = in name=value: %s", arg);
@@ -1675,9 +1676,11 @@
return 1;
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
// uep = malloc(sizeof (*uep) + (eqp-arg));
// strncpy(uep->ue_name, arg, eqp-arg);
//uep->ue_name[eqp-arg] = '\0';
uep->ue_next = NULL;
insp = &userenv_list;
while (*insp != NULL)
@@ -1748,8 +1751,8 @@
return 1;
/* The name never changes, so allocate it with the structure */
if (uep == NULL) {
+#include <stdlib.h>
+#include <unistd.h>
+static u_char Get7Bits(u_char *, int);
+static void MakeKey(u_char *, u_char *);
+
static u_char
Get7Bits(input, startBit)
u_char *input;
@@ -68,6 +74,9 @@
}
+static void Expand(u_char , u_char *);
+static void Collapse(u_char *, u_char *);
+
/
bool
-DesEncrypt(clear, key, cipher)
+DesEncrypt(clear, cipher)
u_char clear; / IN 8 octets /
u_char *cipher; / OUT 8 octets */
{
--- /home/ole/ppp-2.4.7/pppd/session.c Sat Aug 9 14:31:39 2014
+++ session.c Sun Jan 4 18:33:45 2015
@@ -72,11 +72,16 @@
+#ifndef USE_CRYPT
+#endif
+#ifndef SYS_STDINT_H
+#include <stdint.h>
+#endif
--- /home/ole/ppp-2.4.7/pppd/utils.c Sat Aug 9 14:31:39 2014
+++ utils.c Sun Jan 4 19:56:51 2015
@@ -41,7 +41,6 @@
-#include <utmp.h>
@@ -75,6 +74,7 @@
int len;
};
+#ifndef __BSD_VISIBLE
/*
strlcpy - like strcpy/strncpy, doesn't overflow destination buffer,
always leaves destination null-terminated (for len > 0).
@@ -112,6 +112,7 @@
return dlen + strlcpy(dest + dlen, src, (len > dlen? len - dlen: 0));
}
+#endif
/*
@@ -196,7 +197,7 @@
width = va_arg(args, int);
c = *++fmt;
} else {
while (isdigit(c)) {
while (isdigit((unsigned char)c)) {
while (isdigit(c)) {
while (isdigit((unsigned char)c)) {
prec = prec \* 10 + c - '0';
c = *++fmt;
str = ctime(&t);
if ((str = ctime(&t)) == NULL)
strlcpy(str = num, "?", sizeof(num));
else {
str += 4; /\* chop off the day name _/
str[15] = 0; /_ chop off year and newline */
}
+#endif /* NetBSD/
/
** End of md4.h
_(cut)_*******/
--- /home/ole/ppp-2.4.7/pppd/md5.h Sat Aug 9 14:31:39 2014
+++ md5.h Thu Dec 18 12:46:14 2014
@@ -37,6 +37,14 @@
*/
+#ifdef HAVE_MD5
+#include <md5.h>
+#define MD5_Init(x) MD5Init(x)
+#define MD5_Update(x, y, z) MD5Update(x, y, z)
+#define MD5_Final(x, y) MD5Final(x, y)
+#define MD5_INCLUDE
+#endif
+
#ifndef MD5_INCLUDE
/* typedef a 32-bit type */
--- /home/ole/ppp-2.4.7/pppd/pppcrypt.h Sat Aug 9 14:31:39 2014
+++ pppcrypt.h Sat Dec 20 06:41:29 2014
@@ -38,7 +38,11 @@
#endif
#ifndef USE_CRYPT
+#ifdef FreeBSD
+#include <openssl/des.h>
+#else
#include <des.h>
+#endif
#endif
extern bool DesSetkey __P((u_char *));
--- /home/ole/ppp-2.4.7/pppd/pppd.h Sat Aug 9 14:31:39 2014
+++ pppd.h Sun Jan 4 18:25:33 2015
@@ -71,6 +71,10 @@
#include "eui64.h"
#endif
+#ifndef STDBOOL_H
+#include <stdbool.h> /* for bool /
+#endif
+
/
enum opt_type {
o_special_noarg = 0,
o_special = 1,
@@ -214,7 +216,7 @@
extern int hungup; /* Physical layer has disconnected /
extern int ifunit; / Interface unit number /
extern char ifname[]; / Interface name /
-extern char hostname[]; / Our hostname /
+extern char hostname[MAXNAMELEN]; / Our hostname /
extern u_char outpacket_buf[]; / Buffer for outgoing packets /
extern int devfd; / fd of underlying device /
extern int fd_ppp; / fd for talking PPP /
@@ -474,7 +476,7 @@
bool ue_isset; / 1 for set, 0 for unset /
bool ue_priv; / from privileged source /
const char *ue_source; / source name */
char ue_name[1]; /* variable name */
char ue_name[255]; /* variable name */
};
extern struct userenv userenv_list;
@@ -527,8 +529,10 @@
/ Format a string for output _/
int slprintf _P((char *, int, char *, ...)); / sprintf++ _/
int vslprintf _P((char *, int, char *, va_list)); / vsprintf++ _/
+#ifndef __BSD_VISIBLE
size_t strlcpy _P((char *, const char *, size_t)); / safe strcpy _/
size_t strlcat _P((char *, const char *, size_t)); / safe strncpy _/
+#endif
void dbglog _P((char *, ...)); / log a debug message _/
void info _P((char *, ...)); / log an informational message _/
void notice _P((char *, ...)); / log a notice-level message _/
@@ -736,6 +740,10 @@
extern void (_ip_choose_hook) __P((u_int32_t _));
extern void (_ipv6_up_hook) __P((void));
extern void (_ipv6_down_hook) __P((void));
+void (_lcp_up_hook) __P((void));
+void (_lcp_down_hook) __P((void));
+void (_lcp_echo_hook) __P((int));
+void (*lcp_echoreply_hook) __P((int));
extern int (_chap_check_hook) __P((void));
extern int (_chap_passwd_hook) __P((char user, char *passwd));
--- /home/ole/ppp-2.4.7/pppd/sha1.h Sat Aug 9 14:31:39 2014
+++ sha1.h Sun Jan 4 18:42:58 2015
@@ -1,13 +1,20 @@
/ sha1.h */
+#if (defined OpenBSD) || (defined NetBSD)
+#include <sha1.h>
+#define SHA1_Init(x) SHA1Init(x)
+#define SHA1_Update(x, y, z) SHA1Update(x, y, z)
+#define SHA1_Final(x, y) SHA1Final(x, y)
+#define _SHA1_INCLUDE
+#endif
/* If OpenSSL is in use, then use that version of SHA-1 */
+#ifndef _SHA1_INCLUDE
#ifdef OPENSSL
#include <t_sha.h>
#define _SHA1_INCLUDE
#endif
+#endif
#ifndef SHA1_SIGNATURE_SIZE
#ifdef SHA_DIGESTSIZE
#define SHA1_SIGNATURE_SIZE SHA_DIGESTSIZE
@@ -16,6 +23,7 @@
#endif
#endif
+#ifndef _SHA1_INCLUDE
typedef struct {
u_int32_t state[5];
u_int32_t count[2];
Dear Sir's:
I try to send below command, but pppd can not send pppoe service name,
so what problem for below command?
Thanks.
command:
pppd unit 100 user auto password auto nodetach holdoff 4 maxfail 0 usepeerdns lcp-echo-interval 1 lcp-echo-failure 60 plugin libpppoe.so nas10_0 defaultroute noipdefault persist mtu 1492 mru 1492 plugin rp-pppoe.so rp_pppoe_service 'service_name' debug &
debug message:
RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Plugin rp-pppoe.so loaded.
RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Send PPPOE Discovery V1T1 PADI session 0x0 length 17
dst ff:ff:ff:ff:ff:ff src 0:aa:bb:53:68:63
[service-name ] [host-uniq 00 00 70 6b]
Note: this could be specific to my distro, I am using Debian "Wheezy" on a BeagleBone Black (OMAP).
For the most part, using "linkname modem0" works by creating the file /var/run/ppp-modem0.pid and this file contains 2 lines of text. Line 1 has the pid number and line 2 has the interface name ("ppp0"). On rare occasions this file is created with only the pid number of the process. I treat this as an error in my PPP manager and react accordingly.
Is the occasional absence of the interface name (line 2) part of the normal operation of pppd, or is this some bug in the program?
--- example logs, from my PPP manager ----
LS Log showing the PID cache issue occuring;
Oct 3 20:07:28 [000033] [20:07:28] PPPD: {pppHandler::StartDaemon} - examining /var/run/ppp-modem0.pid for process id and basic number...
Oct 3 20:07:28 [000033] [20:07:28] PPPD: {pppHandler::StartDaemon} - PID[2309], Basic Intf. Num[]
Oct 3 20:07:28 [000033] [20:07:28] PPPD: {pppHandler::StartDaemon} - error, pppd startup confirmation (pid-cache data) failed!
Note: "Basic Intf. Num[] is blank.
This segment (below) shows correct parsing of the pid cache;
Oct 2 00:08:53 [000033] [00:08:53] PPPD: {pppHandler::StartDaemon} - examining /var/run/ppp-modem0.pid for process id and basic number...
Oct 2 00:08:53 [000033] [00:08:53] PPPD: {pppHandler::StartDaemon} - PID[2289], Basic Intf. Num[ppp0]
Oct 2 00:08:53 [000033] [00:08:53] NET : {PPPIntf::NetUp} - <>
Please add tags to the following commits:
some of these are approximations of when the releases were made based on the commit messages.
As discussed at:
https://bugs.gentoo.org/show_bug.cgi?id=519986
NetworkManager needs to get ppp plugin dir configured at build time with --with-pppd-plugin-dir=$(ppp_version). I have checked various distributions (debian, opensuse, fedora, arch...) and every one has a different workaround for this (some specify only a version, other checks for plugin dir running "ls" to know the one existing at that time (!)...)
Maybe would be interesting to provide a way to check for plugin dir used by built ppp that could allow other software to rely on it for building in proper place
Thanks a lot
Hi,
It seems that 08ef47c introduced a buffer overflow in MSCHAPv2.
chapms2_make_response calls ChapMS2 with an auth_response buffer of:
MS_AUTH_RESPONSE_LENGTH however ChapMS2 expects a buffer of
MS_AUTH_RESPONSE_LENGTH + 1.
Please see the original ticket at https://dev.openwrt.org/ticket/17296 for further details.
Cheers,
Steven
jumpcloud.com, an 'LDAP as a Service' and 'RADIUS as a Service' provider, tells me that they only support PEAP (https://en.wikipedia.org/wiki/Protected_Extensible_Authentication_Protocol) to let me use RADIUS to authenticate VPN users.
Would it be possible to add support for this to pppd?
Thanks.
SYSLOG 10: sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0x0> <magic 0x326c4556>
]
ppp0 output: FF03C02101010018010406400206000000000506326C455607020802
SYSLOG 08: fsm_sdata(LCP): Sent code 1, id 1.
SYSLOG 10: Timeout 2dde10:c57f80 in 3 seconds.
SYSLOG 08: LCP: sending Configure-Request, id 1
ppp0 input: FF03C021010300190206000A00000702080205067377BDA10305C22305
SYSLOG 10: rcvd [LCP ConfReq id=0x3 <asyncmap 0xa0000> <magic 0x7377bda1> <auth chap 05>]
[test----]LCP packet length:25 , total packet len:25
SYSLOG 08: fsm_rconfreq(LCP): Rcvd id 3.
SYSLOG 08: lcp_reqci: rcvd ASYNCMAP
SYSLOG 08: (a0000)
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd PCOMPRESSION
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd ACCOMPRESSION
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd MAGICNUMBER
SYSLOG 08: (7377bda1)
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd AUTHTYPE
SYSLOG 08: (c223)
SYSLOG 08: (NAK)
SYSLOG 08: lcp_reqci: returning CONFNAK.
SYSLOG 10: sent [LCP ConfNak id=0x3 ]
ppp0 output: FF03C021030300080304C023
SYSLOG 08: fsm_sdata(LCP): Sent code 3, id 3.
ppp0 input: FF03C021010500180206000A00000702080205067377BDA10304C023
SYSLOG 10: rcvd [LCP ConfReq id=0x5 <asyncmap 0xa0000> <magic 0x7377bda1> ]
LCP packet length:24 , total packet len:24
SYSLOG 08: fsm_rconfreq(LCP): Rcvd id 5.
SYSLOG 08: lcp_reqci: rcvd ASYNCMAP
SYSLOG 08: (a0000)
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd PCOMPRESSION
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd ACCOMPRESSION
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd MAGICNUMBER
SYSLOG 08: (7377bda1)
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: rcvd AUTHTYPE
SYSLOG 08: (c023)
SYSLOG 08: (ACK)
SYSLOG 08: lcp_reqci: returning CONFACK.
SYSLOG 10: sent [LCP ConfAck id=0x5 <asyncmap 0xa0000> <magic 0x7377bda1> ]
ppp0 output: FF03C021020500180206000A00000702080205067377BDA10304C023
SYSLOG 08: fsm_sdata(LCP): Sent code 2, id 5.
SYSLOG 02: LCP: Retransmit the configure-request
[testtest-----]go->neg_mru(-1) && (go->mru(1600) != DEFMRU(1500))
SYSLOG 10: sent [LCP ConfReq id=0x1 <mru 1600> <asyncmap 0x0> <magic 0x326c4556> ]
ppp0 output: FF03C02101010018010406400206000000000506326C455607020802
SYSLOG 08: fsm_sdata(LCP): Sent code 1, id 1.
SYSLOG 10: Timeout 2dde10:c57f80 in 3 seconds.
SYSLOG 08: LCP: sending Configure-Request, id 1
ppp0 input: FF03C0210301000A0206000A0000
SYSLOG 10: rcvd [LCP ConfNak id=0x1 <asyncmap 0xa0000>]
LCP packet length:10 , total packet len:10
SYSLOG 08: fsm_rconfnakrej(LCP): Rcvd id 1.
SYSLOG 10: Untimeout 2dde10:c57f80.
go->neg_mru(-1) && (go->mru(1600) != DEFMRU(1500))
SYSLOG 10: sent [LCP ConfReq id=0x2 <mru 1600> <asyncmap 0xa0000> <magic 0x326c4556> ]
ppp0 output: FF03C02101020018010406400206000A00000506326C455607020802
SYSLOG 08: fsm_sdata(LCP): Sent code 1, id 2.
SYSLOG 10: Timeout 2dde10:c57f80 in 3 seconds.
SYSLOG 08: LCP: sending Configure-Request, id 2
ppp0 input: FF03C02102020018010406400206000A00000506326C455607020802
SYSLOG 10: rcvd [LCP ConfAck id=0x2 <mru 1600> <asyncmap 0xa0000> <magic 0x326c4556> ]
LCP packet length:24 , total packet len:24
SYSLOG 08: fsm_rconfack(LCP): Rcvd id 2.
SYSLOG 10: Untimeout 2dde10:c57f80.
SYSLOG 10: sent [LCP EchoReq id=0x0 magic=0x326c4556]
ppp0 output: FF03C02109000008326C4556
SYSLOG 08: fsm_sdata(LCP): Sent code 9, id 0.
SYSLOG 10: Timeout 2e1a24:c57f80 in 60 seconds.
SYSLOG 10: sent [PAP AuthReq id=0x1 user="amophis" password="1234"]
ppp0 output: FF03C023010100060000
SYSLOG 08: pap_sauth: Sent id 1.
SYSLOG 10: Timeout 2e1d8c:c57fc0 in 3 seconds.
ppp0 input:FF03C0210A0000087377BDA1
SYSLOG 10: rcvd [LCP EchoRep id=0x0 magic=0x7377bda1]
LCP packet length:8 , total packet len:8
ppp0 input:FF03C0230201000500
SYSLOG 10: rcvd [PAP AuthAck id=0x1 ""]
SYSLOG 08: pap_rauthack: Rcvd id 1.
SYSLOG 08: Remote message:
SYSLOG 10: sent [IPCP ConfReq id=0x1 <compress VJ 07 01> <addr 0.0.0.0> <ms-dns 0.0.0.0>]
ppp0 output: FF038021010100160206002D0701030600000000810600000000
SYSLOG 08: fsm_sdata(IPCP): Sent code 1, id 1.
SYSLOG 10: Timeout 2dde10:c506a0 in 3 seconds.
SYSLOG 08: IPCP: sending Configure-Request, id 1
ppp0: no compressor for [15 3 29], 3
ppp0: no compressor for [1a 4 8], 4
ppp0: no compressor for [18 4 8], 4
ppp0 input: FF03C02105050004
SYSLOG 10: rcvd [LCP TermReq id=0x5]
LCP packet length:4 , total packet len:4
SYSLOG 08: fsm_rtermreq(LCP): Rcvd id 5.
SYSLOG 08: LCP terminated by peer
SYSLOG 10: Untimeout 2e1a24:c57f80.
SYSLOG 10: Untimeout 2dde10:c506a0.
SYSLOG 10: Timeout 2dde10:c57f80 in 3 seconds.
SYSLOG 10: sent [LCP TermAck id=0x5]
ppp0 output: FF03C02106050004
ppp0 input: FF03C02105050004
SYSLOG 10: rcvd [LCP TermReq id=0x5]
Hello,
The patch below comes from fedora & debian, it adds the ipv6cp-accept-remote option, which behaves like its v4 counterpart, ipcp-accept-remote.
Hello,
reported in many places but appearently never got upstreamed:
If the PID exceeds 16 bit, the sprintf statement in rc_mksid
results in a buffer overflow:
https://bugzilla.redhat.com/show_bug.cgi?id=CVE-2015-3310
https://bugs.debian.org/782450
Note the patch in Debian is just a workaround and should be % 65536
- obviously the better solution was to enhance the buffer size.
I'm using pppd with a satellite network and its dial-up servers. I find that sometimes, pppd prints the connection info twice to stdout, and calls /etc/ppp/ip-up
twice. E.g.
Sep 2 06:06:44 (none) local2.notice pppd[17373]: Connect: ppp0 <--> /dev/ttySP0
Sep 2 06:07:02 (none) local2.notice pppd[17373]: CHAP authentication succeeded
Sep 2 06:07:13 (none) local2.notice pppd[17373]: local IP address 192.168.20.81
Sep 2 06:07:13 (none) local2.notice pppd[17373]: remote IP address 192.168.20.254
Sep 2 06:07:13 (none) local2.notice pppd[17373]: primary DNS address 199.2.252.10
Sep 2 06:07:13 (none) local2.notice pppd[17373]: secondary DNS address 204.97.212.10
Sep 2 06:07:16 (none) local2.notice pppd[17373]: Compression disabled by peer.
Sep 2 06:07:18 (none) local2.notice pppd[17373]: local IP address 192.168.20.81
Sep 2 06:07:18 (none) local2.notice pppd[17373]: remote IP address 192.168.20.254
Sep 2 06:07:18 (none) local2.notice pppd[17373]: primary DNS address 199.2.252.10
Sep 2 06:07:18 (none) local2.notice pppd[17373]: secondary DNS address 204.97.212.10
/etc/ppp/ip-up
was called twice, at 06:07:14 and 06:07:18.
Why might pppd do both the printing of address info twice, and calling /etc/ppp/ip-up
twice? Is this considered "normal" or a bug?
I am trying to make a connection between two connected serial ports on my PC(for testing purposes -- I am dunno yet how to work with the pppd, so I am just testing). But by my sorrow something surely gone wrong, so I tried to strace the pppd.This is how I did it: sudo strace pppd -detach 10.5.57.198: /dev/ttyS4 2&> /tmp/pppd.log
. I pasted the output to the pastebin. As you may see there the last call that was executed is the open(). From the open() the pppd never returns, it just hangs up there.
I should mention that the serial ports itself is okay, I tested these with putty.
UPD: sorry I think I ought to show the backtrace as well:
(gdb) bt
#0 0x00007f479f00f4b0 in __open_nocancel () at ../sysdeps/unix/syscall-template.S:81
#1 0x000000000042a2db in connect_tty ()
#2 0x000000000041bb1c in start_link ()
#3 0x000000000040b93b in main ()
pppd version is 2.4.5
UPD2:
I just downloaded the latest version on FTP, compiled it, and tried. The problem there remains as well.(I dunno why, but the formatting here broken a few: the link doesn't shown. So, here it is ftp://ftp.samba.org/pub/ppp/ppp-2.4.6.tar.gz )
I found the default ipv6 route won't be set when configured with "replacedefaultroute" and "+ipv6" options.
I also find there was a Debian bug #477245 on the same issue before, and is said to be forwarded to the formal BTS#2126, but I cannot find it in github's new issue list. So here I create a new report.
There's a script fix on Debian bug #477245, so you can fix this issue by:
a) simply merge that script into ipv6-up.d/ directory, or
b) implement the similar code inside ppp
Looking forward to a solution for basic ipv6 pppoe.
Thank you!
ppp-2.4.7 xl2tpd-1.3.0: dial with a error password
logread:
daemon.err Feb 21 15:43:48 pppd[15495]: Failed to open /dev/pts/1: No such file or directory
code:
pppd/tty.c
518 int connect_tty()
519 {
……
/get sigterm and got_sigterm=SIGTERM/
561 got_sigterm = 0;/got_sigterm be cleared,so SIGTERM lossed/
……
770 if (got_sigterm)
771 asked_to_quit = 1;/got_sigterm == 0, don't quit, and there is not a sleep so busy loop/
772 return -1;
773 }
I have a situation in a mobile device where we do a border-crossing and the connection is terminated and trying to be restarted when the persist flag is off in the configuration.
The thing that happens is that the ppp peer sends a TermReq and the pppd shuts down the connection, sends the TermAck, but then tries to start it up again (running the connect script, etc). This happens when the persist flag is set to off.
I have traced back the problem to what seems to be a missing 'if' condition in the FSM when fsm_lowerdown() is called for LCP when that FSM is in the STOPPED state. In that case the FSM state is unconditionally set to STARTING and the starting callbacks are run, which will cause the connection to be restarted.
My proposed fix for this would be to include an 'if' condition on the persist flag around the restarting code:
void
fsm_lowerdown(f)
fsm *f;
{
switch( f->state ){
...
case STOPPED:
if (persist) {
f->state = STARTING;
if( f->callbacks->starting )
(*f->callbacks->starting)(f);
}
break;
...
Here's the current (Debian Jessie) plog
script (/usr/bin/plog from package ppp):
#!/bin/sh
if [ -s /var/log/ppp.log ]; then
exec tail "$@" /var/log/ppp.log
else
exec tail "$@" /var/log/syslog | grep ' \(pppd\|chat\)\['
fi
Why not "grep" the syslog for pppd, and then "tail" the result? As in:
#!/bin/sh
if [ -s /var/log/ppp.log ]; then
exec tail "$@" /var/log/ppp.log
else
exec grep ' \(pppd\|chat\)\[' /var/log/syslog | tail "$@"
fi
This will show more relevant log messages to the user.
i want to send at command to set the 3g module's network mode, the command is as follow.
AT^PREFMODE=8
but the char ^ is not sent atually, so i want to know how to send the char ^, how to edit the chat script.
nodetach and updetach are helpful, but it is difficult for systemd to know when pppd is up enough to start services that depend on it. Explicit systemd support would make dependencies easier to deal with.
2017-03-10 15:02:34:795 << F9 07 EF 51 7E 80 21 01 02 00 22 03 06 00 00 00 00 81 06 00 00 00 00 82 06 00 00 00 00 83 06 00 00 00 00 84 06 00 00 00 00 19 70 7E 5B F9
C Adress:1 UIH P/F:0 LEN:40
2017-03-10 15:02:34:803 << 7E 80 21 01 02 00 22 03 06 00 00 00 00 81 06 00 00 00 00 82 06 00 00 00 00 83 06 00 00 00 00 84 06 00 00 00 00 19 70 7E
--------------------------PPP帧
2017-03-10 15:02:34:813 << 80 21 01 02 00 22 03 06 00 00 00 00 81 06 00 00 00 00 82 06 00 00 00 00 83 06 00 00 00 00 84 06 00 00 00 00 19 70
协议域:8021 网络控制数据NCP
CODE:1; ID:2; Lenth:34
配置请求(Configure-Request)
IP地址:0.0.0.0;主用DNS:0.0.0.0;其他地址0x82:0.0.0.0;备用DNS:0.0.0.0;其他地址0x84:0.0.0.0
2017-03-10 15:02:35:662 << F9 07 EF 65 7E 7D DF 7D 23 C0 21 7D 21 7D 23 7D 20 7D 34 7D 22 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 7D 29 7D 2F 7D 22 23 7D 27 7D 22 7D 28 7D 22 50 7D DF 7E 78 F9
C Adress:1 UIH P/F:0 LEN:50
2017-03-10 15:02:35:671 << 7E 7D DF 7D 23 C0 21 7D 21 7D 23 7D 20 7D 34 7D 22 7D 26 7D 20 7D 20 7D 20 7D 20 7D 25 7D 26 7D 29 7D 2F 7D 22 23 7D 27 7D 22 7D 28 7D 22 50 7D DF 7E
--------------------------PPP帧
2017-03-10 15:02:35:680 << FF 03 C0 21 01 03 00 14 02 06 00 00 00 00 05 06 09 0F 02 23 07 02 08 02 50 FF
控制域:03
协议域:C021 链路控制数据LCP
CODE:1; ID:3; Lenth:20
配置请求(Configure-Request)
控制字符映射:00000000;魔数:090F0223;协议域压缩;地址和控制域压缩;
If CHAP authentication is required with the peer but this is never completed (either because the server never sends the challenge or because the client doesn't receive the outcome) then the client will wait forever, relying on the server to terminate the connection.
This can easily happen if the CHAP challenge or outcome packet is lost for any reason.
make install-devel does not install mppe.h, which can be included by chap_ms.h.
poff, pon and maybe other scripts print errors to stdout instead of stderr. For example, I see the following in poff:
echo "$0: No pppd is running. None ${DONE}."
But there should be:
echo "$0: No pppd is running. None ${DONE}." >&2
Please, fix all this issues. (And if you want I can myself prepare such patch.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.