Bug 1119055 - sysconfig.txt mentions option PPPOPTIONS, but /sbin/pppoe-connect ignores it
Summary: sysconfig.txt mentions option PPPOPTIONS, but /sbin/pppoe-connect ignores it
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.7
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: qe-baseos-daemons
Depends On:
TreeView+ depends on / blocked
Reported: 2014-07-13 16:02 UTC by Christopher Hirschmann
Modified: 2016-11-25 13:05 UTC (History)
4 users (show)

Fixed In Version: initscripts-9.03.50-1.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-05-11 01:05:25 UTC

Attachments (Terms of Use)
Proposed patch (1.21 KB, patch)
2015-01-15 17:03 UTC, Michal Sekletar
no flags Details | Diff

System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0951 normal SHIPPED_LIVE initscripts bug fix and enhancement update 2016-05-10 22:56:20 UTC

Description Christopher Hirschmann 2014-07-13 16:02:22 UTC
Description of problem:

In the "PPP-specific items" section of sysconfig.txt the option PPPOPTIONS is mentioned and explained, however using it to pass options to pppd has no effect. The script pppoe-connect from package rp-pppoe does not use the option PPPOPTIONS, it looks like PPPOPTIONS has been replaced with two new options which aren't mentioned in sysconfig.txt: PPPD_EXTRA and PPPOE_EXTRA. Using these two new options works fine, so this is just an documentation issue und should be trivial to fix.

Version-Release number of selected component (if applicable):

I've been observing this since RHEL 6.5, checked in initscripts-9.03.40-2.el6.src.rpm and rp-pppoe-3.10-11.el6.src.rpm -- the documentation bug is still in these packages.

How reproducible:


Steps to Reproduce:

1. Configure a PPP interface and try to pass options to pppd like "unit 0" or "ipv6 ," or something like that. (Put something like PPPOPTIONS="unit 0" into your ifcfg-ppp0.)
2. Bring the interface up. (ifup ppp0)
3. Check process list. (ps afux|grep ppp) You'll see that the additional option has not been passed to pppd.
4. Repeat using PPPD_EXTRA, it'll work.

Actual results:

Options from PPPOPTIONS are not passed to pppd.

Expected results:

Options should be passed to pppd. Since it works with PPPD_EXTRA: sysconfig.txt should not mention PPPOPTIONS, but PPPD_EXTRA and PPPOE_EXTRA.

Comment 2 Lukáš Nykrýn 2015-01-05 13:42:20 UTC
Huh, this is weird, in ifup-ppp PPPOPTIONS is used 

$exec pppd $opts ${MODEMPORT} ${LINESPEED} \
    ipparam ${DEVNAME} linkname ${DEVNAME} call ${DEVNAME}\
    noauth \
    ${PPPOPTIONS} ||

But there is no PPPD_EXTRA.

Adding PPP maintainer to cc

Comment 3 Michal Sekletar 2015-01-15 16:59:35 UTC
As already pointed out by Lukas ifup-ppp *does not* use PPPD_EXTRA and PPPOE_EXTRA. It uses only PPPOPTIONS when spawning pppd daemon.

However in case of interfaces with TYPE=xDSL it doesn't spawn pppd itself but rather calls script adsl-start from rp-pppoe package. Problem is that scripts from rp-pppoe package don't use value of PPPOPTIONS. Instead they use variable PPPD_EXTRA, which is undocumented. I think this should be fixed in rp-pppoe.

Comment 4 Michal Sekletar 2015-01-15 17:03:24 UTC
Created attachment 980573 [details]
Proposed patch

Comment 5 Ngo Than 2015-01-20 12:11:11 UTC
rp-pppoe doesn't support PPPOPTIONS. It's no problem to add it from my side.

Comment 6 Christopher Hirschmann 2015-01-20 16:17:05 UTC
If I might add my perspective as a user:

I came across this when I was trying to set up a second ADSL2+ line. The old line supported only ipv4, the new one supported ipv4 and ipv6. The scripts bringing up the ppp connection didn't pick up on the ipv6 capability (don't know if that is even possible and don't care, that's not the issue here) so I looked into the manpages and found out how to tell the scripts that this line also supports ipv6 (simply add to PPPOPTIONS="ipv6" to the ifcfg-script for that interface). It didn't work however and led me to the next problem: the network scripts used to change the ppp interface IDs around almost everytime they ran, ppp0 and ppp1 weren't consistently assigned to the same DSL line. I looked into that and found out that I had to add PPPOPTIONS with "unit 0" and "unit 1 ipv6" to /etc/sysconfig/network-scripts/ifcfg-ppp0|1. This then led to the problem that PPPOPTIONS (which is mentioned in the manpages) didn't have any effect whatsoever. I could see that in the process list:

