Commit Graph

10267 Commits

Author SHA1 Message Date
Christian Kirbach
258e3cfdf4 po: update German (de) translation (bgo #730330)
https://bugzilla.gnome.org/show_bug.cgi?id=730330

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-23 11:19:10 +02:00
Dan Williams
b1d2b14922 core: fix use-after-free in pending action remove debug message 2014-05-22 11:34:58 -05:00
Dan Williams
2af30e813a docs: clarify some uses of nm_active_connection_get_connection() 2014-05-22 09:07:57 -05:00
Jiří Klimeš
5aefa120f8 contrib/rpm: own some missing directories (rh #1099789)
https://bugzilla.redhat.com/show_bug.cgi?id=1099789

Based on hint from jpopelka@redhat.com
2014-05-21 16:23:23 +02:00
Thomas Haller
0d09472e45 contrib/rpm: adjust required bluez version in SPEC file for NetworkManager-bluetooth plugin
rhel-7.0 comes with bluez4, not bluez5

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-20 13:58:49 +02:00
Dan Williams
93fb403e10 contrib/rpm: clean up dependencies and plugins in NetworkManager.spec
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 18:55:59 +02:00
Dan Winship
6661531062 devices: fix link-changed refactoring
Thomas points out that the previous refactoring moved the
link_changed() virtual method invocation relative to
update_for_ip_ifname_change(), which could have weird side effects
given the things that can happen there. So move it back.
2014-05-19 09:58:11 -04:00
Thomas Haller
e3221e6a12 platform: merge branch 'th/bgo726273_platform_delete_ip4_route_workaround'
https://bugzilla.gnome.org/show_bug.cgi?id=726273

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 15:26:00 +02:00
Thomas Haller
019bf7512d platform: improve workaround for deleting IPv4 route with libnl guessing route scope
Previously, we always lookup the cache for libnl objects and used those for
delete_object(). This was necessary, because libnl guesses and overwrites
the IPv4 route scope.

Newer libnl no longer overwrites the scope if set explicitly to RT_SCOPE_NOWHERE.
So, this workaround is no longer needed. Indeed there might be cases, where it is
harmful, because we might guess the wrong scope.

This was fixed in libnl3 in commits
  85ec9c7ad8
  015c4ee59b

https://bugzilla.gnome.org/show_bug.cgi?id=726273

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 15:22:50 +02:00
Thomas Haller
ff801bcafc platform: add function _nl_has_capability() to access nl_has_capability() dynamically
The libnl function nl_has_capability() was only added recently, so don't depend on it
at compile time. Instead use dlopen to load the function if the libnl library contains it.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 15:22:46 +02:00
Tore Anderson
c2e99b181f contrib/rpm: force POSIX changelog date locale
Ensure the date in the generated changelog entry is in the POSIX locale
format. Otherwise rpmbuild might fail with "bad date in %changelog" due
to it not liking localised date formats.

https://mail.gnome.org/archives/networkmanager-list/2014-May/msg00034.html

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-19 14:51:48 +02:00
Dan Winship
950d9fff26 devices: refactor the link-changed code
Separate out the "ifindex changed" and "ip_ifindex changed" cases.
2014-05-19 08:25:56 -04:00
Dan Winship
01b7bef6b4 devices: improve slave release log messages
Rather than putting "success %d" in the message, log different
messages (at different priorities) for success and failure.
2014-05-19 08:24:54 -04:00
Dan Winship
c48ba1ab10 devices: fix "slaves" property notification in release_slaves
Bond, bridge, and team were notifying their "slaves" properties before
the slave actually got removed from priv->slaves, meaning that
anything that looked at the property directly from a notify::slaves
handler would see the old value. Fix that.
2014-05-19 08:24:54 -04:00
Dan Winship
1f22c8859a devices: flip the ordering of priv->slaves
Keep priv->slaves in the order that slaves were attached, rather than
in reverse order.

Among other things, this makes the errors from
nm_device_master_check_slave_physical_port() more consistent.
2014-05-19 08:24:54 -04:00
Jiří Klimeš
0b2f4979b1 trivial: remove empty 'vim' file accidentally added by e8f5a82 2014-05-16 09:15:32 +02:00
Jiří Klimeš
2b37ee2b7a cli: fix completion of interfaces in editor for "activate" command 2014-05-15 13:43:02 +02:00
Jiří Klimeš
e8f5a82e22 cli: fix ambiguity of "o" (on vs off) in nmc_string_to_bool() 2014-05-15 09:50:52 +02:00
Thomas Haller
66164c480d contrib/rpm: update build_clean.sh script to work with older version of git
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 15:19:24 +02:00
Thomas Haller
08e8b3bd13 contrib/rpm: update spec file adding new wifi plugin NetworkManager-wifi
Commit a544aa374e extracts the wifi device
into a shared library. Update the (currently broken) default spec file to
build the new package NetworkManager-wifi.

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 14:31:57 +02:00
Thomas Haller
a2430f01d6 contrib/rpm: update spec file to exclude disabled plugin files
When plugins are disabled (which is configurable), the additional files
must be excluded. Otherwise rpmbuild fails with:
  Installed (but unpackaged) file(s) found:

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 14:31:02 +02:00
Thomas Haller
61568befd5 wwan: fix broken wwan plugin due to undefined symbol
Regression, introduced by 4a58ff0807.

Fixes error loading the wwan plugin:
  <warn> (libnm-device-plugin-wwan.so): failed to load plugin: /usr/lib64/NetworkManager/libnm-device-plugin-wwan.so: undefined symbol: nm_modem_manager_get_type

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-14 14:20:31 +02:00
Dan Williams
c97e1dd507 merge: device plugin cleanups and symbol visibility (bgo #728432)
https://bugzilla.gnome.org/show_bug.cgi?id=728432
2014-05-13 15:32:03 -05:00
Dan Williams
795d1d8a82 wimax: implement plugin symbol visibility
The only public symbols should be the factory functions.
2014-05-13 13:50:25 -05:00
Dan Williams
84c60a1f2d adsl: implement plugin symbol visibility
The only public symbols should be the factory functions.
2014-05-13 13:50:25 -05:00
Dan Williams
429d492ccf bluez: implement plugin symbol visibility
The only public symbols should be the factory functions.
2014-05-13 13:50:25 -05:00
Dan Williams
4a58ff0807 wwan: implement plugin symbol visibility
For the factory, the only public symbols should be the factory functions.

For the WWAN library, the only public symbols should be those that
NMDeviceModem and NMDeviceBt use.
2014-05-13 13:50:25 -05:00
Dan Williams
e62ac0d469 devices: simplify plugin type checking
Instead of having a GObject property and a factory function to get
the plugin's device type, just use the factory function, since it
always has to be around.
2014-05-13 13:50:25 -05:00
Dan Williams
92be78c905 core: log when creating Generic device when a plugin is missing
Log when a plugin is missing for link types that should have plugins.
2014-05-13 13:50:25 -05:00
Dan Williams
d877551d0a wimax: recognize WiMAX devices as Generic if no WiMAX plugin is loaded 2014-05-13 13:50:25 -05:00
Thomas Haller
bb7517181f platform: assert libnl alloc functions against out of memory
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-13 13:50:25 -05:00
Thomas Haller
c714f7ad53 core: refactor to return const GSList * from nm_manager_get_devices()
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-13 13:50:25 -05:00
Dan Williams
454cc0a168 docs: ignore private nm-test-utils.h header 2014-05-13 13:49:50 -05:00
Dan Williams
a544aa374e merge: make Wi-Fi/OLPC Mesh support a plugin and misc cleanups (bgo #728432) 2014-05-13 13:37:21 -05:00
Dan Williams
9e542faec1 olpc-mesh: mesh device is only available when Wi-Fi companion is found
The mesh and Wi-Fi companion share radio hardware and firmware resources
and you need both to exist for the mesh to function properly and to
ensure that the Wi-Fi and mesh sides cooperate correctly for scanning
and activation.
2014-05-13 12:38:44 -05:00
Dan Williams
7be2627b69 wifi: remove supplicant pending action if supplicant init fails
If the supplicant interface object never successfully initialized, remove
the pending action to prevent warnings about "pending action already added"
when supplicant_interface_acquire() adds the pending action again.
2014-05-13 12:38:44 -05:00
Dan Williams
085bc0876c platform: better detection of OLPC Mesh interfaces
Instead of just looking at the udev tags, also look for sysfs entries
that the libertas driver uses when mesh is enabled.
2014-05-13 12:38:44 -05:00
Dan Williams
8ab45e3e5c olpc-mesh: reorganize functions (trivial)
Move GObject related stuff to the bottom and get rid of forward
declarations that are no longer.

No code changes, only code movement.
2014-05-13 12:38:44 -05:00
Dan Williams
98bd65c6e9 olpc-mesh: rework companion detection
Just listen to manager signals all the time, but only respond to
them when necessary.  Clean up companion detection to be a bit
clearer, and use nm_device_queue_state() so that we don't need
an idle handler when detecting the companion from a state change
handler.
2014-05-13 12:38:44 -05:00
Dan Williams
b486c63034 olpc-mesh: clean up dispose()
Allow it to be called multiple times.
2014-05-13 12:38:43 -05:00
Dan Williams
ee6febf297 olpc-mesh: use g_signal_handlers_disconnect_by_data() 2014-05-13 12:38:43 -05:00
Dan Williams
a9fa1bd9e2 platform: don't crash on link_change() error when ifname is NULL
to_string_link() logs link details and creates a new link to do this,
filling in the various filed in init_link().  init_link() attempts to
fill in the driver name, and might call ethtool to do that.  Well,
ethtool API only accepts an interface name (which we don't have) and
not an ifindex (which we do have), and dies.  Ensure that the ethtool
functions bail out instead of crashing if they don't get an interface
name.

Unfortunately, most callers of link_change() don't bother setting
ifindex or ifname on the link that ends up getting passed to
to_string_link(), because libnl doesn't require that when calling
rtnl_link_change().  Modify all callers to at least set the
ifindex so that to_string_link() has something useful to log.

NetworkManager[10651]: <info> (msh0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[10651]: (platform/nm-linux-platform.c:684):link_extract_type: runtime check failed: (ifname != NULL)
NetworkManager[10651]: <error> [1398107504.807205] [platform/nm-linux-platform.c:1856] link_change(): Netlink error changing link 12:  <UP> mtu 0 (1) driver 'usb8xxx' udi '/sys/devices/pci0000:00/0000:00:1d.7/usb2/2-1/2-1:1.0/net/msh0': Message sequence number mismatch

    at platform/nm-linux-platform.c:691
    at platform/nm-linux-platform.c:1850
    at devices/nm-device.c:5523
    NM_DEVICE_STATE_REASON_NOW_MANAGED) at devices/nm-device.c:6662
    at nm-manager.c:2115
2014-05-13 12:38:43 -05:00
Dan Williams
0171315c78 wifi: collapse Supplicant struct and clean up timeouts
There used to be many more members of the Supplicant struct, but now
that there are only three, collapse the struct into the NMDeviceWifiPrivate
struct, renaming them slightly at the same time to shorten the names.

Second, consolidate timeout cleanup since the two remaining timeouts
don't need their own cleanup functions.

Third, start_supplicant_connection_timeout() doesn't need its own
function since g_timeout_add() never returns 0, so we don't need to
check for it.
2014-05-13 12:38:43 -05:00
Dan Williams
9cc1f1b79a wifi: use g_signal_handlers_disconnect_by_* to clean up code a bit 2014-05-13 12:38:43 -05:00
Dan Williams
0e72c9ef4d wifi: simplify supplicant error signal handling
The only reason for the small struct was the idle handler, and the
only reason for the idle handler was to ensure that state was changed
from an idle handler.  We've got nm_device_queue_state() to do that
for us now, so use it.
2014-05-13 12:38:43 -05:00
Dan Williams
864a0dbb58 wifi: use nm_device_get_connection() to simplify some code 2014-05-13 12:38:43 -05:00
Dan Williams
06e3c6d02f wifi: make Wi-Fi support a plugin
Make Wi-Fi support a plugin using the new device factory interface.
Provides a 7% size reduction in the core NM binary.

        Before    After
NM:    1154104  1071992  (-7%)
Wi-Fi:       0   110464

(all results from stripped files)
2014-05-13 12:38:43 -05:00
Dan Williams
b46b28d18f wifi: remove old ipw rfkill polling functionality
Older Intel "ipw" devices (ipw2100, ipw2200, and ipw2915) only gained
kernel rfkill subsystem integration with 2.6.33.  Before then their
custom rfkill functionality had to be polled via sysfs.  Since we now
require at least a 3.x kernel, remove this old code.
2014-05-13 12:06:58 -05:00
Thomas Haller
b5ffcf46f1 doc: update documentation to show all logging domains
Also, mention the deprecated alias HW in man/NetworkManager.conf

Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 19:12:28 +02:00
Thomas Haller
3a19de80f7 nmcli/completion: fix logging domain "OLPC" for nmcli bash completion
Signed-off-by: Thomas Haller <thaller@redhat.com>
2014-05-12 19:00:00 +02:00