Re: newbie question about NAT and bridging.

2008-09-10 Thread Ben Gamari
Anyone should feel free to correct me if I'm wrong about any of the
following.

David Moffatt wrote:
 Is there a good FAQ?  I need to find out about how to make bridging
 and/or NAT work with NM.

 Specifically I want to find out

 1) Is there an easy way to figure out what the current interface is?
   
The dbus interface allows you to query which interfaces are active.
 2) Are there any scripts run when an interface is brought up or down
 that I could use to change my NAT routing?
   
NetworkManagerDispatcher calls each of the scripts in
/etc/NetworkManager/dispatcher.d/ directory whenever an interface goes
up or down. I believe these scripts are called with the name of the
changing interface as an argument.
 3) Does anyone know why the interface goes to lala land when it is
 controlled by NM and you attach and remove a software bridge from it?
   
What in particular happens?
 4) Are there any other hidden gotcha with NAT and NM?


 Thanks for your time,

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

   

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


static routes

2008-09-10 Thread Trey Nolen
The new network manager is improved over .6 in that it will keep my
static routes after I connect/disconnect from a VPN.  However, it still
will not keep those routes after a reboot. Is there any way to make
these routes persistent using NM?


Trey Nolen


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


Issue with networkmanager-applet

2008-09-10 Thread Roberth Sjonøy
Hello, I just compiled and installed networkmanager from svn. When I
try to launch networkmanager-applet, I get this output:

** (nm-applet:4222): WARNING **: WARN
applet_dbus_manager_start_service(): Could not acquire the
NetworkManagerUserSettings service.
  Message: 'Connection :1.12 is not allowed to own the service
org.freedesktop.NetworkManagerUserSettings due to security policies
in the configuration file'


(nm-applet:4222): GLib-GObject-CRITICAL **: g_object_unref: assertion
`G_IS_OBJECT (object)' failed

What am I doing wrong?
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Static and dynamic wired interface

2008-09-10 Thread Robert Smits
On September 10, 2008 06:23:12 am Dan Williams wrote:
 On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote:
  Hi,
 
  Is NM capable of handling the following scenario?
  A laptop, when located at office, has a static address. Once outside,
  DHCP is used to get an address.

 NM 0.7 is, but since you're mixing the two there will be some manual
 operation on your side since there's not a good generic way to
 autodetect what network you're on when you plug in the cable.

 You'll create two wired connections in the connection editor.  One is a
 DHCP connection with 'autoconnect=true', and the second is the static
 connection with 'autoconnect=false'.  Manual intervention will be
 required when you want to use the static connection at the office.

 What should happen is this:

 1) When you're outside the office, the DHCP connection will
 automatically be used because it's 'autoconnect=true'.  If there isn't a
 DHCP server present, NM will fail the connection and wait for you to do
 something, or for a link change event.

 2) At the office, NM would try DHCP first and then fail the connection
 after the DHCP timeout because of course there's no DHCP server.  At any
 point here you then choose the static connection from the applet menu,
 and NM will activate the static connection at your command.

 People have tossed around ideas like ARPing a known gateway's IP address
 and matching the ARP response to a known MAC address and then activating
 that connection, but that's pretty fragile and trivial to maliciously
 spoof.

 Dan

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

This way of doing things seems like a kluge. Why can't network-manager just 
work with scpm which already does all of this, including nfs networks?

-- 
Robert Smits CEP525G

Nanaimo, Duncan  District Labour Council
Box 822 Nanaimo, V9R 5N2 Ph 250-753-0201
Fax 250-753-2954 Email [EMAIL PROTECTED]
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: static routes

2008-09-10 Thread Dan Williams
On Wed, 2008-09-10 at 09:52 -0500, Trey Nolen wrote:
 The new network manager is improved over .6 in that it will keep my
 static routes after I connect/disconnect from a VPN.  However, it still
 will not keep those routes after a reboot. Is there any way to make
 these routes persistent using NM?

Yes, add the routes you want in the connection editor in the IPv4 tab
(click the Routes... button) and NM will set them whenever the
connection is activated, and tear them down when the connection is
deactivated.

Dan

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


Re: Issue with networkmanager-applet

2008-09-10 Thread Dan Williams
On Wed, 2008-09-10 at 17:17 +0200, Roberth Sjonøy wrote:
 Hello, I just compiled and installed networkmanager from svn. When I
 try to launch networkmanager-applet, I get this output:
 
 ** (nm-applet:4222): WARNING **: WARN
 applet_dbus_manager_start_service(): Could not acquire the
 NetworkManagerUserSettings service.
   Message: 'Connection :1.12 is not allowed to own the service
 org.freedesktop.NetworkManagerUserSettings due to security policies
 in the configuration file'

You've got D-Bus permission issues.  Are you on a Debian-based system
perhaps?

Dan

 
 (nm-applet:4222): GLib-GObject-CRITICAL **: g_object_unref: assertion
 `G_IS_OBJECT (object)' failed
 
 What am I doing wrong?
 ___
 NetworkManager-list mailing list
 NetworkManager-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/networkmanager-list

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


