Re: invalid path nma-gconf-connection

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 23:30 +0200, Sébastien Fillaudeau wrote:
> Le 14/04/2010 22:31, Dan Williams a écrit :
> > On Sat, 2010-04-10 at 12:20 +0200, Sébastien Fillaudeau wrote:
> >
> >> Le 09/04/2010 02:04, Dan Williams a écrit :
> >>  
> >>> On Thu, 2010-04-08 at 20:13 +0200, Sébastien Fillaudeau wrote:
> >>>
> >>>
>  Hi,
> 
>  For my work, i try to modify the mn-applet to order connection by there
>  priority.
> 
>  The priority for the nma-gconf-connection can be get by the path of this
>  connection.
> 
>   
> >>> What behavior are you trying to get here with the priorities?  NM
> >>> doesn't use priorities for a specific reason, usually because they're a
> >>> pretty bad way to interact with users.  It's not often that you have
> >>> more than one visible wifi network in the same area that you switch
> >>> between frequently; that would usually indicate bad network planning :)
> >>> There may be other ways we can adjust the behavior.
> >>>
> >>> But I don't think your patch is the right way to do this.  You don't
> >>> really want to be modifying nm-connection.c or really libnm-util at all,
> >>> and you don't need to.
> >>>
> >>> Just abuse the 'timestamp' option to be your priority, which NM will
> >>> already use to sort the connections.  Disable the code in nm-applet that
> >>> updates the timestamp periodically, and then add some bits in
> >>> nm-connection-editor that change the timestamp based on what the user
> >>> wants the priority to be.
> >>>
> >>> Dan
> >>>
> >>>
> >>>
>  I have a probleme when i tried to get te connection path. It seems to
>  have illegal caracter at the beginning of the path.
> 
>  Maybe, any modification of char in gchar could cause it?
> 
>  The get_path function give a char *.
> 
>  If you know something about comparable error can you help me.
> 
>  I search a lot about this errors and i don't found any help.
> 
>  I attach the patch of my modification, maybe you could help me better if
>  you see the code i generated.
> 
> 
>  Thank for any help
> 
>  Sebastien
>  ___
>  networkmanager-list mailing list
>  networkmanager-list@gnome.org
>  http://mail.gnome.org/mailman/listinfo/networkmanager-list
> 
>   
> >>>
> >>>
> >>>
> >>>
> >> I can take my situation to make an example. For my internet connection
> >> my FAI is free.
> >> They propose to share your internet connection by a specific wifi network.
> >>And if you share you can connect to other one wich share.
> >> In my home i don't want to connect to this second limited connection.
> >> But in my appartement for my study, i connect to it.
> >>So if we can set priority in applet it could be useful for case like
> >> this, don't you think?
> >>
> >> For you NetworkManager should'nt explicitly modify the priority?
> >>
> >> about the code : nm-connection is the representation of system connection?
> >>so it is on this class i need to interacte with it ?
> >>  
> > NMConnection is the representation of all connections, both system and
> > user.  But you shouldn't need to modify it if you're using the timestamp
> > for the priority.
> >
> >
> >> timestamp is a good example but it is not a element that user by using
> >> applet can modify
> >>  
> > No, but my suggestion was to make it modifiable by the user.  NM just
> > uses the highest value there to pick the first network to try, so
> > timestamp is really a good mapping of what you're trying to do.
> >
> > Dan
> >
> >
> >
> >
> >
> ok , i was thinking that the priority of a connection was pick up by the 
> number of the folder it is in.

No, the GConf folder is an implementation detail of how the applet
stores the connection data.  It's not sent or used by NM in any way.

Dan


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


RE: Web login

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 11:28 +, Mattias Bengtsson wrote:
> > > Just got it - it is simple as that. Try to open any page you're sure
> > > isn't accessible without authentication. It will redirect to login
> > > page. If there is clear shot that is indeed login page, go ahead. If
> > > not, fall back to current default - do nothing :)
> > 
> > 
> > bool requiresWebLogin()
> > {
> > return (http://www.google.com
> >  == http://www.yahoo.com/
> >  == http://www.hotmail.com/ )
> > }
> > 
> > Something like that.
> > 
> 
> I think Dan was against this sort of functionality. I think he referred to 
> some netgear routers that autoconnected to some hosts on startup or 
> something. A sort of unintentional DoS. Search the archives.
> Some at least slightly more likely URLs then google, yahoo and hotmail are 
> "http://www.canonical.com/nmtest"; for ubuntu and "www.redhat.com/nmtest" for 
> fedora etc etc. 

I wasn't against it per-se, but we need to really think about this since
it certainly does have the potential to make people really mad.  The
reference was about some DLink routers that DoS-ed the UW Madison NTP
servers because they'd hard-coded the NTP server address in the firmware
and didn't  have any rate-limiting when the server couldn't be reached,
so they'd just retry over and over and over.

Think about a couple hundred thousand of these wifi APs trying to
connect to a server that doesn't exist anymore, which still uses up
bandwidth for the initial TCP connection setup.

The point was that blindly adding some "am I really connected" query
into NM itself is error-prone in a few ways:

1) if a bunch of NM-enabled machines boot up at the same time, you get a
DoS effect against the site that you're trying to ping