/bin/bash /sbin/pppoe-connect /etc/sysconfig/network-scripts/ifcfg-ppp0
  \_ /usr/sbin/pppd pty /usr/sbin/pppoe -p /var/run/pppoe-adsl0.pid.pppoe -I eth4 -T 80 -U  -m 1412    ipparam ppp0 linkname ppp0 noipdefault noauth default-asyncmap defaultroute hide-password nodetach mtu 1492 mru 1492 noaccomp nodeflate nopcomp novj novjccomp user [censored] lcp-echo-interval 20 lcp-echo-failure 3

So I looked into /sbin/pppoe-connect, which does not use $PPPOTIONS at all. Instead it contains this:

# Standard PPP options we always use
PPP_STD_OPTIONS="$IPPARAM $LINKNAME $PLUGIN_OPTS noipdefault noauth default-asyncmap $DEFAULTROUTE hide-password nodetach $PEERDNS mtu $MTU mru $MRU noaccomp nodeflate nopcomp novj novjccomp user $USER lcp-echo-interval $LCP_INTERVAL lcp-echo-failure $LCP_FAILURE $PPPD_EXTRA"

# PPPoE invocation

I then tried to use PPPD_EXTRA instead of PPPOPTIONS in the ifcfg-scripts and it worked instantly:

/bin/bash /sbin/pppoe-connect /etc/sysconfig/network-scripts/ifcfg-ppp0
  \_ /usr/sbin/pppd pty /usr/sbin/pppoe -p /var/run/pppoe-adsl0.pid.pppoe -I eth4 -T 80 -U  -m 1412    ipparam ppp0 linkname ppp0 noipdefault noauth default-asyncmap defaultroute hide-password nodetach mtu 1492 mru 1492 noaccomp nodeflate nopcomp novj novjccomp user [censored] lcp-echo-interval 20 lcp-echo-failure 3 unit 0

/bin/bash /sbin/pppoe-connect /etc/sysconfig/network-scripts/ifcfg-ppp1
  \_ /usr/sbin/pppd pty /usr/sbin/pppoe -p /var/run/pppoe-adsl1.pid.pppoe -I eth5 -T 80 -U  -m 1412    ipparam ppp1 linkname ppp1 noipdefault noauth default-asyncmap hide-password nodetach mtu 1492 mru 1492 noaccomp nodeflate nopcomp novj novjccomp user [censored] lcp-echo-interval 20 lcp-echo-failure 3 unit 1 ipv6

I thought there might be a reason why PPPOPTIONS, PPPD_EXTRA and PPPOE_EXTRA exist and are seperate variables, so I just wanted to report that PPPD_EXTRA and PPPOE_EXTRA are missing from the documentation. I thought this would be a very easy bug to fix, since it's just a little bit of information missing in the docs. Instead it took half a year until this report was acted upon and now you're debating wether to change the variable names in the scripts -- please don't do that, because then the next update would break every setup that correctly uses PPPD_EXTRA and/or PPPOE_EXTRA (I don't assume I'm the only one who stumbled across them missing in the documentation).

Please don't break existing setups in updates when it can be avoided. It's not user friendly. From my perspective, this is just a documentation issue.

Comment 7 Michal Sekletar 2015-01-21 17:23:21 UTC
Proposed patch doesn't replace PPPD_EXTRA with PPPOPTIONS. It adds options passed in PPPOPTIONS variable to pppd command line (in addition to options passed in PPPD_EXTRA) when spawned from pppoe-connect script. Old setups should works exactly the same after the update.

Comment 11 Leos Pol 2016-03-29 18:48:55 UTC
$ grep EXTRA sysconfig.txt # from initscripts-9.03.51-1.el6.src.rpm
    PPPOE_EXTRA = any extra arguments to pass to pppoe 
    PPPD_EXTRA =  any extra arguments to pass to pppd

Comment 13 errata-xmlrpc 2016-05-11 01:05:25 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.