nm-tool showing default route

2008-06-03 Thread Markus Becker
Hi Dan,

below is a patch that shows the default route in nm-tool. Feel free to 
modify it.

Markus

Index: test/nm-tool.c
===
--- test/nm-tool.c  (revision 3715)
+++ test/nm-tool.c  (working copy)
@@ -198,11 +198,14 @@
  detail_device (gpointer data, gpointer user_data)
  {
NMDevice *device = NM_DEVICE (data);
+   NMClient *client = NM_CLIENT (user_data);
char *tmp;
NMDeviceState state;
guint32 caps;
guint32 speed;
const GArray *array;
+   const GPtrArray *connections;
+   int j;

state = nm_device_get_state (device);

@@ -223,6 +226,21 @@

print_string (State, get_dev_state_string (state));

+   connections = nm_client_get_active_connections (client);
+   for (j = 0; connections  (j  connections-len); j++) {
+   NMActiveConnection *candidate = g_ptr_array_index (connections, 
j);
+   const GPtrArray *devices = nm_active_connection_get_devices 
(candidate);
+   NMDevice *candidate_dev;
+
+   if (!devices || !devices-len)
+   continue;
+   candidate_dev = g_ptr_array_index (devices, 0);
+
+   if ( candidate_dev == device 
+nm_active_connection_get_default(candidate))
+   print_string (Route, IPv4 Default Route);
+   }
+
tmp = NULL;
if (NM_IS_DEVICE_802_3_ETHERNET (device))
tmp = g_strdup (nm_device_802_3_ethernet_get_hw_address 
(NM_DEVICE_802_3_ETHERNET (device)));
@@ -362,7 +380,7 @@
}

devices = nm_client_get_devices (client);
-   g_ptr_array_foreach ((GPtrArray *) devices, detail_device, NULL);
+   g_ptr_array_foreach ((GPtrArray *) devices, detail_device, client);

g_object_unref (client);
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Cannot connect to a VPN using the pptp plugin

2008-06-03 Thread Tassilo Horn
Hi all,

I'm using networkmanager-0.6.6 and networkmanager-pptp-0.1.0_p20070726
on a Gentoo GNU/Linux system.  I really like it a lot.  It has never
been so easy to connect to my wireless home lan (WPA2) before, so thanks
a lot for your work.

Anyway, at my university I have to connect to a PPTP VPN in order to use
all services via the wireless network.  So I've installed the pptp
plugin.  Now nm-applet contains a VPN Connections  entry, but when I
click VPN Connections  Configure VPN... nothing happens.

How can I debug what's wrong here?  If I start nm-applet in a terminal,
no messages are logged when I click the Configure VPN... entry...

Bye,
Tassilo

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


Re: openvpn and network manager

2008-06-03 Thread Dimitris Zilaskos
On Mon, 2 Jun 2008, Dan Williams wrote:

 On Mon, 2008-06-02 at 10:34 +0300, Dimitris Zilaskos wrote:

 Yeah, I poked at this some ago.  The issue here is that since TAP looks
 like an ethernet device, it doesn't have the same IP configuration
 characteristics as TUN devices do.  In the TAP case, you can also do
 DHCP over the TAP interface and get an IP that way too, or you can use
 static IP, or you can have the server push the IP down I think.

 There was also a lot of stuff about bridging in some of the HOWTOs that
 I read about TAP-mode.  Do you have to set up bridging to use openvpn
 TAP mode on the client?  It wasn't clear to me if that was required or
 not.

  I do not think so. I use tap and I have not setup a bridge.

 Ok, good :)  Do you use DHCP on the tap interface?


No, my ip is assigned to my certificate DN by the openvpn server.


--


Dimitris Zilaskos

Department of Physics @ Aristotle University of Thessaloniki , Greece
PGP key : http://tassadar.physics.auth.gr/~dzila/pgp_public_key.asc
  http://egnatia.ee.auth.gr/~dzila/pgp_public_key.asc
MD5sum  : de2bd8f73d545f0e4caf3096894ad83f  pgp_public_key.asc

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


NetworkManager and CNU-550 - modification of 10-modem.fdi to get it working

2008-06-03 Thread Igor
Added CMOTECH definition between Anydata and Pantech to 
/usr/share/hal/fdi/information/10freedesktop/10-modem.fdi

  !-- Anydata --
  match key=@info.parent:usb.vendor_id int=0x16d5
!-- Adu E100a,500a --
match key=@info.parent:usb.product_id int_outof=0x6501;0x6502
  match key=@info.parent:usb.interface.number int=0
append key=info.capabilities type=strlistmodem/append
append key=modem.command_sets 
type=strlistIS-707-A/append
  /match
/match
  /match

  !-- CMOTECH --
  match key=@info.parent:usb.vendor_id int=0x16d8
!-- C-motech CNU-550 (USB, EV-DO) --
match key=@info.parent:usb.product_id int_outof=0x5543
  match key=@info.parent:usb.interface.number int=0