2) you'll need a few sites to try, and you'll need to handle errors if
for example a routing split means you can't contact one of the sites:

http://gigaom.com/2008/10/30/cogent-sprint-un-peer-may-cause-web-slowdown/

3) it's more complicated than you may think; some captive portals (I've
seen this with Bluesocket ones) will respond to *any* ping request, even
if you ping www.google.com, they'll respond to that.  If you go to
www.google.com, they'll respond to that too with the portal login page.
This is pretty popular.

So you can't just ping a site.  You'll need to keep a database of login
portals and associate "magic"; I know some exist out there already.  You
do a quick request to your preferred "am-i-on-teh-intarwebs" server, and
if it matches anything in the portal database, then you know you're not
connected yet.  Plus this means you can have something automatically
enter your username/password for you too.  Otherwise, there are some
standards for captive portals (WISPR?) that help you autodetect and log
in more easily than doing screenscraping of the HTML.

I've long wondered what Windows Vista and later do for this, since they
have some sort of functionality to detect whether you're connected to
the internet or not.  Maybe we could take a similar approach?  Windows
certainly doesn't make you enter the addresses of various sites you'd
like to ping.

Next, this is a great use of pre-up scripts.  I'd like to roll this into
the same infrastructure, since for auto-login to portals, you're not
really "up" and online unless you've gotten through the portal first.
Which is what pre-up was all about.

Dan

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


Re: Web login

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 09:42 -0400, Martin Owens wrote:
> On Tue, 2010-04-13 at 14:57 +0300, Peteris Krisjanis wrote:
> > Just got it - it is simple as that. Try to open any page you're sure
> > isn't accessible without authentication. It will redirect to login
> > page. If there is clear shot that is indeed login page, go ahead. If
> > not, fall back to current default - do nothing :) 
> 
> Logging in is really a second step to providing a simple boolean about
> whether the network is in such a state to begin with. Right now a
> fundamental frustration is the lack of notification and api to make
> work-flow more intelligent.
> 
> Get that in there and then we can do the more interesting auto-logging
> on functionality. We have some designs cached for how notifiers would
> work in such a situation, but NM api is holding them back.

I assume you mean something like pre-up scripts?  That's where I'd put
this sort of functionality.

Dan


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


Re: GUI thoughts: confusing menu with multiple wifi cards

2010-04-14 Thread Dan Williams
On Sun, 2010-04-11 at 05:08 +0100, Richard Neill wrote:
> Dear All,
> 
> I've used NM a bit with a machine which has multiple network cards, and 
> I thought I'd attach the following screenshot. I think that the layout 
> is rather confusing, and perhaps could be improved.
> 
> I think it's confusing because the horizontal rules appear to take 
> visual precedence over the slightly less-indented headings. Thus it 
> seems to be divided into 5 sections:

Yeah, the multi-card case is somewhat special.  But in this case, you
almost always dont' want both cards to connect to the same thing, so you
need to control the separately.

Second, as you've seen, both cards don't necessarily see the same APs.
Your iwl3945 is a/b/g, while your p54 is just b/g.  Thus we simply
shouldn't show any APs under the p54 card that are in the 5GHz band,
because the p54 can't connect to them.

Same goes for encryption capabilities, some older cards can't do
AES/CCMP, so we shouldn't show any APs for those cards that are only
WPA2 capable.

We've got various ideas for redoing the menu into a more flexible format
[1], but not a lot of time to commit to that yet.  But it's been clear
for a while that we need to focus on the UI more, since the current UI
is no longer fulfilling all the needs people have of it.

Dan

[1] http://blogs.gnome.org/dcbw/2009/05/26/face-transplants-are-the-new-botox/

> 
> 
> 1. Wired Network,Disconnected, Wireless Networks (IntelPro), Mobile, 
> Disconnect
> 
> 
> 
> 2. Mobile-Eapsim, Wireless Networks (Intersil), disconnected.
> 
> 
> 
> 3. Mobile, Mobile EAPSIM
> 
> 
> 
> 4. VPN connections
> 
> 
> 
> 5. Connect to Hidden, Connect to New
> 
> 
> If there is only one WiFi card, it's far less confusing. However the 
> screenshot attached could, imho, be much improved by a better layout.
> 
> 
> Best wishes,
> 
> Richard
> 
> 
> P.S. I seem not to be thinking very clearly - I was going to add this 
> comment as a post-script to my previous message; it then occurred to me 
> that it would be clearer in a separate thread, but added the 
> (irrelevant) attachment to the last message too - sorry for the confusion!
> ___
> 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: invalid path nma-gconf-connection

2010-04-14 Thread Sébastien Fillaudeau

Le 14/04/2010 22:31, Dan Williams a écrit :

On Sat, 2010-04-10 at 12:20 +0200, Sébastien Fillaudeau wrote:
   

Le 09/04/2010 02:04, Dan Williams a écrit :
 

On Thu, 2010-04-08 at 20:13 +0200, Sébastien Fillaudeau wrote:

   