Re: nm-applet segfault

2008-09-10 Thread Tom Sutherland
I'm not sure how, but I resolved this problem - I suspect it had
something to do with the libnm (-dev?) package that was installed on my
machine.

I uninstalled the SVN NetworkManager and nm-applet, then installed the
Intrepid packages for them (along with a few dependencies).  Things
began working.  So...I then removed the Intrepid packages, and installed
the SVN snapshot and viola everything worked.

Thanks for the responses - I'll keep them for future reference :)


On Tue, 2008-09-09 at 15:43 -0400, Dan Williams wrote:
 On Mon, 2008-09-08 at 19:56 -0400, Tom Sutherland wrote:
  nm-applet segfaults on current SVN - I'm running Kubuntu Intrepid Ibex
  when getting this.  Is there something I should try?
 
 
  nm-applet
  ** (nm-applet:8573): WARNING **: Unknown setting ''
  ** (nm-applet:8573): WARNING **: WARN  get_secrets():
  nma-gconf-connection.c.212 - Connection didn't have requested setting
  ''.
  Segmentation fault (core dumped)
 
 Odd; can you kill the applet, then:
 
 gdb /usr/bin/nm-applet
 
 then try to reproduce the issue?  When the 'gdb' process drops you back
 to the (gdb) prompt, type:
 
 bt
 
 and mail the output in reply to this message?
 
 Thanks!
 Dan
 
 
 
  sudo NetworkManager --no-daemon
 
  NetworkManager: info
  starting...
  /sbin/ifup: interface lo already
  configured
  NetworkManager: info  Found radio
  killswitch /org/freedesktop/Hal/devices/ipw_wlan_switch
  NetworkManager: info  eth0: driver is
  'e1000e'.
  NetworkManager: info  Found new Ethernet device
  'eth0'.
  NetworkManager: info  (eth0): exported
  as /org/freedesktop/Hal/devices/net_00_1a_6b_d4_f0_eb
  NetworkManager: info  wlan0: driver is
  'iwl3945'.
  NetworkManager: info  wlan0: driver supports SSID scans (scan_capa
  0x01).
  NetworkManager: info  Found new 802.11 WiFi device
  'wlan0'.
  NetworkManager: info  (wlan0): exported
  as /org/freedesktop/Hal/devices/net_00_18_de_65_dd_5b
  NetworkManager: info  ttyACM0: driver is
  'cdc_acm'.
  NetworkManager: debug [1220917101.178911] setup_monitor_device(): No
  monitoring udi provided
  NetworkManager: info  Found new Modem device
  'ttyACM0'.
  NetworkManager: info  (ttyACM0): exported
  as 
  /org/freedesktop/Hal/devices/usb_device_106c_3702_noserial_if0_serial_unknown_0
  NetworkManager: info  Trying to start the system settings
  daemon...
  NetworkManager: WARN  killswitch_getpower_reply(): Error getting
  killswitch power: hal-ipw-killswitch-linux returned 255.
  NetworkManager: info  (eth0): device state change: 1 -
  2
  NetworkManager: info  (eth0): bringing up
  device.
  NetworkManager: info  (eth0): preparing
  device.
  NetworkManager: info  (eth0): deactivating
  device.
  NetworkManager: info  (wlan0): device state change: 1 -
  2
  NetworkManager: info  (wlan0): bringing up
  device.
  NetworkManager: WARN  nm_device_hw_bring_up(): (wlan0): device not
  up after timeout!
  NetworkManager: info  (wlan0): deactivating
  device.
  NetworkManager: info  (ttyACM0): device state change: 1 -
  2
  NetworkManager: info  (ttyACM0): deactivating
  device.
  NetworkManager: nm_system_device_flush_ip4_routes_with_iface:
  assertion `iface_idx = 0' failed
  NetworkManager: nm_system_device_flush_ip4_addresses_with_iface:
  assertion `iface_idx = 0' failed
  NetworkManager: info  (wlan0): device state change: 2 -
  3
  NetworkManager: info  (ttyACM0): device state change: 2 -
  3
  NetworkManager: info  (wlan0): supplicant interface state change: 1
  - 2.
  NetworkManager: WARN  connection_get_settings_cb(): Couldn't
  retrieve connection settings: Message did not receive a reply (timeout
  by message bus).
  NetworkManager: WARN  connection_get_settings_cb(): Couldn't
  retrieve connection settings: Message did not receive a reply (timeout
  by message bus).
  NetworkManager: WARN  connection_get_settings_cb(): Couldn't
  retrieve connection settings: Message did not receive a reply (timeout
  by message bus).
  NetworkManager: WARN  connection_get_settings_cb(): Couldn't
  retrieve connection settings: Message did not receive a reply (timeout
  by message bus).
  about 30 more of the previous message
  ___
  NetworkManager-list mailing list
  NetworkManager-list@gnome.org
  http://mail.gnome.org/mailman/listinfo/networkmanager-list
 

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


