Bug 1002738 - Kernel mode pppoe fails to connect to the correct access concentrator specified by the rp_pppoe_sevice parameter in a multi-ac environment
Summary: Kernel mode pppoe fails to connect to the correct access concentrator specifi...
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: ppp
Version: 22
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: ---
Assignee: Michal Sekletar
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-29 20:30 UTC by R. K. Rajeev
Modified: 2016-07-19 19:26 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 19:26:55 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description R. K. Rajeev 2013-08-29 20:30:37 UTC
Description of problem:

This bug is observed in environments where PPPoE is required to connect to a specific Access Concentrator from among many that are available on the The rp-pppoe.so pppd plugin provides the rp_pppoe_service and the rp_pppoe_ac parameters to configure this behaviour, corresponding to the -S and -C options to the user mode pppoe command. The issue is that even when these parameters are configured, the PPPoE Session gets established with the first AC that replies with a PADO packet, even if the servicename/ACname do not match with what is provided on the pppd command line. This results in it being impossible to configure a proper pppoe connection from NetworkManager as the service name field in nm-connection-editor is useless to select the right AC/Service.

However, when using the pppoe-mac option on the pppd command line hardcoding the AC's mac address, the driver correctly ignres PADO packets from all other AC's and properly establishes a session with the correct AC.


Version-Release number of selected component (if applicable):
Tested with the following versions of affected packages
ppp-2.4.5-29.fc19.x86_64
rp-pppoe-3.11-2.fc19.x86_64
NetworkManager-0.9.8.2-2.fc19.x86_64

How reproducible:
Since i have 5 AC's on my network, and the one i need isnt the fastest, the bug is 100% reproducible at my end. For someone with a DSL modem with just 1 AC, it would never occur.

Steps to Reproduce:
1. Configure a new dsl pppoe connection in nm-connection editor. Provide a service name in the DSL tab.
2. Attempt to activate the connection. Watch the /var/log/messages output to verify which AC is being logged in to.

Actual results:

Watch connection fail due to connection to wrong AC, leading to a ppp auth failure. 

Expected results:

Interface connects to the right AC that provides the servicename configured, and then ppp interface comes .

Additional info:

Testing Step 1 : Determine list of AC's on network

[root@peacock ~]# pppoe -A -I p135p1
Access-Concentrator: sonali1
       Service-Name: sonali1
Got a cookie: 0a ef 51 31 c3 6b 2e 80 b3 31 59 05 26 ed af fb 94 0c 00 00
AC-Ethernet-Address: 14:d6:4d:1f:ed:69
--------------------------------------------------
Access-Concentrator: HomeNet
       Service-Name: HomeNet
AC-Ethernet-Address: 00:25:90:0a:e6:a1
--------------------------------------------------
Access-Concentrator: FiveNet
       Service-Name: fivenetsonali
AC-Ethernet-Address: 00:1e:67:42:9c:25
--------------------------------------------------
Access-Concentrator: hns
       Service-Name: hnssonali
Got a cookie: 10 be 24 34 7d 72 fd 9b da 72 61 e0 2e 8f c6 9b 27 09 00 00
AC-Ethernet-Address: 00:15:17:50:a7:79
--------------------------------------------------
Access-Concentrator: sonali
       Service-Name: sonali
Got a cookie: d6 c4 e7 bc 4e 15 0e f0 23 ee 8c bd e1 3d ff 69 2e 0e 00 00
AC-Ethernet-Address: 00:15:17:7c:d0:ab
--------------------------------------------------

Testing Step 2 : Start PPP Connection (I have captured the pppd command line from a ps ax run during a failed NetworkManager connection attempt, so the command is exactly what NM Runs)

[root@peacock ~]# /usr/sbin/pppd nodetach lock nodefaultroute user rajeevrk plugin rp-pppoe.so nic-p135p1 rp_pppoe_ac FiveNet rp_pppoe_service fivenetsonali noauth nodeflate usepeerdns mru 1492 mtu 1492 lcp-echo-failure 5 lcp-echo-interval 30 ipparam /org/freedesktop/NetworkManager/PPP/9 plugin /usr/lib64/pppd/2.4.5/nm-pppd-plugin.so