Hi,

For my work, i try to modify the mn-applet to order connection by there
priority.

The priority for the nma-gconf-connection can be get by the path of this
connection.

 

What behavior are you trying to get here with the priorities?  NM
doesn't use priorities for a specific reason, usually because they're a
pretty bad way to interact with users.  It's not often that you have
more than one visible wifi network in the same area that you switch
between frequently; that would usually indicate bad network planning :)
There may be other ways we can adjust the behavior.

But I don't think your patch is the right way to do this.  You don't
really want to be modifying nm-connection.c or really libnm-util at all,
and you don't need to.

Just abuse the 'timestamp' option to be your priority, which NM will
already use to sort the connections.  Disable the code in nm-applet that
updates the timestamp periodically, and then add some bits in
nm-connection-editor that change the timestamp based on what the user
wants the priority to be.

Dan


   

I have a probleme when i tried to get te connection path. It seems to
have illegal caracter at the beginning of the path.

Maybe, any modification of char in gchar could cause it?

The get_path function give a char *.

If you know something about comparable error can you help me.

I search a lot about this errors and i don't found any help.

I attach the patch of my modification, maybe you could help me better if
you see the code i generated.


Thank for any help

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

 




   

I can take my situation to make an example. For my internet connection
my FAI is free.
They propose to share your internet connection by a specific wifi network.
   And if you share you can connect to other one wich share.
In my home i don't want to connect to this second limited connection.
But in my appartement for my study, i connect to it.
   So if we can set priority in applet it could be useful for case like
this, don't you think?

For you NetworkManager should'nt explicitly modify the priority?

about the code : nm-connection is the representation of system connection?
   so it is on this class i need to interacte with it ?
 

NMConnection is the representation of all connections, both system and
user.  But you shouldn't need to modify it if you're using the timestamp
for the priority.

   

timestamp is a good example but it is not a element that user by using
applet can modify
 

No, but my suggestion was to make it modifiable by the user.  NM just
uses the highest value there to pick the first network to try, so
timestamp is really a good mapping of what you're trying to do.

Dan




   
ok , i was thinking that the priority of a connection was pick up by the 
number of the folder it is in.


and timestamp was just a attribut to sort the list display for the user.

I will try using this approach

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


Re: Preconfiguring WEP keys for network manager

2010-04-14 Thread Dan Williams
On Sun, 2010-04-11 at 04:56 +0100, Richard Neill wrote:
> Dear All,
> 
> I've just joined this list, so I hope I'm asking this question in the 
> right place. What I'm trying to do is to deploy a large number of new 
> company laptops, all with the ESSID/WEP key preconfigured. We're using
> Ubuntu's Ubiquity with automatic install from a USB stick. So I need to 
> write some shell script whose effect will be that Network Mananger 
> already knows the WEP key for the default network, with no further user 
> interaction.

See my reply to your other message about system connections.

> If I put the key into /etc/network/interfaces, then on boot, the machine 
> does come up with the network connected, but as soon as it goes out of 
> range, the connection is lost, and NM is unable to reconnect.

Yes, this might happen, mainly so that NM doesn't keep reconnecting over
and over and over to an AP that you're not able to connect to.

This is a bit tricky to solve, because not every AP shows up in every
scan.  So if we clear the inhibit flag every time the AP drops out of
the scan list, we may end up trying to connect again to an AP for which
you hit the "Cancel" button when NM asked you for the passphrase.

That doesn't help you; but it's clearly something we need to fix.  I
think we do that by differentiating between a "failure" of the
connection and cancellation of the password request.  For some devices
(bluetooth, 3G) where we can't scan for something to connect to, we
treat failure as "don't try again automatically".  For wifi though, we
only set the inhibit when the user hits cancel since at that point, they
clearly don't want to connect again until they choose it from the menu.

If you're interested in helping out with a patch for this, I dont' think
it would be that hard to do, and I'll happily guide you through various
bits.

Thanks,
Dan

> The wep key simply isn't "precious" data, and I'd like to get NM to use 
> a configuration file which doesn't need unlocking, and which never 
> prompts the user. These machines will need to be remotely accessible, so 
> if the relevant Wifi is in range, the latop must automatically connect 
> to it, without waiting on the user to click OK, or authorise anything.
> 
> Is there anything I can do here?
> 
> Thanks for your help,
> 
> Richard
> 
> ___
> 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: is there any way to get NM to store WEP keys without using a keyring?

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 15:38 +0100, Richard Neill wrote:
> Dear All,
> 
> Am trying to get a set of laptops preconfigured for various wifi 
> networks and WEP keys. I've set the laptops to autologin, but now 
> gnome's keyring is prompting for a password every time, which rather 
> defeats the purpose; it also means that an unattended or remote reboot 
> will not come back online. How can I get NM to treat WEP keys as 
> "world-readable" on this computer?

You're probably looking for "system connections":

http://live.gnome.org/NetworkManager/SystemSettings

which are stored not in the user's gconf/keyring, but in your distros
normal network configuration files (or via 'keyfiles').  You could also
do this with gconf/gnome-keyring, but I don't think that's quite what
you want.