append key=info.capabilities type=strlistmodem/append
append key=modem.command_sets 
type=strlistIS-707-A/append
  /match
/match
  /match

  !-- Pantech --
  match key=@info.parent:usb.vendor_id int=0x106c
!-- PC5740;PC5750 EVDO rev A card --
match key=@info.parent:usb.product_id int_outof=0x3701;0x3702
  match key=@info.parent:usb.interface.number int=0
append key=info.capabilities type=strlistmodem/append
append key=modem.command_sets 
type=strlistIS-707-A/append
  /match
/match
  /match
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Adding a signal for a connection removed

2008-06-03 Thread Tambet Ingo
On Tue, Jun 3, 2008 at 5:58 AM, Christopher Blauvelt
[EMAIL PROTECTED] wrote:
 What do you all think of having a signal on the service
 org.freedesktop.NetworkManagerSettings when a connection is removed instead
 of just added.  If the keeping the current naming convention is desired, the
 new signal could be called RemovedConnection.  If not, then ConnectionAdded
 and ConnectionRemoved sound more natural.

This functionality is already present in NM. The signal
'org.freedesktop.NetworkManagerSettings.NewConnection' is emitted when
a connection is created with an argument of the exported connection's
object path. Any changes to that connection are notified with the
signal 'org.freedesktop.NetworkManagerSettings.Connection.Updated' and
when the connection is removed, signal
'org.freedesktop.NetworkManagerSettings.Connection.Removed' is used.

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


Re: Lots of segfaults in nm-system-settings

2008-06-03 Thread Dan Williams
On Tue, 2008-06-03 at 07:26 +0530, ritz wrote:
 Hello
 
   sorry for the delayed response.

Do you run with SELinux in enforcing mode?  If so, you'll probably want
to update the selinux-policy-targeted package too.

Dan

 On Tue, 2008-05-20 at 10:08 +0100, The Holy ettlz wrote:
  An excerpt from dmesg:
  
  nm-system-setti[14680]: segfault at ccbe5004 eip 00d01d78 esp bfbcba3c
  error 5
  nm-system-setti[15193]: segfault at cb3e5004 eip 00d01d78 esp bf93279c
  error 5
  nm-system-setti[15706]: segfault at b70e5004 eip 00d01d78 esp bf8e9f5c
  error 4
  nm-system-setti[16222]: segfault at a79e5004 eip 00d01d78 esp bf909f7c
  error 4
  nm-system-setti[16732]: segfault at 092e5004 eip 00d01d78 esp bff51dcc
  error 4
  nm-system-setti[17246]: segfault at d9ce5004 eip 00d01d78 esp bfcba32c
  error 5
  
  There are loads of other similar messages. This is with
  NetworkManager-0.7.0-0.6.8.svn3669.fc8 --- let me know if you need any
  more information.
 One would need a backtrace to deal with issue, install debuginfo  and
 enable coredumps
 
   $ debuginfo-install NetworkManager
 
 
 To enable coredumps, please refer -
 http://kbase.redhat.com/faq/FAQ_85_9691.shtm
 
 
 One a coredump has been generated, to obtain backtrace
 
   $ gdb --core=/path/to/coredump /usr/sbin/nm-system-setting
   ...
   (gdb) thread apply all bt
 a long output which would be of interest to developers.
 
 
  
  James
  
  
  ___
  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


corrected typo in nm-applet

2008-06-03 Thread Miner, Jonathan W (US SSA)
I noticed that the IP Address label was misspelled in the Connection 
Information dialog.  Here are `diff -u` output for patches to the three files 
that need to be corrected.  If there is a better way to submit patches, please 
let me know.

--- ./src/applet-dialogs.c.orig 2008-06-02 08:28:05.0 -0400
+++ ./src/applet-dialogs.c  2008-06-03 11:26:29.0 -0400
@@ -337,7 +337,7 @@
 
/* Address */
gtk_table_attach_defaults (table,
-  create_info_label 
(_(IP Adrress:)),
+  create_info_label 
(_(IP Address:)),
   0, 1, row, row + 1);
