Re: [RFC] ADSL: Experimental PPPoE support

2011-12-14 Thread Dan Williams
On Tue, 2011-12-13 at 07:57 +0200, Pantelis Koukousoulas wrote:
 On Fri, Dec 9, 2011 at 8:05 AM, Dan Williams d...@redhat.com wrote:
  On Tue, 2011-05-17 at 21:38 +0300, Pantelis Koukousoulas wrote:
  This is a first cut at experimental PPPoE support for ADSL devices.
  There are several shortcuts and the code is ugly, but it works so
  it can be used as a strawman to improve upon.
 
  Happily waiting for comments / testing / suggestions :)
 
  I rebased the 'adsl' branch to git master and wrote some code to talk
  the ioctls directly instead of using br2684ctl.  As Dave Woodhouse
  pointed out, br2684ctl isn't that complicated so we might as well just
  talk to the kernel.  However, I don't have an ADSL connection to test
  with (I only have a modem for basic hardware detection support) so if
  anyone can test out the code on the 'adsl' branch that would be great.
  Make sure to run NM with --log-level=debug or to set level=debug in
  the [logging] section of NetworkManager.conf so we can more easily debug
  any failures.
 
 Thanks :)
 
 I will try to test it today and also provide ubuntu packages for other people
 to test more easily as well.

I fixed a few other bugs yesterday, so try 'adsl' git from Tuesday or
it's guaranteed to fail :)

Dan


___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [RFC] ADSL: Experimental PPPoE support

2011-12-12 Thread Pantelis Koukousoulas
On Fri, Dec 9, 2011 at 8:05 AM, Dan Williams d...@redhat.com wrote:
 On Tue, 2011-05-17 at 21:38 +0300, Pantelis Koukousoulas wrote:
 This is a first cut at experimental PPPoE support for ADSL devices.
 There are several shortcuts and the code is ugly, but it works so
 it can be used as a strawman to improve upon.

 Happily waiting for comments / testing / suggestions :)

 I rebased the 'adsl' branch to git master and wrote some code to talk
 the ioctls directly instead of using br2684ctl.  As Dave Woodhouse
 pointed out, br2684ctl isn't that complicated so we might as well just
 talk to the kernel.  However, I don't have an ADSL connection to test
 with (I only have a modem for basic hardware detection support) so if
 anyone can test out the code on the 'adsl' branch that would be great.
 Make sure to run NM with --log-level=debug or to set level=debug in
 the [logging] section of NetworkManager.conf so we can more easily debug
 any failures.

Thanks :)

I will try to test it today and also provide ubuntu packages for other people
to test more easily as well.

Greetings,
Pantelis
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [RFC] ADSL: Experimental PPPoE support

2011-12-08 Thread Dan Williams
On Tue, 2011-05-17 at 21:38 +0300, Pantelis Koukousoulas wrote:
 This is a first cut at experimental PPPoE support for ADSL devices.
 There are several shortcuts and the code is ugly, but it works so
 it can be used as a strawman to improve upon.
 
 Happily waiting for comments / testing / suggestions :)

I rebased the 'adsl' branch to git master and wrote some code to talk
the ioctls directly instead of using br2684ctl.  As Dave Woodhouse
pointed out, br2684ctl isn't that complicated so we might as well just
talk to the kernel.  However, I don't have an ADSL connection to test
with (I only have a modem for basic hardware detection support) so if
anyone can test out the code on the 'adsl' branch that would be great.
Make sure to run NM with --log-level=debug or to set level=debug in
the [logging] section of NetworkManager.conf so we can more easily debug
any failures.

Any testing help appreciated; the more testing we get the earlier we can
merge this to master and get ADSL support working for everyone.