So create the connection you want in nm-connection-editor, then click
the "Available to all users" button and hit Apply. It's now a system
connection, and where it's stored depends on what plugins you have
enabled in /etc/NetworkManager/nm-system-settings.conf.

Dan


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


Re: [PATCH] [nm-applet] Fix compilation using -DGSEAL_ENABLE (bgo#615653)

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 17:24 +0200, Mirsal Ennaime wrote:
> Hello,
> 
> This patch substitutes all direct access to Gtk+ object fields
> with accessor functions in order to fulfill the UseGseal goal
> as described at http://live.gnome.org/GnomeGoals/UseGseal
> 
> It also requires to bump the required Gtk+ version to 2.18

We probably won't be able to do this until the next major version of NM
(0.9) since it's not nice to bump reqs in the middle of a stable release
stream.  I'll keep the patch around until then though.

Thanks!
Dan


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


Re: complex openvpn - can nm just launch?

2010-04-14 Thread Dan Williams
On Fri, 2010-04-09 at 09:43 +0200, Robert Vogelgesang wrote:
> Dan,
> 
> On Thu, Apr 08, 2010 at 05:15:54PM -0700, Dan Williams wrote:
> > On Tue, 2010-04-06 at 22:01 +, Alessandro Bono wrote:
> > > On Tue, 06 Apr 2010 09:25:44 -0700, Dan Williams wrote:
> > > 
> > > > On Tue, 2010-04-06 at 10:05 -0600, Scott Serr wrote:
> > > >> I have an openvpn config file that works fine with openvpn.  (ubuntu
> > > >> lucid beta)  As far as I can tell there is no way to create a like
> > > >> config in the nm openvpn editor.  I can make one somewhat similar and
> > > >> export, but it doesn't look enough like mine to work.
> > > > 
> > > > Which options?
> > > 
> > > Hi Dan
> > > 
> > > this is my (short) list of missing options/features 
> > > 
> > > - support for external dhcp on the server side, normally I configure 
> > > openvpn server to push only data that I can't provide via dhcp server. So 
> > > ip/mask/dns is taken from dhcp and additional route from openvpn
> > > This configuration works perfectly for windows machine, on certain 
> > > customer I have a dedicated openvpn only for me because I can't use 
> > > "normal" openvpn configuration :-(
> > 
> > Yeah, we need support for this internally.  Right now we pretty much
> > assume a tunnel approach, not TAP.  It's not that hard to fix that I
> > guess; but in general the real fix for this would be helped by some of
> > the activation changes that I'd like to do to fix the PPPoE issues that
> > people currently have.
> 
> I'd like to see this feature, too.  Could you please elaborate on what
> has to be done to support this?

1) add an "method" item to NetworkManagerVPN.h:

/* string: IP4 configuration method */
#define NM_VPN_PLUGIN_IP4_CONFIG_METHOD "method"

/* Values for NM_VPN_PLUGIN_IP4_CONFIG_METHOD */
#define NM_VPN_PLUGIN_IP4_CONFIG_METHOD_DHCP "dhcp"
#define NM_VPN_PLUGIN_IP4_CONFIG_METHOD_STATIC "static"

if the plugin doesn't send 'method' in the config dict, or the item is a
zero-length string, 'static' is assumed.

2) In the openvpn plugin, if we're supposed to use DHCP (is tap always
used with DHCP, or are there cases where it's not?) then we add the
NM_VPN_PLUGIN_IP4_CONFIG_METHOD item to the returned IP4 config struct
with the value "dhcp".

3) Then we need to modify nm_vpn_connection_ip4_config_get() and split
it into two functions, one for DHCP and one for static.  Take the stuff
at the bottom of that function (everything below print_vpn_config()) and
put that into a separate function that gets called by both the static
and dhcp processing bits.  So you'll have something like:

nm_vpn_connection_ip4_config_get()
{
   const char *method = "static";

   /* remove the timeout since the plugin replied */
   g_source_remove (priv->ipconfig_timeout);
   priv->ipconfig_timeout = 0;

   val = g_hash_table_lookup (config_hash, NM_VPN_PLUGIN_IP4_CONFIG_METHOD);
   if (val && G_VALUE_HOLDS_STRING (val))
   method = g_value_get_string (val);

   if (!method || !strcmp (method, NM_VPN_PLUGIN_IP4_CONFIG_METHOD_STATIC)) {
  if (handle_static_ip4_config (connection, config_hash))
  return;
   } else if (method && !strcmp (method, NM_VPN_PLUGIN_IP4_CONFIG_METHOD_DHCP)) 
{
  if (handle_dhcp_ip4_config (connection, config_hash))
  return;
   } else
   nm_log_err (LOGD_VPN, "unknown vpn IP4 method '%s', method);

/* same error stuff as at the bottom of the function now */

}

For the DHCP4 bits, we'll want to build up the NMIP4Config object as
much as possible and cache that in priv->ip4_config while DHCP is
completing.  We'll need to add a few things to teh NMVPNConnection
object's private data, like:

NMDHCPManager * dhcp_manager;
NMDHCPClient *  dhcp4_client;
gulong  dhcp4_state_sigid;
gulong  dhcp4_timeout_sigid;

(see nm-device.c for DHCP stuff).

When the NMVPNConnection is initialized, lets grab a reference to the
DHCP manager in nm_vpn_connection_init():

priv->dhcp_manager = nm_dhcp_manager_get ();

and then in handle_dhcp_ip4_config() we'll do something like:

static gboolean
handle_dhcp_ip4_config (NMVPNConnection *vpn, GHashTable *config)
{
NMVPNConnectionPrivate *priv = NM_VPN_CONNECTION_GET_PRIVATE (vpn);
NMSettingConnection *s_con;
NMSettingIP4Config *s_ip4;
const char *uuid;

ip4_config, see nm_vpn_connection_ip4_config_get() for
 how to do this>

s_con = NM_SETTING_CONNECTION (nm_connection_get_setting (priv->connection, 
NM_TYPE_SETTING_CONNECTION));
s_ip4 = NM_SETTING_IP4_CONFIG (nm_connection_get_setting (priv->connection, 
NM_TYPE_SETTING_IP4_CONFIG));
priv->dhcp4_client = nm_dhcp_manager_start_ip4 (priv->dhcp_manager,
,

nm_setting_connection_get_uuid (s_con),
s_ip4,
,
  

Re: AD-Hoc network specify channel

2010-04-14 Thread Dan Williams
On Tue, 2010-04-13 at 21:36 +0200, Simon Schampijer wrote:
> Hi,
> 
> I am trying to create an Ad-Hoc Network with a specific channel. From 
> the spec [1] I know that I have to set the band as well. However the 
> created network always has channel 1. The nm-applet does not have an 
> option to set the channel, and is using channel one, too.
> 
> Using iwconfig to create an Ad-Hoc network I can set a channel fine. Is 
> it fully implemented or do I miss something else?

It should be, though it's likely not possible if you're using
nm-connection-editor since the channel/band aren't accessible there.
But looking at it now, they *should* be accessible for ad-hoc
connections.  So we'll need to whip up some code for page-wifi.c to
hide/show them when ad-hoc is selected.

(this is because wpa_supplicant only has the ability to set the channel
for ad-hoc networks, not a limitation in NM.  wpa_supplicant does not
have the ability to set a band limitation for infrastructure networks,
which means we can't let users limit particular connection to only
802.11a for example)

See nm_supplicant_config_add_setting_wireless() in NM for where the
frequency gets sent to the supplicant, and build_supplicant_config() for
where the channel/band get translated into a frequency.

Also check nm_ap_new_fake_from_connection() to ensure that the frequency
is getting correctly set on the fake AP.

This all should work as long as the connection dict has the band/freq
specified.

Dan


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


Re: gobbledegook in iwconfig after NM disconnect

2010-04-14 Thread Dan Williams
On Sun, 2010-04-11 at 05:20 +0100, Richard Neill wrote:
> Dear All,
> 
> Not sure if this is a bug, but if I disconnect a wireless interface from 
> network manager, the result of iwconfig's ESSID becomes gibberish.
> I have no idea where the value of
>  
> \x90\xef\xfd\x...@dub5\xab3q8\xe2\xcf\xdc\x8db+\xa3\x9f\x1d\xaa1\x82\xa4\xfa\xdczsl
> comes from, or what it means!

The Linux Wireless Extensions API (the older API that programs use to
control wifi) doesn't have a clean way to say "Disconnect and stop doing
anything until I tell you."  This random SSID is done by wpa_supplicant
when disconnecting from the network to ensure that the driver/firmware
does not attempt to automatically connect to anything else until it's
told to do so.  It's not anything that NM is doing, and it's normal.

The new kernel wireless API (cfg80211) has fixed this problem by
properly including a "disassociate" command that idles the device.

If you've told NM (or the card) to disconnect, you probably did mean for
it to disconnect.  Without this random SSID the card (depending on the
driver or firmware) may well attempt to connect to some SSID that you
didn't want it to.

Dan

> Here is an example:
> 
> 1. While NM is connected to the network
> 
> $ iwconfig wlan0
> wlan0 IEEE 802.11abg  ESSID:"26PPWG602"
>Mode:Managed  Frequency:2.427 GHz  Access Point:
>   00:0C:F6:7E:FA:18
>Bit Rate=54 Mb/s   Tx-Power=15 dBm
>Retry  long limit:7   RTS thr:off   Fragment thr:off
>Power Management:off
>Link Quality=65/70  Signal level=-45 dBm
>Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
>Tx excessive retries:0  Invalid misc:0   Missed beacon:0
> 
> 
> 2. Immediately after disconnecting the Wifi, via the NM gui
> 
> $ iwconfig wlan0
> wlan0 IEEE 802.11abg  ESSID:"\x90\xef\xfd\x...@dub5\xab3q8\xe2\xcf
>   \xDC\x8Db+\xA3\x9F\x1D\xAA1\x82\xA4\xFA\xDCZsl"
>Mode:Managed  Frequency:2.427 GHz  Access Point:
>   Not-Associated
>Tx-Power=15 dBm
>Retry  long limit:7   RTS thr:off   Fragment thr:off
>Power Management:off
> 
> 
> 3. After running ifconfig wlan0 down
> 
> $ iwconfig wlan0
> 
> wlan0 IEEE 802.11abg  ESSID:off/any
>Mode:Managed  Frequency:2.427 GHz  Access Point:   
>   Not-Associated
>Tx-Power=15 dBm
>Retry  long limit:7   RTS thr:off   Fragment thr:off
>Power Management:off
> 
> 
> ___
> 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: invalid path nma-gconf-connection

2010-04-14 Thread Dan Williams
On Sat, 2010-04-10 at 12:20 +0200, Sébastien Fillaudeau wrote:
> Le 09/04/2010 02:04, Dan Williams a écrit :
> > On Thu, 2010-04-08 at 20:13 +0200, Sébastien Fillaudeau wrote:
> >
> >> Hi,
> >>
> >> For my work, i try to modify the mn-applet to order connection by there
> >> priority.
> >>
> >> The priority for the nma-gconf-connection can be get by the path of this
> >> connection.
> >>  
> > What behavior are you trying to get here with the priorities?  NM
> > doesn't use priorities for a specific reason, usually because they're a
> > pretty bad way to interact with users.  It's not often that you have
> > more than one visible wifi network in the same area that you switch
> > between frequently; that would usually indicate bad network planning :)
> > There may be other ways we can adjust the behavior.
> >
> > But I don't think your patch is the right way to do this.  You don't
> > really want to be modifying nm-connection.c or really libnm-util at all,
> > and you don't need to.
> >
> > Just abuse the 'timestamp' option to be your priority, which NM will
> > already use to sort the connections.  Disable the code in nm-applet that
> > updates the timestamp periodically, and then add some bits in
> > nm-connection-editor that change the timestamp based on what the user
> > wants the priority to be.
> >
> > Dan
> >
> >
> >> I have a probleme when i tried to get te connection path. It seems to
> >> have illegal caracter at the beginning of the path.
> >>
> >> Maybe, any modification of char in gchar could cause it?
> >>
> >> The get_path function give a char *.
> >>
> >> If you know something about comparable error can you help me.
> >>
> >> I search a lot about this errors and i don't found any help.
> >>
> >> I attach the patch of my modification, maybe you could help me better if
> >> you see the code i generated.
> >>
> >>
> >> Thank for any help
> >>
> >> Sebastien
> >> ___
> >> networkmanager-list mailing list
> >> networkmanager-list@gnome.org
> >> http://mail.gnome.org/mailman/listinfo/networkmanager-list
> >>  
> >
> >
> >
> >
> I can take my situation to make an example. For my internet connection 
> my FAI is free.
> They propose to share your internet connection by a specific wifi network.
>   And if you share you can connect to other one wich share.
> In my home i don't want to connect to this second limited connection. 
> But in my appartement for my study, i connect to it.
>   So if we can set priority in applet it could be useful for case like 
> this, don't you think?
> 
> For you NetworkManager should'nt explicitly modify the priority?
> 
> about the code : nm-connection is the representation of system connection?
>   so it is on this class i need to interacte with it ?

NMConnection is the representation of all connections, both system and
user.  But you shouldn't need to modify it if you're using the timestamp
for the priority.

> timestamp is a good example but it is not a element that user by using 
> applet can modify

No, but my suggestion was to make it modifiable by the user.  NM just
uses the highest value there to pick the first network to try, so
timestamp is really a good mapping of what you're trying to do.

Dan


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


is there any way to get NM to store WEP keys without using a keyring?

2010-04-14 Thread Richard Neill

Dear All,

Am trying to get a set of laptops preconfigured for various wifi 
networks and WEP keys. I've set the laptops to autologin, but now 
gnome's keyring is prompting for a password every time, which rather 
defeats the purpose; it also means that an unattended or remote reboot 
will not come back online. How can I get NM to treat WEP keys as 
"world-readable" on this computer?


Thanks,

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


RE: Web login

2010-04-14 Thread Mattias Bengtsson

> > Just got it - it is simple as that. Try to open any page you're sure
> > isn't accessible without authentication. It will redirect to login
> > page. If there is clear shot that is indeed login page, go ahead. If
> > not, fall back to current default - do nothing :)
> 
> 
> bool requiresWebLogin()
> {
> return (http://www.google.com
>  == http://www.yahoo.com/
>  == http://www.hotmail.com/ )
> }
> 
> Something like that.
> 

I think Dan was against this sort of functionality. I think he referred to some 
netgear routers that autoconnected to some hosts on startup or something. A 
sort of unintentional DoS. Search the archives.
Some at least slightly more likely URLs then google, yahoo and hotmail are 
"http://www.canonical.com/nmtest"; for ubuntu and "www.redhat.com/nmtest" for 
fedora etc etc. 

/Mattias - lurking here for like 3 years
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: No connect pop-up for PPTP VPN

2010-04-14 Thread Dan Williams
On Wed, 2010-04-14 at 13:44 -0400, Matthew Saltzman wrote:
> When I connect to my VPNC VPN, a pop-up notifies me of the successful
> connection.  When I connect to my PPTP VPN, there is no similar
> notification--the orbit animation stops and the lock appears, but that's
> the only indication that the connection is complete.

That's because only vpnc has the ability to send a "banner" along with
the connection.  Neither PPTP or openvpn have this ability.  But the
applet should really just show something even if there isnt' a banner.

Dan


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


No connect pop-up for PPTP VPN

2010-04-14 Thread Matthew Saltzman
When I connect to my VPNC VPN, a pop-up notifies me of the successful
connection.  When I connect to my PPTP VPN, there is no similar
notification--the orbit animation stops and the lock appears, but that's
the only indication that the connection is complete.
-- 
Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: NM 0.8 can't connect to PEAP

2010-04-14 Thread Nelson Marques
On Wed, 2010-04-14 at 11:19 -0400, Matthew Saltzman wrote:
> On Tue, 2010-04-06 at 19:34 -0400, Matthew Saltzman wrote:
> > > I found and fixed the continuous asking for the password even when
> > > "Always ask" wasn't checked.  
> > 
> > That's not in NM-0.8.0-4.git20100325.fc12 I suppose.  I'll look
> > forward
> > to testing the next update in F12 updates-testing.
> 
> Indeed, I grabbed NetworkManager-0.8.0-6.git20100408.fc12.x86_64 from
> updates-testing, and that seems to fix the password problem.

I had a similar problem that got fixed by changing the username. My
credientials are for the university infra-structure and instead of using
the normal login:

 XX 

 I've used: xxx...@domain.tld

 And somehow it went through smoothly.

> 
> > 
> > Thanks!
> > 
> > > I could not reproduce the missing CA
> > > certificate issue though.
> 
> I couldn't either with this package (though I've only tried once so
> far).  I also have a colleague here (Bill Moss) who insists that he's
> never had that problem.  Must be some bizarre interaction effect with
> something, I guess.  (I also had a hard-disk crash in the interim that
> took out my home directory, so who knows what else has changed.)


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


[PATCH] [nm-applet] Fix compilation using -DGSEAL_ENABLE (bgo#615653)

2010-04-14 Thread Mirsal Ennaime
Hello,

This patch substitutes all direct access to Gtk+ object fields
with accessor functions in order to fulfill the UseGseal goal
as described at http://live.gnome.org/GnomeGoals/UseGseal

It also requires to bump the required Gtk+ version to 2.18

-- 
Mirsal
From 53e95da9a186dcc21cbcaccfee4e506deab65847 Mon Sep 17 00:00:00 2001
From: Mirsal Ennaime 
Date: Tue, 13 Apr 2010 15:46:13 +0200
Subject: [PATCH] Fix compilation using -DGSEAL_ENABLE

This patch substitutes all direct access to Gtk+ object fields
with accessor functions in order to fulfill the UseGseal goal
as described at http://live.gnome.org/GnomeGoals/UseGseal

It also requires to bump the required Gtk+ version to 2.18
---
 configure.ac  |2 +-
 src/applet-device-gsm.c   |8 
 src/applet-device-wifi.c  |3 ++-
 src/applet-device-wired.c |2 +-
 src/applet-dialogs.c  |   20 +---
 src/applet.c  |   15 +--
 src/utils/nma-bling-spinner.c |   21 +
 src/wireless-dialog.c |4 ++--
 8 files changed, 41 insertions(+), 34 deletions(-)

diff --git a/configure.ac b/configure.ac
index a928b6a..97351fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -77,7 +77,7 @@ PKG_CHECK_MODULES(NMA,
 		 libnm-glib >= 0.8
 		 libnm-util >= 0.8
 		 libnm-glib-vpn >= 0.8
-		 gtk+-2.0 >= 2.14
+		 gtk+-2.0 >= 2.18
 		 libglade-2.0
 		 gmodule-export-2.0
 		 gconf-2.0
diff --git a/src/applet-device-gsm.c b/src/applet-device-gsm.c
index 939a4a7..a88168c 100644
--- a/src/applet-device-gsm.c
+++ b/src/applet-device-gsm.c
@@ -723,16 +723,16 @@ ask_for_pin_puk (NMDevice *device,
 	else if (!strcmp (secret_name, NM_SETTING_GSM_PUK))
 		w = gtk_label_new (_("PUK code is needed for the mobile broadband device"));
 	if (w)
-		gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
+		gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), w, TRUE, TRUE, 0);
 
 	dev_str = g_strdup_printf ("%s", utils_get_device_description (device));
 	w = gtk_label_new (NULL);
 	gtk_label_set_markup (GTK_LABEL (w), dev_str);
 	g_free (dev_str);
-	gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), w, TRUE, TRUE, 0);
 
 	w = gtk_alignment_new (0.5, 0.5, 0, 1.0);
