Commit Graph

8762 Commits

Author SHA1 Message Date
Dan Williams
10b32be37b ifcfg-rh: various VLAN cleanups
Add some testcases checking for DEVICE/PHYSDEV/VLAN_ID variations,
and read/write the new VLAN_ID tag, which we can use in
combination with the 'parent' property to determine the interface
name if no interface name/DEVICE is given.
2012-03-01 17:40:17 -06:00
Dan Williams
e52bf5e172 libnm-util: add 'parent' property to VLAN setting 2012-03-01 17:39:36 -06:00
Thomas Graf
cf597e698a ifcfg-rh: writer support for bonding connections
For bonding-master:
  TYPE=bond
  BONDING_MASTER=yes
  DEVICE=<NAME>
  BONDING_OPTS="..."

For bonding-slaves:
  MASTER=<NAME>

v2: Resolved test failures after feedback from Jirka.

Signed-off-by: Thomas Graf <tgraf@redhat.com>
2012-03-01 17:32:51 -06:00
Colin Walters
a3ca1f8e17 build: wifi: add missing builddir to INCLUDES
Necessary when building from git srcdir != builddir.
2012-03-01 13:54:49 -06:00
Jiri Popelka
64753b9b3a trivial: fix unused variable ‘priv’ 2012-03-01 12:37:19 -06:00
Jiří Klimeš
ff0e71607d build: fix build 2012-03-01 17:48:31 +01:00
Dan Williams
57d8ab0ae7 wifi: add forgotten makefile 2012-03-01 08:52:08 -06:00
Dan Williams
ca3c39abd3 wifi: let WEXT be disabled with --with-wext=no
It's still enabled by default if you don't pass --with-wext=no.
But now it's possible to build without WEXT entirely.
2012-02-29 23:11:04 -06:00
Dan Williams
aef4340ec4 libnm-glib: ensure device state is updated when it changes
NM emits coalesced PropertiesChanged signals, which might be
delayed slightly and thus sent after the StateChanged signal
for devices.  Clients of libnm-glib listening for the
'state-changed' signal and then querying the state manually
using nm_device_get_state() would still see the old state until
it was updated via the delayed PropertiesChanged signal
processing.  Since when the StateChanged signal comes in the
device is already in the new state, just update the state and
leave the GObject property notify signal to the
PropertiesChanged signal handling code so that clients have
an accurate device state.
2012-02-28 12:47:04 -06:00
Yuri Chornoivan
6fe615bef5 po: updated Ukranian translation (bgo #670222) 2012-02-28 12:36:11 +01:00
Gabor Kelemen
0489c803e9 po: updated Hungarian translation (bgo #670179) 2012-02-28 12:31:11 +01:00
Matej Urbančič
85a25e9b60 po: updated Slovenian translation (bgo #670634) 2012-02-28 12:23:48 +01:00
Mohammed Sadiq
64672bb5c4 po: updated Malayalam translation (bgo #670742) 2012-02-28 12:16:42 +01:00
Piotr Drąg
af27e5908b po: updated Polish translation (bgo #670765) 2012-02-28 11:58:00 +01:00
Henrique P. Machado
d0191e62fa po: updated Brazilian Portuguese translation (bgo #670808) 2012-02-28 11:01:47 +01:00
Jiří Klimeš
ff249e871f libnm-glib: add NMDeviceOlpcMesh 2012-02-28 10:29:03 +01:00
Dan Williams
51e0cf5f0f release: update TODO with enhanced connectivity check ideas 2012-02-27 11:07:53 -06:00
Dan Williams
f828785428 man: update manpage for connectivity checking options 2012-02-27 10:56:51 -06:00
Dan Williams
330eb2f74b core: additional connectivity checking debug messages 2012-02-27 10:56:51 -06:00
Dan Williams
5937861ca7 core: fix up connectivity state checks
We want to start the connectivity checks when any device gets
activated, and stop them when all devices get deactivated.  We
also want to make sure it's running if a device gets deactivated
but other devices are still active.  If multiple devices are
activated and if the default device gets deactivated, the other
device may become the default device and we'll need a connectivity
check for that device since we can't do per-device checks yet.

Also, if connectivity checking is enabled at compile-time but
not enabled at runtime, the connectivity bits should always
report "connected" to preserve previous behavior, and this code
makes it clearer how that is handled.
2012-02-27 10:56:51 -06:00
Dan Williams
d47072a1a1 core: clean up and simplify connectivity check
We can just use property notifications instead of having
a separate connected signal.  Also clean up some formatting
and make some private variable names shorter.
2012-02-27 10:56:51 -06:00
Dan Williams
d62f712d6e core: bound connectivity check operations with a socket timeout 2012-02-27 10:56:51 -06:00
Dan Williams
2619c017dd core: make connectivity checking selectable at build-time
Just in case you really don't want to install libsoup.
2012-02-27 10:56:51 -06:00
Dan Williams
7703170673 core: connectivity check cleanups; check response headers too
Clean up some memleaks and fix some possible lifecycle issues
for strings.  Also add a short-circuit check using the HTTP
headers.
2012-02-27 10:56:51 -06:00
Dan Williams
854c2894c4 trivial: whitespace and formatting cleanups 2012-02-27 10:56:51 -06:00
Thomas Bechtold
267bc993a7 core: add internet connectivity check
* use libsoup to compare a http response from a given
  uri with a given response (use g_str_has_prefix () to compare)
* do periodically check the connectivity. Check interval is configurable
* check connectivity when device state change
  from/to NM_DEVICE_STATE_ACTIVATED
2012-02-27 10:56:51 -06:00
Jiří Klimeš
5ea7e6086a core: use glib's CLAMP() macro to simplify ipv6_privacy boundary check 2012-02-27 16:42:07 +01:00
Jiří Klimeš
d376270bfe core: add support for IPv6 Privacy Extensions for SLAAC (RFC4941) (bgo #633233) 2012-02-27 16:35:19 +01:00
Jiří Klimeš
96378dfa82 backends: add a function reading systemwide IPv6 Privacy Extensions configuration
It is distro-specific, but mostly it's net.ipv6.conf.default.use_tempaddr
in /etc/sysctl.conf
2012-02-27 16:28:41 +01:00
Jiří Klimeš
88dc641e6e ifcfg-rh: read/write IPV6_PRIVACY and IPV6_PRIVACY_PREFER_PUBLIC_IP 2012-02-27 16:28:25 +01:00
Jiří Klimeš
788720abec libnm-util: add a property for IPv6 Privacy Extensions to NMSettingIP6Config
ip6-privacy
2012-02-27 16:28:11 +01:00
Jiří Klimeš
785b6fb807 utils: more flexible reading of /proc/sys/net
- changes nm_utils_get_proc_sys_net_value() to allow all values, not just 0,1
- adds nm_utils_get_proc_sys_net_value_with_bounds() for limiting valid values
2012-02-27 16:27:44 +01:00
Jiří Klimeš
23b73b1354 supplicant: fix an error in demarshalling object path
This message was printed:
GLib-GObject-CRITICAL **: g_value_get_string: assertion `G_VALUE_HOLDS_STRING (value)' failed
It showed out it came from g_cclosure_marshal_VOID__STRING() in BSSRemoved signal.
The signal parameter is object path, so use g_cclosure_marshal_VOID__BOXED instead.
2012-02-27 16:17:13 +01:00
Jiří Klimeš
1e8448e377 wifi: fix a crash when nm_ap_get_supplicant_path() returns NULL
nm_ap_get_supplicant_path() can return NULL, so handle the return value
correctly while using it.
2012-02-27 16:13:59 +01:00
Dan Williams
e41218caaa ifnet: misc fixes (constness, error initialization) (bgo #670508) 2012-02-25 20:50:29 -06:00
Mu Qiao
4641649cc1 ifnet: backup configuration files before writing (bgo #670508) 2012-02-25 20:50:27 -06:00
Mu Qiao
cd867534da ifnet: remove wep_tx_keyidx only when necessary (bgo #670508)
Always removing wep_tx_keyidx will cause wpa_supplicant.conf being
written even if nothing has been changed. Now it will be removed only
when wep is not used anymore.
2012-02-25 20:50:24 -06:00
Mu Qiao
28047305db ifnet: fix IP comparison (bgo #670508)
IP comparison was not working due to different IP formats. Now this is
fixed.
2012-02-25 20:50:18 -06:00
Dan Williams
750cb8bb89 ifnet: add testcase for # in passphrase (bgo #670381) 2012-02-25 20:33:00 -06:00
Alexandre Rostovtsev
3feb769efa ifnet: do not truncate WPA passwords at '#' character (bgo #670381)
We need to do the same thing as wpa_supplicant's own config file parser
and ignore '#' characters that occur between the first and last '"'
characters in a config file line.

https://bugzilla.gnome.org/show_bug.cgi?id=670381
2012-02-25 20:32:39 -06:00
Weiping Pan
e8ffca398f ifcfg-rh: add "VLAN=yes" in ifcfg
Check "VLAN=yes" if "TYPE=Vlan" is missing.
They have the same meaning.

This patch is based on NM/vlan branch,
commit 703196fcdb96ad0d4bf8dac572235e65ba02e844

Signed-off-by: Weiping Pan <wpan@redhat.com>
2012-02-24 14:35:15 -06:00
Weiping Pan
0878546df0 vlan: add compatible functions for libnl1
If we want to support vlan without libnl3,
then we can use ioctl.

Changelog:
V2: fix identation and comments.

Signed-off-by: Weiping Pan <wpan@redhat.com>
2012-02-24 14:31:41 -06:00
Priit Laes
4fdc64a8c5 Makefile.glib: Fix locale-specific issues
When using Estonian (et_EE) locale, 'a-z' range skips 'tuv...'

https://bugzilla.gnome.org/show_bug.cgi?id=654395
2012-02-24 08:17:38 -05:00
Thomas Bechtold
015fe77b2c core: add missing system includes
for:
open(2), close(2), etc.
for types like ssize_t
2012-02-24 12:10:35 +01:00
Dan Williams
2735205eb0 core: remove invalid bond MAC address filter
There's no way to specify the MAC address bond interfaces have
since they take the MAC address of their slaves, so NMDeviceBond
doesn't implement hwaddr_matches().  This check would always
return FALSE, and thus we'd never match.
2012-02-23 00:04:00 -06:00
Dan Williams
0109ed62e9 core: const-ify nm_device_wired_get_hwaddr() 2012-02-23 00:03:50 -06:00
Colin Walters
74ec56d956 build: fix srcdir != builddir for new generated headers 2012-02-22 16:27:28 -06:00
Dan Williams
7902787263 wifi: fix compatibility with wpa_supplicant 0.7.x
The standard D-Bus PropertiesChanged signals are only in 1.0 and
later, so we also have to listen to the deprecated signals for
older supplicant versions.  We can revert this commit when we
drop support for wpa_supplicant 0.7.x.
2012-02-22 14:45:19 -06:00
Dan Winship
258d0b397c libnm-util: fix a docs typo 2012-02-21 11:22:24 -05:00
Dan Williams
92412357c3 wifi: ensure APs remain in scan list when supplicant updates them
The port to the new supplicant D-Bus API for NM 0.9 had one unfinished
piece, which was to remove old APs from the scan list when the
supplicant returned no scan results or there was a scan error.  In
this case, the removal code would not be called.  This wasn't much
of a problem until 836f7d177e which
began removing APs from the scan list correctly in this case.

This uncovered a bug in NM's wpa_supplicant management code, which
was that NM only updates its internal AP object 'last seen' timestamp
when the AP is reported by the supplicant as a completely new BSS
(in merge_scanned_ap()).  But the new supplicant D-Bus interface
only reports the BSS as "new" when the supplicant doesn't know about
the BSS, either because it is a new BSS or because it's been removed
from the supplicant's scan list at some point in the past.

Thus for BSSes that are consistently kept in the supplicant's scan
list, because the wifi driver is actually doing its job and reporting
them consistently in scan results, NM would not be updating the
'last seen' value for the corresponding NM AP objects.  Due to
836f7d177e this would cause APs that
should be kept to be removed from the NM scan list.

To fix this, have the NMAccessPoint object track which supplicant
dbus object it came from, and have NMSupplicantInterface listen for
PropertyChanged signals for those APs the supplicant knows about.
When something changes (like signal strength as the result of updated
scan results) update the AP's 'last seen' timestamp since it clearly
still exists in the scan list.  This way we update the timestamp both
when the supplicant finds a new AP and when it updates the properties
of existing APs.
2012-02-20 15:06:05 -06:00