Thanks!
Dan

 With this code and a system keyfile connection like the following:
 
 [connection]
 id=OTENETPPPOE
 uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc2e
 type=adsl
 timestamp=1304621332
 
 [adsl]
 username=myusern...@myisp.com
 password=mypassword
 vpi=8
 vci=35
 encapsulation=llc
 protocol=pppoe
 
 [ipv6]
 method=ignore
 
 [ipv4]
 method=auto
 
 I can connect successfully via pppoe, as evidenced by the following
 extract from the logs:
 
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) scheduled...
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) started...
 NetworkManager[1495]: info starting RFC 2684 Bridge
 NetworkManager[1495]: debug [1305654571.49055] [nm-br2684-manager.c:403] 
 nm_br2684_manager_start(): command line: /usr/sbin/br2684ctl -c 0 -e 0 -p 1 
 -a 8.35
 NetworkManager[1495]: info br2684ctl started with pid 1721
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) complete.
 NetworkManager[1495]: debug [1305654571.62289] [nm-udev-manager.c:622] 
 handle_uevent(): UDEV event: action 'add' subsys 'net' device 'nas0'
 NetworkManager[1495]: warn /sys/devices/virtual/net/nas0: couldn't 
 determine device driver; ignoring...
 NetworkManager[1495]: debug [1305654571.63491] [nm-netlink-monitor.c:117] 
 link_msg_handler(): netlink link message: iface idx 62 flags 0x1002
 br2684ctl[1721]: Interface nas0 created sucessfully
 br2684ctl[1721]: Communicating over ATM 0.8.35, encapsulation: LLC
 br2684ctl[1721]: Interface configured
 br2684ctl[1721]: RFC 1483/2684 bridge daemon started
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) scheduled...
 NetworkManager[1495]: debug [1305654576.48874] [nm-netlink-monitor.c:117] 
 link_msg_handler(): netlink link message: iface idx 62 flags 0x11043
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) starting...
 NetworkManager[1495]: info (ueagle-atm0): device state change: prepare - 
 config (reason 'none') [40 50 0]
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) successful.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) scheduled.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) complete.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) started...
 NetworkManager[1495]: info (ueagle-atm0): device state change: config - 
 ip-config (reason 'none') [50 70 0]
 NetworkManager[1495]: info starting PPP connection
 NetworkManager[1495]: debug [1305654576.59215] [nm-ppp-manager.c:1056] 
 nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock 
 nodefaultroute debug user myu...@myisp.com plugin rp-pppoe.so nas0 
 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam 
 /org/freedesktop/NetworkManager/PPP/2 plugin 
 /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
 NetworkManager[1495]: info pppd started with pid 1733
 NetworkManager[1495]: debug [1305654576.62016] [NetworkManagerUtils.c:848] 
 nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading 
 /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file 
 '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) complete.
 Plugin rp-pppoe.so loaded.
 Plugin /opt/nmadsl/lib/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'
 Send PPPOE Discovery V1T1 PADI session 0x0 length 12
  dst ff:ff:ff:ff:ff:ff  src 0:60:4c:8c:5b:d6
  [service-name] [host-uniq  c5 06 00 00]
 Recv PPPOE Discovery V1T1 PADO session 0x0 length 50
  dst 0:60:4c:8c:5b:d6  src 0:90:1a:41:65:24
  [AC-name bras-ari1-1440] [host-uniq  c5 06 

Re: [RFC] ADSL: Experimental PPPoE support

2011-05-26 Thread Dan Williams
On Tue, 2011-05-17 at 21:38 +0300, Pantelis Koukousoulas wrote:
 This is a first cut at experimental PPPoE support for ADSL devices.
 There are several shortcuts and the code is ugly, but it works so
 it can be used as a strawman to improve upon.
 
 Happily waiting for comments / testing / suggestions :)
 
 With this code and a system keyfile connection like the following:

Pushed this to the 'adsl' branch too, thanks!