-	gtk_box_pack_start (GTK_BOX (dialog->vbox), w, TRUE, TRUE, 0);
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (dialog)), w, TRUE, TRUE, 0);
 
 	box = GTK_BOX (gtk_hbox_new (FALSE, 6));
 	gtk_container_set_border_width (GTK_CONTAINER (box), 6);
@@ -749,7 +749,7 @@ ask_for_pin_puk (NMDevice *device,
 	g_signal_connect (w, "changed", G_CALLBACK (pin_entry_changed), ok_button);
 	pin_entry_changed (GTK_EDITABLE (w), ok_button);
 
-	gtk_widget_show_all (dialog->vbox);
+	gtk_widget_show_all (gtk_dialog_get_content_area (dialog));
 	return GTK_WIDGET (dialog);
 }
 
diff --git a/src/applet-device-wifi.c b/src/applet-device-wifi.c
index bc82afd..19c239f 100644
--- a/src/applet-device-wifi.c
+++ b/src/applet-device-wifi.c
@@ -58,7 +58,8 @@ show_ignore_focus_stealing_prevention (GtkWidget *widget)
 {
 	gtk_widget_realize (widget);
 	gtk_widget_show (widget);
-	gtk_window_present_with_time (GTK_WINDOW (widget), gdk_x11_get_server_time (widget->window));
+	gtk_window_present_with_time (GTK_WINDOW (widget),
+		gdk_x11_get_server_time (gtk_widget_get_window (widget)));
 }
 
 static void