Plugin rp-pppoe.so loaded.
RP-PPPoE plugin version 3.8p compiled against pppd 2.4.5
Plugin /usr/lib64/pppd/2.4.5/nm-pppd-plugin.so loaded.
** Message: nm-ppp-plugin: (plugin_init): initializing
** Message: nm-ppp-plugin: (nm_phasechange): status 3 / phase 'serial connection'
PPP session is 134
Connected to 14:d6:4d:1f:ed:69 via interface p135p1
Using interface ppp0
Connect: ppp0 <--> p135p1
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
** Message: nm-ppp-plugin: (nm_phasechange): status 6 / phase 'authenticate'
** Message: nm-ppp-plugin: (get_credentials): passwd-hook, requesting credentials...

** (process:3440): WARNING **: nm-ppp-plugin: (get_credentials): could not get secrets: (19) Method "NeedSecrets" with signature "" on interface "org.freedesktop.NetworkManager.PPP" doesn't exist

Unable to obtain CHAP password for rajeevrk on BBPaceSonali2 from plugin
No CHAP secret found for authenticating us to BBPaceSonali2
CHAP authentication failed
CHAP authentication failed
** Message: nm-ppp-plugin: (nm_phasechange): status 10 / phase 'terminate'
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
** Message: nm-ppp-plugin: (nm_phasechange): status 11 / phase 'disconnect'
Connection terminated.
** Message: nm-ppp-plugin: (nm_phasechange): status 1 / phase 'dead'
** Message: nm-ppp-plugin: (nm_exit_notify): cleaning up
[root@peacock ~]# 

Note the connection to the 14:d6:4d:1f:ed:69 Access Concentrator(sonali1) which does not match the rp_pppoe_ac parameter. Also note that the selected Access Concentrator does not provide the requested service name(fivenetsonali) as per the rp_pppoe_service option.

Comment 1 maclean 2014-07-18 05:33:33 UTC
I've also seen this bug, where the rp_pppoe_service parameter is not seen by pppd when using the plugin rp-pppoe.so.

A fix is to specify the interface name last in the PLUGIN_OPTS within pppoe-connect. 

pppoe-connect already does that in the case of the pppoatm.so plugin, with a comment: "# Interface name MUST BE LAST!!".

When pppd is parsing options in the runstring, and encounters the interface option for the plugin ("nic-xxx") it calls PPPoEDevnameHook(), and if the interface exists, calls PPPOEInitDevice(). PPPOEInitDevice checks for the existence of the acName and pppd_pppoe_service options, but at that time they will be NULL since they haven't yet been parsed from the runstring.

Here'a a patch to pppoe-connect which should fix the problem.

--- pppoe-connect.orig  2014-07-17 23:19:18.393983364 -0600
+++ pppoe-connect       2014-07-17 23:20:38.370638631 -0600
@@ -261,10 +261,12 @@
 
 # If we're using kernel-mode PPPoE on Linux...
 if test "`basename \"$LINUX_PLUGIN\"`" = "rp-pppoe.so" ; then
-    PLUGIN_OPTS="plugin $LINUX_PLUGIN nic-$ETH"
+    # Interface name MUST BE LAST!!
+    PLUGIN_OPTS="plugin $LINUX_PLUGIN"
     if test -n "$SERVICENAME" ; then
        PLUGIN_OPTS="$PLUGIN_OPTS rp_pppoe_service $SERVICENAME"
     fi
+    PLUGIN_OPTS="$PLUGIN_OPTS nic-$ETH"
     modprobe pppoe > /dev/null 2>&1
 fi
 # If we're using kernel-mode PPPoATM on Linux...

Comment 2 Fedora End Of Life 2015-01-09 19:38:52 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 3 Jaroslav Reznik 2015-03-03 15:01:45 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 4 Fedora End Of Life 2016-07-19 19:26:55 UTC
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.


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