Dan

 [connection]
 id=OTENETPPPOE
 uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc2e
 type=adsl
 timestamp=1304621332
 
 [adsl]
 username=myusern...@myisp.com
 password=mypassword
 vpi=8
 vci=35
 encapsulation=llc
 protocol=pppoe
 
 [ipv6]
 method=ignore
 
 [ipv4]
 method=auto
 
 I can connect successfully via pppoe, as evidenced by the following
 extract from the logs:
 
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) scheduled...
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) started...
 NetworkManager[1495]: info starting RFC 2684 Bridge
 NetworkManager[1495]: debug [1305654571.49055] [nm-br2684-manager.c:403] 
 nm_br2684_manager_start(): command line: /usr/sbin/br2684ctl -c 0 -e 0 -p 1 
 -a 8.35
 NetworkManager[1495]: info br2684ctl started with pid 1721
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
 Prepare) complete.
 NetworkManager[1495]: debug [1305654571.62289] [nm-udev-manager.c:622] 
 handle_uevent(): UDEV event: action 'add' subsys 'net' device 'nas0'
 NetworkManager[1495]: warn /sys/devices/virtual/net/nas0: couldn't 
 determine device driver; ignoring...
 NetworkManager[1495]: debug [1305654571.63491] [nm-netlink-monitor.c:117] 
 link_msg_handler(): netlink link message: iface idx 62 flags 0x1002
 br2684ctl[1721]: Interface nas0 created sucessfully
 br2684ctl[1721]: Communicating over ATM 0.8.35, encapsulation: LLC
 br2684ctl[1721]: Interface configured
 br2684ctl[1721]: RFC 1483/2684 bridge daemon started
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) scheduled...
 NetworkManager[1495]: debug [1305654576.48874] [nm-netlink-monitor.c:117] 
 link_msg_handler(): netlink link message: iface idx 62 flags 0x11043
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) starting...
 NetworkManager[1495]: info (ueagle-atm0): device state change: prepare - 
 config (reason 'none') [40 50 0]
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) successful.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) scheduled.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
 Configure) complete.
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) started...
 NetworkManager[1495]: info (ueagle-atm0): device state change: config - 
 ip-config (reason 'none') [50 70 0]
 NetworkManager[1495]: info starting PPP connection
 NetworkManager[1495]: debug [1305654576.59215] [nm-ppp-manager.c:1056] 
 nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock 
 nodefaultroute debug user myu...@myisp.com plugin rp-pppoe.so nas0 
 noipdefault noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam 
 /org/freedesktop/NetworkManager/PPP/2 plugin 
 /opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
 NetworkManager[1495]: info pppd started with pid 1733
 NetworkManager[1495]: debug [1305654576.62016] [NetworkManagerUtils.c:848] 
 nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading 
 /proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file 
 '/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
 NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
 Configure Start) complete.
 Plugin rp-pppoe.so loaded.
 Plugin /opt/nmadsl/lib/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'
 Send PPPOE Discovery V1T1 PADI session 0x0 length 12
  dst ff:ff:ff:ff:ff:ff  src 0:60:4c:8c:5b:d6
  [service-name] [host-uniq  c5 06 00 00]
 Recv PPPOE Discovery V1T1 PADO session 0x0 length 50
  dst 0:60:4c:8c:5b:d6  src 0:90:1a:41:65:24
  [AC-name bras-ari1-1440] [host-uniq  c5 06 00 00] [service-name] [AC-cookie  
 cc d1 10 3e 4b c8 e9 de b3 c9 73 c7 1d b4 4d 30]
 Send PPPOE Discovery V1T1 PADR session 0x0 length 32
  dst 0:90:1a:41:65:24  src 0:60:4c:8c:5b:d6
  [service-name] [host-uniq  c5 06 00 00] [AC-cookie  cc d1 10 3e 4b c8 e9 de 
 b3 c9 73 c7 1d b4 4d 30]
 Recv PPPOE Discovery V1T1 PADS session 0x130d length 50
  dst 0:60:4c:8c:5b:d6  src 0:90:1a:41:65:24
  [service-name] [host-uniq  c5 06 00 00] [AC-name bras-ari1-1440] [AC-cookie  
 cc d1 10 3e 4b c8 e9 de b3 c9 73 c7 1d b4 4d 30]
 PADS: Service-Name: ''
 PPP session is 4877
 Connected to 00:90:1a:41:65:24 via interface nas0
 using channel 32
 Using interface ppp0
 Connect: ppp0 -- 

[RFC] ADSL: Experimental PPPoE support

2011-05-17 Thread Pantelis Koukousoulas
This is a first cut at experimental PPPoE support for ADSL devices.
There are several shortcuts and the code is ugly, but it works so
it can be used as a strawman to improve upon.

Happily waiting for comments / testing / suggestions :)

With this code and a system keyfile connection like the following:

[connection]
id=OTENETPPPOE
uuid=34d04e69-fdd9-4231-af2c-25ed1f34dc2e
type=adsl
timestamp=1304621332

[adsl]
username=myusern...@myisp.com
password=mypassword
vpi=8
vci=35
encapsulation=llc
protocol=pppoe

[ipv6]
method=ignore

[ipv4]
method=auto

I can connect successfully via pppoe, as evidenced by the following
extract from the logs:

NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
Prepare) scheduled...
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
Prepare) started...
NetworkManager[1495]: info starting RFC 2684 Bridge
NetworkManager[1495]: debug [1305654571.49055] [nm-br2684-manager.c:403] 
nm_br2684_manager_start(): command line: /usr/sbin/br2684ctl -c 0 -e 0 -p 1 -a 
8.35
NetworkManager[1495]: info br2684ctl started with pid 1721
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 1 of 5 (Device 
Prepare) complete.
NetworkManager[1495]: debug [1305654571.62289] [nm-udev-manager.c:622] 
handle_uevent(): UDEV event: action 'add' subsys 'net' device 'nas0'
NetworkManager[1495]: warn /sys/devices/virtual/net/nas0: couldn't determine 
device driver; ignoring...
NetworkManager[1495]: debug [1305654571.63491] [nm-netlink-monitor.c:117] 
link_msg_handler(): netlink link message: iface idx 62 flags 0x1002
br2684ctl[1721]: Interface nas0 created sucessfully
br2684ctl[1721]: Communicating over ATM 0.8.35, encapsulation: LLC
br2684ctl[1721]: Interface configured
br2684ctl[1721]: RFC 1483/2684 bridge daemon started
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
Configure) scheduled...
NetworkManager[1495]: debug [1305654576.48874] [nm-netlink-monitor.c:117] 
link_msg_handler(): netlink link message: iface idx 62 flags 0x11043
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
Configure) starting...
NetworkManager[1495]: info (ueagle-atm0): device state change: prepare - 
config (reason 'none') [40 50 0]
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
Configure) successful.
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
Configure Start) scheduled.
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 2 of 5 (Device 
Configure) complete.
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
Configure Start) started...
NetworkManager[1495]: info (ueagle-atm0): device state change: config - 
ip-config (reason 'none') [50 70 0]
NetworkManager[1495]: info starting PPP connection
NetworkManager[1495]: debug [1305654576.59215] [nm-ppp-manager.c:1056] 
nm_ppp_manager_start(): command line: /usr/sbin/pppd nodetach lock 
nodefaultroute debug user myu...@myisp.com plugin rp-pppoe.so nas0 noipdefault 
noauth usepeerdns lcp-echo-failure 0 lcp-echo-interval 0 ipparam 
/org/freedesktop/NetworkManager/PPP/2 plugin 
/opt/nmadsl/lib/pppd/2.4.5/nm-pppd-plugin.so
NetworkManager[1495]: info pppd started with pid 1733
NetworkManager[1495]: debug [1305654576.62016] [NetworkManagerUtils.c:848] 
nm_utils_get_proc_sys_net_value(): (ueagle-atm0): error reading 
/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra: (4) Failed to open file 
'/proc/sys/net/ipv6/conf/ueagle-atm0/accept_ra': No such file or directory
NetworkManager[1495]: info Activation (ueagle-atm0) Stage 3 of 5 (IP 
Configure Start) complete.
Plugin rp-pppoe.so loaded.
Plugin /opt/nmadsl/lib/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'
Send PPPOE Discovery V1T1 PADI session 0x0 length 12
 dst ff:ff:ff:ff:ff:ff  src 0:60:4c:8c:5b:d6
 [service-name] [host-uniq  c5 06 00 00]
Recv PPPOE Discovery V1T1 PADO session 0x0 length 50
 dst 0:60:4c:8c:5b:d6  src 0:90:1a:41:65:24
 [AC-name bras-ari1-1440] [host-uniq  c5 06 00 00] [service-name] [AC-cookie  
cc d1 10 3e 4b c8 e9 de b3 c9 73 c7 1d b4 4d 30]
Send PPPOE Discovery V1T1 PADR session 0x0 length 32
 dst 0:90:1a:41:65:24  src 0:60:4c:8c:5b:d6
 [service-name] [host-uniq  c5 06 00 00] [AC-cookie  cc d1 10 3e 4b c8 e9 de b3 
c9 73 c7 1d b4 4d 30]
Recv PPPOE Discovery V1T1 PADS session 0x130d length 50
 dst 0:60:4c:8c:5b:d6  src 0:90:1a:41:65:24
 [service-name] [host-uniq  c5 06 00 00] [AC-name bras-ari1-1440] [AC-cookie  
cc d1 10 3e 4b c8 e9 de b3 c9 73 c7 1d b4 4d 30]
PADS: Service-Name: ''
PPP session is 4877
Connected to 00:90:1a:41:65:24 via interface nas0
using channel 32
Using interface ppp0
Connect: ppp0 -- nas0
** Message: nm-ppp-plugin: (nm_phasechange): status 5 / phase 'establish'
sent [LCP ConfReq id=0x1 mru 1492 magic 0x2de132c2]
NetworkManager[1495]: debug [1305654576.314811] [nm-netlink-monitor.c:117]