diff --git a/src/applet-device-wired.c b/src/applet-device-wired.c
index 7f10e57..b1649cd 100644
--- a/src/applet-device-wired.c
+++ b/src/applet-device-wired.c
@@ -569,7 +569,7 @@ pppoe_get_secrets (NMDevice *device,
 	w = gtk_dialog_add_button (GTK_DIALOG (info->dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
 	info->ok_button = w;
 
-	gtk_box_pack_start (GTK_BOX (GTK_DIALOG (info->dialog)->vbox),
+	gtk_box_pack_start (GTK_BOX (gtk_dialog_get_content_area (GTK_DIALOG (info->dialog))),
 	glade_xml_get_widget (xml, "DslPage"),
 	TRUE, TRUE, 0);
 
diff --git a/src/applet-dialogs.c b/src/applet-dialogs.c
index 5b891d0..b2140c7 100644
--- a/src/applet-dialogs.c
+++ b/src/applet-dialogs.c
@@ -564,7 +564,8 @@ applet_info_dialog_show (NMApplet *applet)
 	g_signal_connect (dialog, "delete-event", G_CALLBACK (gtk_widget_hide_on_delete), dialog);
 	g_signal_connect_swapped (dialog, "response", G_CALLBACK (gtk_widget_hide), dialog);
 	gtk_widget_realize (dialog);
-	gtk_window_present_with_time (GTK_WINDOW (dialog), gdk_x11_get_server_time (dialog->window));
+	gtk_window_present_with_time (GTK_WINDOW (dialog),
+		gdk_x11_get_server_time (gtk_widget_get_window (dialog)));
 }
 
 static void 
@@ -697,7 +698,8 @@ applet_warning_dialog_show (const char *message)
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Missing resources"));
 	gtk_widget_realize (dialog);
 	gtk_widget_show (dialog);
-	gtk_window_present_with_time (GTK_WINDOW (dialog), gdk_x11_get_server_time (dialog->window));
+	gtk_window_present_with_time (GTK_

Re: NM 0.8 can't connect to PEAP

2010-04-14 Thread Matthew Saltzman
On Tue, 2010-04-06 at 19:34 -0400, Matthew Saltzman wrote:
> > I found and fixed the continuous asking for the password even when
> > "Always ask" wasn't checked.  
> 
> That's not in NM-0.8.0-4.git20100325.fc12 I suppose.  I'll look
> forward
> to testing the next update in F12 updates-testing.

Indeed, I grabbed NetworkManager-0.8.0-6.git20100408.fc12.x86_64 from
updates-testing, and that seems to fix the password problem.

> 
> Thanks!
> 
> > I could not reproduce the missing CA
> > certificate issue though.

I couldn't either with this package (though I've only tried once so
far).  I also have a colleague here (Bill Moss) who insists that he's
never had that problem.  Must be some bizarre interaction effect with
something, I guess.  (I also had a hard-disk crash in the interim that
took out my home directory, so who knows what else has changed.)
-- 
Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs
___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


Re: Web login

2010-04-14 Thread Martin Owens
On Tue, 2010-04-13 at 14:57 +0300, Peteris Krisjanis wrote:
> Just got it - it is simple as that. Try to open any page you're sure
> isn't accessible without authentication. It will redirect to login
> page. If there is clear shot that is indeed login page, go ahead. If
> not, fall back to current default - do nothing :) 

Logging in is really a second step to providing a simple boolean about
whether the network is in such a state to begin with. Right now a
fundamental frustration is the lack of notification and api to make
work-flow more intelligent.

Get that in there and then we can do the more interesting auto-logging
on functionality. We have some designs cached for how notifiers would
work in such a situation, but NM api is holding them back.

Best Regards, Martin Owens

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