gtk_table_attach_defaults (table,
   create_info_label 
(ip4_address_as_string (def_addr-address)),

--- ./po/ru.po.orig 2008-06-02 08:28:05.0 -0400
+++ ./po/ru.po  2008-06-03 11:26:20.0 -0400
@@ -308,7 +308,7 @@
 msgstr ??:
 
 #: ../src/applet-dialogs.c:340
-msgid IP Adrress:
+msgid IP Address:
 msgstr IP-?:
 
 #: ../src/applet-dialogs.c:353

--- ./po/es.po.orig 2008-06-02 08:28:05.0 -0400
+++ ./po/es.po  2008-06-03 11:26:08.0 -0400
@@ -312,7 +312,7 @@
 msgstr Seguridad:
 
 #: ../src/applet-dialogs.c:340
-msgid IP Adrress:
+msgid IP Address:
 msgstr Dirección IP:
 
 #: ../src/applet-dialogs.c:353

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


Re: [PATCH] Delay full modem initialization until SIM is unlocked

2008-06-03 Thread Pablo Martí
On Thu, May 29, 2008 at 7:25 PM, Pablo Martí [EMAIL PROTECTED] wrote:
 I'd like to try something like this for my device.

 We've been working on this as an internal RD project till the
 possible future integration with NM, but we'd be certainly happy to
 have you (and anyone else) tinkering. I'll prepare a trac for next
 week, I'll keep you posted

http://public.warp.es/vmc

The svn aint public yet (needs a SSL cert), I'll sort it out 2morrow,
till then you can download a .{deb,rpm} from the download section.




 Any thoughts ?

 Dennis



 --
 Pablo Martí
 http://www.linkedin.com/in/pmarti || http://www.warp.es
 python -c print '706d6172746940776172702e6573'.decode('hex')



 --
 Pablo Martí
 http://www.linkedin.com/in/pmarti || http://www.warp.es
 python -c print '706d6172746940776172702e6573'.decode('hex')




-- 
Pablo Martí
http://www.linkedin.com/in/pmarti || http://www.warp.es
python -c print '706d6172746940776172702e6573'.decode('hex')
___
NetworkManager-list mailing list
NetworkManager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: [ubuntu/debian] monitoring woes of /etc/network/interfaces...

2008-06-03 Thread Dan Williams
On Tue, 2008-06-03 at 02:41 +0200, Michael Biebl wrote:
 Dan Williams wrote:
 
  
  The downsides of course are that (a) you have to teach your GUI tools
  that might modify the config files about NetworkManager, and (b) you
  have to create a wrapper around dbus-send for CLI sysadmins so they
  don't have to type the entire dbus-send command.
 
 The init script could have reload action, which does just that: Reload 
 the whole configuration.

Well, you don't want to necessarily reload the system config settings if
you just dropped a VPN .name file in, because then if you had not
finished changing a system config setting it would get sucked in when
you didn't want it to.  We'd have to have at least 2 different reload
commands if we did this.

dan

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


Re: Auto-activate

2008-06-03 Thread Dan Williams
On Tue, 2008-06-03 at 08:28 +0200, Helmut Schaa wrote:
 Am Mo 02 Jun 2008 17:00:24 CEST schrieb Dan Williams [EMAIL PROTECTED]:
 
  On Sun, 2008-06-01 at 21:34 +0200, Will Stephenson wrote:
  What needs to be done to get NM to autoconnect a wireless connection on
  UserSettingsService startup?  I can see KNM responding to GetSettings with
  autoconnect=true, but NM then seems to ignore the connection.  I am going 
  to
  put some debug in NetworkManagerPolicy.c but could someone (Dan hopefully)
  elaborate the way it should work, from a client's point of view?
 
  For wifi, look in nm-device-802-11-wireless.c,
  real_get_best_auto_connection().  That loops through all connections,
  and will match connections based on:
 
  a) if it's a wireless connection
  b) if it's autoconnect
  c) if it's got a wireless setting
  d) if it has a MAC address, if that MAC matches the device's MAC
  e) if there's a compatible AP in the device's scan list
 
  I'd suspect (e) first here actually.  There may be a bug in the AP
  matching code, or the connection may just be wrong for the AP you're
  trying to connect to.  If the call to nm_ap_check_compatible() for your
  AP is returning FALSE, get the iwlist output for the AP and then drill
  down into that function and see why it's returning FALSE.  It's probably
  in the security stuff.
 
 The issue is related to (e). It's the same issue as in the mail I've  
 send you some days ago regarding cipher preselection. NM will refuse  
 to autoconnect to a wireless connection if no ciphers are specified.
 
 I just worked around this issue by specifying default ciphers in KNM.

Should probably file a bug about this in bugzilla so we don't forget
about it.  Should be fixed eventually.

Dan

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


patch to applet-dialogs

2008-06-03 Thread Miner, Jonathan W (US SSA)
If the default gateway is not explicitly set, then it currently is displayed as 
0.0.0.0 in the Connection Information box. This patch disables the display 
of the Default Route tag if it isn't set.

--- src/applet-dialogs.c.orig   2008-06-02 08:28:05.0 -0400
+++ src/applet-dialogs.c2008-06-03 11:47:59.0 -0400
@@ -367,13 +367,15 @@
row++;
 
/* Gateway */
-   gtk_table_attach_defaults (table,
+   if ( def_addr-gateway != 0 ) {
+   gtk_table_attach_defaults (table,
   create_info_label 
(_(Default Route:)),
   0, 1, row, row + 1);
-   gtk_table_attach_defaults (table,
+   gtk_table_attach_defaults (table,
   create_info_label 
(ip4_address_as_string (def_addr-gateway)),
   1, 2, row, row + 1);
-   row++;
+   row++;
+   }
 
/* DNS */
dns = nm_ip4_config_get_nameservers (ip4_config);

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