Re: Issue with networkmanager-applet

2008-09-10 Thread Tom Sutherland
This may fix it if you're in a hurry, but I doubt it's a secure way to
do it

cd /etc/dbus-1/system.d
sudo perl -pi -w -e 's/deny/allow/g;' *



On Wed, 2008-09-10 at 11:17 -0400, Roberth Sjonøy wrote:
 Hello, I just compiled and installed networkmanager from svn. When I
 try to launch networkmanager-applet, I get this output:
 
 ** (nm-applet:4222): WARNING **: WARN
 applet_dbus_manager_start_service(): Could not acquire the
 NetworkManagerUserSettings service.
   Message: 'Connection :1.12 is not allowed to own the service
 org.freedesktop.NetworkManagerUserSettings due to security policies
 in the configuration file'
 
 
 (nm-applet:4222): GLib-GObject-CRITICAL **: g_object_unref: assertion
 `G_IS_OBJECT (object)' failed
 
 What am I doing wrong?
 ___
 NetworkManager-list mailing list
 NetworkManager-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/networkmanager-list

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


Rawhide OpenVPN is Broken

2008-09-10 Thread Nathaniel McCallum
Current OpenVPN plugin doesn't work at all on rawhide.  Rawhide's 
openvpn requires the '--script-security' option to run external 
scripts.  However, even with adding that option, you still get this failure:


NetworkManager: info  VPN plugin state changed: 3
NetworkManager: WARN  vpn_service_watch_cb(): VPN service 
'org.freedesktop.NetworkManager.openvpn' died with signal 11
NetworkManager: WARN  connection_state_changed(): The name 
org.freedesktop.NetworkManager.openvpn was not provided by any .service 
files
NetworkManager: info  VPN service 
'org.freedesktop.NetworkManager.openvpn' disappeared, cancelling connections


** (process:25696): WARNING **: WARN  send_ip4_config(): Could not 
send failure information: The name 
org.freedesktop.NetworkManager.openvpn was not provided by any .service 
files

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


Re: Static and dynamic wired interface

2008-09-10 Thread Kevin Hunter
At 9:23am -0400 on Wed, 10 Sep 2008, Dan Williams wrote:
 On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote:
 Is NM capable of handling the following scenario?
 A laptop, when located at office, has a static address. Once outside, 
 DHCP is used to get an address.
 
 NM 0.7 is, but since you're mixing the two there will be some manual
 operation on your side since there's not a good generic way to
 autodetect what network you're on when you plug in the cable.

Hmm, not to be Ubuntu-centric, but I see this brainstorm idea:

Intelligent integration of Network Manager with applications
http://brainstorm.ubuntu.com/idea/12934/

I thought I saw another one about selecting one's location as well, but
now I can't find it.  In any event, the idea is to basically mimic what
OS X currently does with locations.  You can select where you are (Via
Apple-Location), and it will set the current profile of the computer
(Internet sharing enabled/disabled, airport on/off, etc.)

Any thoughts about tying some functionality like this together with some
D-Bus stuffs?

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


Re: Rawhide OpenVPN is Broken

2008-09-10 Thread Dan Williams
On Wed, 2008-09-10 at 13:10 -0400, Nathaniel McCallum wrote:
 Current OpenVPN plugin doesn't work at all on rawhide.  Rawhide's 
 openvpn requires the '--script-security' option to run external 
 scripts.  However, even with adding that option, you still get this failure:

--script-security got added upstream here late last week so it'll roll
out soon for Rawhide.

Any chance you could kill any existing nm-openvpn-service, then (as
root):

gdb /usr/libexec/nm-openvpn-service

and then try to activate the VPN connection, then when gdb drops back to
the (gdb) prompt, enter

bt

and paste the backtrace in here?

Thanks!
Dan

 NetworkManager: info  VPN plugin state changed: 3
 NetworkManager: WARN  vpn_service_watch_cb(): VPN service 
 'org.freedesktop.NetworkManager.openvpn' died with signal 11
 NetworkManager: WARN  connection_state_changed(): The name 
 org.freedesktop.NetworkManager.openvpn was not provided by any .service 
 files
 NetworkManager: info  VPN service 
 'org.freedesktop.NetworkManager.openvpn' disappeared, cancelling connections
 
 ** (process:25696): WARNING **: WARN  send_ip4_config(): Could not 
 send failure information: The name 
 org.freedesktop.NetworkManager.openvpn was not provided by any .service 
 files
 ___
 NetworkManager-list mailing list
 NetworkManager-list@gnome.org
 http://mail.gnome.org/mailman/listinfo/networkmanager-list

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


Re: Static and dynamic wired interface

2008-09-10 Thread Dan Williams
On Wed, 2008-09-10 at 08:44 -0700, Robert Smits wrote:
 On September 10, 2008 06:23:12 am Dan Williams wrote:
  On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote:
   Hi,
  
   Is NM capable of handling the following scenario?
   A laptop, when located at office, has a static address. Once outside,
   DHCP is used to get an address.
 
  NM 0.7 is, but since you're mixing the two there will be some manual
  operation on your side since there's not a good generic way to
  autodetect what network you're on when you plug in the cable.
 
  You'll create two wired connections in the connection editor.  One is a
  DHCP connection with 'autoconnect=true', and the second is the static
  connection with 'autoconnect=false'.  Manual intervention will be
  required when you want to use the static connection at the office.
 
  What should happen is this:
 
  1) When you're outside the office, the DHCP connection will
  automatically be used because it's 'autoconnect=true'.  If there isn't a
  DHCP server present, NM will fail the connection and wait for you to do
  something, or for a link change event.
 
  2) At the office, NM would try DHCP first and then fail the connection
  after the DHCP timeout because of course there's no DHCP server.  At any
  point here you then choose the static connection from the applet menu,
  and NM will activate the static connection at your command.
 
  People have tossed around ideas like ARPing a known gateway's IP address
  and matching the ARP response to a known MAC address and then activating
  that connection, but that's pretty fragile and trivial to maliciously
  spoof.

 This way of doing things seems like a kluge. Why can't network-manager just 
 work with scpm which already does all of this, including nfs networks?

First, because scpm doesn't seem to be widely used.  You're actually the
first person I've ever heard mention it, and when you did mention it, I
had to go off and look it up.  Network profile mechanisms aren't new,
but not that many people use them any more because for the most part
stuff just works.  That's not to say that they aren't useful for some
situations, like yours.

Second, profiles make for a pretty sucky experience, and are only really
necessary for connections which you can't autodetect, like wired ones.
I'd seriously hate to have to select a profile every time I moved to a
new location, but of course most of those locations don't require the
use of a wired network.  Again, profiles as such limit usability for
anyone who doesn't use wired networks.  Connections like wireless,
mobile broadband, bluetooth, etc can all be autodetected quite well and
thus don't need profiles as such.

Third, you could certainly create some scpm scripts to flip the
'autoconnect' property of the two connections you'd care about.  Thus,
in conjunction with your current usage of scpm, NM would certainly give
you a click-free (aside from choosing your profile with scpm which
you're already doing) method of selecting your location.

In short, I think you could make this work with scpm just fine, as long
as you can use it to either modify ifcfg files in /etc (for system
connections) or after you log in (for user connections).  Should be
pretty trivial to set up.

If the right connection is chosen, NM can already facilitate most of the
profile stuff you're probably using, like NFS, proxies, etc, through
dispatcher scripts with no additional choice of profile required like
AIUI scpm would require.  So again, there could be no additional effort
required on your part besides choosing the right scpm setup.

Dan

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


RE: Static and dynamic wired interface

2008-09-10 Thread Just For Sal


-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Dan Williams
Sent: Wednesday, September 10, 2008 3:03 PM
To: Robert Smits
Cc: networkmanager-list@gnome.org
Subject: Re: Static and dynamic wired interface

On Wed, 2008-09-10 at 08:44 -0700, Robert Smits wrote:
 On September 10, 2008 06:23:12 am Dan Williams wrote:
  On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote:
   Hi,
  
   Is NM capable of handling the following scenario?
   A laptop, when located at office, has a static address. Once outside,
   DHCP is used to get an address.
 
  NM 0.7 is, but since you're mixing the two there will be some manual
  operation on your side since there's not a good generic way to
  autodetect what network you're on when you plug in the cable.
 
  You'll create two wired connections in the connection editor.  One is a
  DHCP connection with 'autoconnect=true', and the second is the static
  connection with 'autoconnect=false'.  Manual intervention will be
  required when you want to use the static connection at the office.
 
  What should happen is this:
 
  1) When you're outside the office, the DHCP connection will
  automatically be used because it's 'autoconnect=true'.  If there isn't a
  DHCP server present, NM will fail the connection and wait for you to do
  something, or for a link change event.
 
  2) At the office, NM would try DHCP first and then fail the connection
  after the DHCP timeout because of course there's no DHCP server.  At any
  point here you then choose the static connection from the applet menu,
  and NM will activate the static connection at your command.
 
  People have tossed around ideas like ARPing a known gateway's IP address
  and matching the ARP response to a known MAC address and then activating
  that connection, but that's pretty fragile and trivial to maliciously
  spoof.

 This way of doing things seems like a kluge. Why can't network-manager
just 
 work with scpm which already does all of this, including nfs networks?

First, because scpm doesn't seem to be widely used.  You're actually the
first person I've ever heard mention it, and when you did mention it, I
had to go off and look it up.  Network profile mechanisms aren't new,
but not that many people use them any more because for the most part
stuff just works.  That's not to say that they aren't useful for some
situations, like yours.

Second, profiles make for a pretty sucky experience, and are only really
necessary for connections which you can't autodetect, like wired ones.
I'd seriously hate to have to select a profile every time I moved to a
new location, but of course most of those locations don't require the
use of a wired network.  Again, profiles as such limit usability for
anyone who doesn't use wired networks.  Connections like wireless,
mobile broadband, bluetooth, etc can all be autodetected quite well and
thus don't need profiles as such.

Third, you could certainly create some scpm scripts to flip the
'autoconnect' property of the two connections you'd care about.  Thus,
in conjunction with your current usage of scpm, NM would certainly give
you a click-free (aside from choosing your profile with scpm which
you're already doing) method of selecting your location.

In short, I think you could make this work with scpm just fine, as long
as you can use it to either modify ifcfg files in /etc (for system
connections) or after you log in (for user connections).  Should be
pretty trivial to set up.

If the right connection is chosen, NM can already facilitate most of the
profile stuff you're probably using, like NFS, proxies, etc, through
dispatcher scripts with no additional choice of profile required like
AIUI scpm would require.  So again, there could be no additional effort
required on your part besides choosing the right scpm setup.

Dan

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

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


Re: Static and dynamic wired interface

2008-09-10 Thread Dan Williams
On Wed, 2008-09-10 at 13:41 -0400, Kevin Hunter wrote:
 At 9:23am -0400 on Wed, 10 Sep 2008, Dan Williams wrote:
  On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote:
  Is NM capable of handling the following scenario?
  A laptop, when located at office, has a static address. Once outside, 
  DHCP is used to get an address.
  
  NM 0.7 is, but since you're mixing the two there will be some manual
  operation on your side since there's not a good generic way to
  autodetect what network you're on when you plug in the cable.
 
 Hmm, not to be Ubuntu-centric, but I see this brainstorm idea:
 
 Intelligent integration of Network Manager with applications
 http://brainstorm.ubuntu.com/idea/12934/

We've pretty much wanted this from day 1 way back in 2004...  There had
always been vague plans to get things like Thunderbird and Evolution to
tie a mail account to specific connections, such that when those
connections are active (be it Work or Work VPN) then and only then
would Evolution or Thunderbird try to check your work mail account.

There are a few levels of awareness, the first being basic can my
packets get somewhere beyond me and the next level being where am I
connected at, work or home or elsewhere?

 I thought I saw another one about selecting one's location as well, but
 now I can't find it.  In any event, the idea is to basically mimic what
 OS X currently does with locations.  You can select where you are (Via
 Apple-Location), and it will set the current profile of the computer
 (Internet sharing enabled/disabled, airport on/off, etc.)

I've maintained that this is a sub-optimal experience almost from day
#1, because for most people you can detect location without any user
interaction at all.  The OS X Location Manager (it's existed since Mac
OS 7 really) is a carry-over from the times you had to dial up or hook
up or use AppleTalk, not from 2008 when you have WiFi, Bluetooth, and
broadband.

Think about Robert's scenario: work and home.  He already has to choose
a profile on startup with scpm.  That's what, at least one click?  If
he were to use the static/dynamic setup that I recommended for NM
(selecting the static work connection when he was at work, which is
also just one click) instead of using scpm, he could achieve the exact
same results with less software and complexity.  You can already modify
NFS mounts, proxies, printers, etc from dispatcher scripts.

 Any thoughts about tying some functionality like this together with some
 D-Bus stuffs?

NM emits signals when the connection changes, and thus apps can
certainly figure out where they are connected at any given point in
time.  If you want to treat connections like profiles, you could key
off the connection UUID for Work and set up your NFS mounts
accordingly when the Work connection was successfully activated.
Something could certainly poke disable wireless when the Work
connection gets activated.  That sort of thing.

Dan


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


Re: Rawhide OpenVPN is Broken

2008-09-10 Thread Nathaniel McCallum

Dan Williams wrote:

On Wed, 2008-09-10 at 13:10 -0400, Nathaniel McCallum wrote:
  
Current OpenVPN plugin doesn't work at all on rawhide.  Rawhide's 
openvpn requires the '--script-security' option to run external 
scripts.  However, even with adding that option, you still get this failure:



--script-security got added upstream here late last week so it'll roll
out soon for Rawhide.

Any chance you could kill any existing nm-openvpn-service, then (as
root):

gdb /usr/libexec/nm-openvpn-service

and then try to activate the VPN connection, then when gdb drops back to
the (gdb) prompt, enter

bt

and paste the backtrace in here?

Here's the backtrace:

Program received signal SIGSEGV, Segmentation fault.
0x00350667c513 in __libc_free (mem=value optimized out) at 
malloc.c:3614

3614  ar_ptr = arena_for_chunk(p);
(gdb) bt
#0  0x00350667c513 in __libc_free (mem=value optimized out) at 
malloc.c:3614
#1  0x003508212d4b in IA__g_ptr_array_foreach (array=value 
optimized out, func=value optimized out, user_data=value optimized 
out) at garray.c:627

#2  0x00402750 in g_file_test () at gfileutils.c:184
#3  0x00402c92 in g_file_test () at gfileutils.c:184
#4  0x0036fd602bf7 in nm_vpn_plugin_connect () at nm-vpn-plugin.c:306
#5  impl_vpn_plugin_connect (plugin=value optimized out, 
properties=value optimized out, error=value optimized out) at 
nm-vpn-plugin.c:354
#6  0x0036fd603e5c in 
dbus_glib_marshal_nm_vpn_plugin_BOOLEAN__BOXED_POINTER (closure=value 
optimized out, return_value=value optimized out,
   n_param_values=value optimized out, param_values=value optimized 
out, invocation_hint=value optimized out, marshal_data=value 
optimized out)

   at nm-vpn-plugin-glue.h:95
#7  0x00350620c888 in invoke_object_method () at dbus-gobject.c:1282
#8  gobject_message_function (connection=value optimized out, 
message=value optimized out, user_data=value optimized out) at 
dbus-gobject.c:1424
#9  0x003505a1c551 in _dbus_object_tree_dispatch_and_unlock 
(tree=value optimized out, message=value optimized out) at 
dbus-object-tree.c:856
#10 0x003505a0efc6 in dbus_connection_dispatch (connection=value 
optimized out) at dbus-connection.c:4447
#11 0x003506209765 in message_queue_dispatch (source=value 
optimized out, callback=value optimized out, user_data=value 
optimized out)

   at dbus-gmain.c:101
#12 0x00350823772b in g_main_dispatch () at gmain.c:2142
#13 IA__g_main_context_dispatch (context=value optimized out) at 
gmain.c:2694
#14 0x00350823af0d in g_main_context_iterate (context=value 
optimized out, block=value optimized out, dispatch=value optimized 
out,

   self=value optimized out) at gmain.c:2775
#15 0x00350823b43d in IA__g_main_loop_run (loop=value optimized 
out) at gmain.c:2983

#16 0x0040201b in g_file_test () at gfileutils.c:184
#17 0x00350661e566 in __libc_start_main (main=value optimized out, 
argc=value optimized out, ubp_av=value optimized out,
   init=value optimized out, fini=value optimized out, 
rtld_fini=value optimized out, stack_end=Could not find the frame base 
for __libc_start_main.

) at libc-start.c:220
---Type return to continue, or q return to quit---
#18 0x00401e09 in g_file_test () at gfileutils.c:184
#19 0x7fffe788 in ?? ()
#20 0x001c in ?? ()
#21 0x0001 in ?? ()
#22 0x7fffe9a5 in ?? ()
#23 0x in ?? ()

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


Re: Rawhide OpenVPN is Broken

2008-09-10 Thread Nathaniel McCallum

Dan Williams wrote:

On Wed, 2008-09-10 at 13:10 -0400, Nathaniel McCallum wrote:
  
Current OpenVPN plugin doesn't work at all on rawhide.  Rawhide's 
openvpn requires the '--script-security' option to run external 
scripts.  However, even with adding that option, you still get this failure:



--script-security got added upstream here late last week so it'll roll
out soon for Rawhide.

Any chance you could kill any existing nm-openvpn-service, then (as
root):

gdb /usr/libexec/nm-openvpn-service

and then try to activate the VPN connection, then when gdb drops back to
the (gdb) prompt, enter

bt

and paste the backtrace in here?
  

Also, valgrind gives me this:

==2378== Invalid free() / delete / delete[]
==2378==at 0x4A0609F: free (vg_replace_malloc.c:323)
==2378==by 0x3508212D4A: g_ptr_array_foreach (garray.c:627)
==2378==by 0x40274F: (within /usr/libexec/nm-openvpn-service)
==2378==by 0x402C91: (within /usr/libexec/nm-openvpn-service)
==2378==by 0x36FD602BF6: impl_vpn_plugin_connect (nm-vpn-plugin.c:306)
==2378==by 0x36FD603E5B: 
dbus_glib_marshal_nm_vpn_plugin_BOOLEAN__BOXED_POINTER 
(nm-vpn-plugin-glue.h:95)

==2378==by 0x350620C887: gobject_message_function (dbus-gobject.c:1282)
==2378==by 0x3505A1C550: _dbus_object_tree_dispatch_and_unlock 
(dbus-object-tree.c:856)
==2378==by 0x3505A0EFC5: dbus_connection_dispatch 
(dbus-connection.c:4447)

==2378==by 0x3506209764: message_queue_dispatch (dbus-gmain.c:101)
==2378==by 0x350823772A: g_main_context_dispatch (gmain.c:2142)
==2378==by 0x350823AF0C: g_main_context_iterate (gmain.c:2775)
==2378==  Address 0x403d2b is not stack'd, malloc'd or (recently) free'd
** Message: info  openvpn started with pid 2387


** (process:2378): WARNING **: WARN  openvpn_watch_cb(): openvpn 
exited with error code 1


==2378==
==2378== ERROR SUMMARY: 2 errors from 1 contexts (suppressed: 4 from 1)
==2378== malloc/free: in use at exit: 78,873 bytes in 748 blocks.
==2378== malloc/free: 1,812 allocs, 1,066 frees, 546,109 bytes allocated.
==2378== For counts of detected errors, rerun with: -v
==2378== searching for pointers to 748 not-freed blocks.
==2378== checked 371,536 bytes.
==2378==
==2378== LEAK SUMMARY:
==2378==definitely lost: 0 bytes in 0 blocks.
==2378==  possibly lost: 5,616 bytes in 25 blocks.
==2378==still reachable: 73,257 bytes in 723 blocks.
==2378== suppressed: 0 bytes in 0 blocks.
==2378== Rerun with --leak-check=full to see details of leaked memory.

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


Re: iwl3945 delayed scan results after resume

2008-09-10 Thread Dan Nicholson
On Fri, Sep 5, 2008 at 1:08 PM, Dan Nicholson [EMAIL PROTECTED] wrote:

 Thanks. That patch seems to help, but I think there's still something
 wrong going on. With that patch, association drops from ~30 seconds to
 ~15 seconds. But if I look at the debug log for wpa again, it's doing
 what I want by triggering a full scan immediately, but it still
 doesn't find the AP until wpa reschedules another scan 5 seconds
 later.

 What I'm noticing now is that with or without the patch, wpa schedules
 two broadcast scans first that do nothing. It's not until the third
 scan where it scans specifically for my AP.

 1220546429.722841: Setting scan request: 0 sec 0 usec
 1220546429.722879: State: DISCONNECTED - SCANNING
 1220546429.722924: Starting AP scan (broadcast SSID)
 1220546429.722928: Trying to get current scan results first without
 requesting a new scan to speed up initial association
 ...
 1220546429.722996: Setting scan request: 0 sec 0 usec
 1220546429.723006: Starting AP scan (broadcast SSID)
 ...
 1220546433.440267: No suitable AP found.
 1220546433.440275: Setting scan request: 5 sec 0 usec
 ...
 1220546433.444180: State: SCANNING - DISCONNECTED
 ...
 1220546438.441164: State: DISCONNECTED - SCANNING
 1220546438.441298: Starting AP scan (specific SSID)
 1220546438.441304: Scan SSID - hexdump_ascii(len=5):
 64 77 63 61 62dwcab

 So now that it scans for my specific AP, it finds it immediately and
 starts associating. So, what's causing the two broadcast scans before
 it scans for my SSID? Why isn't it trying the specific scan
 immediately? I can't quite figure out what's going on in
 wpa_supplicant_scan().

The basic cause of the slowness seems to be: scanning is slow and it's
done excessively. Here is the order of events following an NM wake
event as best as I can tell.

1. NM queries the state of wpa. If it finds it's ready, it initiates a
scan to get fresh results.

2. After doing a broadcast scan, wpa sends out the scan results.

3. NM iterates over the results looking for my AP. If it's found, it
sends an addNetwork/selectNetwork to wpa.

4. Receiving selectNetwork causes wpa to rescan for that specific
SSID. If found, it associates with the AP.

It seems there are a couple issues here.

First, if NM knows that I prefer to connect to a specific SSID, it
would be better if it asked to scan for that specific SSID initially
and not do a broadcast scan. If the specific scan fails, it should
then fallback to the broadcast scan and take action from there. I
don't know if this is a limitation of the wpa dbus interface. I.e., do
we need to initiate a scan first before doing
addNetwork/selectNetwork?

Second, if wpa has just done a broadcast scan and NM sends it a
selectNetwork, it would be better if wpa didn't rescan for that
specific SSID. Instead, it could just check if that SSID is in the
list returned by the previous broadcast scan, falling back to the scan
if it's not there. Possibly it would be good to check that the
broadcast scan had been done recently (e.g., 30 secs) before making
the assumption that those results were still valid.

Those two issues kind of oppose each other. The key here would be to
go from 2 scans to 1 in the case that we have a specific SSID we want
to use. I spent some time looking through the wpa and NM code trying
to decipher the exact order of operations and how they might be fixed,
but it was a little over my head.

Comments? Am I off base in that analysis?

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


active development of nm-openvpn anyone?

2008-09-10 Thread Christoph Höger
Hi folks,

is anyone currently actively developing nm-openvpn or is it just getting
pulled to latest nm api changes?
I'm asking because I figured some weirdness in the TLS-Tab in the
properties panel and do not want to patch around if someone has his
hands on it.

regards

christoph


signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list