Commit Graph

8762 Commits

Author SHA1 Message Date
Pavel Šimerda
18fa10cc45 cleanup: remove obsolete link-related functions
Use nm-platform instead.
2013-05-24 20:07:30 +02:00
Pavel Šimerda
221bdbde43 misc: use nm-platform link stuff in route utilities 2013-05-24 20:03:28 +02:00
Pavel Šimerda
5074898591 core: use nm-platform for link management 2013-05-24 19:14:50 +02:00
Jiří Klimeš
dd17df2784 gsystem: update gsystem submodule, so that we can really compile on glib 2.32 2013-05-24 14:42:30 +02:00
Pavel Šimerda
f7fe685b69 platform: detect missing firmware on IFF_UP change 2013-05-24 11:41:54 +02:00
Pavel Šimerda
a14ca8a408 trivial: platform: add string for NM_PLATFORM_ERROR_NOT_SLAVE 2013-05-24 11:38:08 +02:00
Pavel Šimerda
67b97ee885 Revert "trivial: platform: add string for NM_PLATFORM_ERROR_NOT_SLAVE"
This reverts commit 8489994eb0.
2013-05-24 00:56:58 +02:00
Pavel Šimerda
3f57ee53bc Revert "platform: detect missing firmware on IFF_UP change"
This reverts commit 01b95ef293.
2013-05-24 00:56:48 +02:00
Pavel Šimerda
01b95ef293 platform: detect missing firmware on IFF_UP change 2013-05-24 00:42:40 +02:00
Pavel Šimerda
8489994eb0 trivial: platform: add string for NM_PLATFORM_ERROR_NOT_SLAVE 2013-05-24 00:32:43 +02:00
Pavel Šimerda
ebf2481b6b adsl: use nm-platform for link monitoring 2013-05-23 18:13:36 +02:00
Pavel Šimerda
f455b6ec83 wifi: use nm-platform for ifindex/ifname translation 2013-05-23 17:47:51 +02:00
Martin Pitt
fd4709fa27 core: add option for running from the build tree
Add hidden command line option --run-from-build-dir; with that, helpers
like nm-avahi-autoipd.action and nm-dhcp-helper will be called from the
build tree instead of libexecdir, which allows testing without having to
install first.

Helper paths are now stored in global variables instead of macros, and
get modified with that new option.

https://bugzilla.gnome.org/show_bug.cgi?id=698752
2013-05-22 16:17:23 +02:00
Dan Winship
a05941881e core: add single-letter command-line flags
Add single-letter options for --version, --no-daemon, --debug, and
--pid-file (and document them, as well as the existing single-letter
option for --help).

https://bugzilla.gnome.org/show_bug.cgi?id=700550
2013-05-21 09:30:09 -03:00
Dan Winship
8d44136dce main: add --debug, fix logging under systemd
When run with --no-daemon, NM used to duplicate all syslog output to
stderr, for ease of debugging. But this meant it had to tell systemd
to ignore stderr, so you wouldn't get duplicated log entries. But that
meant we lost error messages that didn't go through nm_log. (eg,
g_warning()s and g_return_if_fail()s).

Fix this by making --no-daemon no longer duplicate syslog output to
stderr, and removing the "StandardError=null" from the systemd service
file. To get the old behavior, you can use --debug instead of
--no-daemon.

https://bugzilla.gnome.org/show_bug.cgi?id=700550
2013-05-21 09:30:09 -03:00
Dan Winship
7ff3d1500e main: make handling of --no-daemon saner by using G_OPTION_FLAG_REVERSED
https://bugzilla.gnome.org/show_bug.cgi?id=700550
2013-05-21 09:30:09 -03:00
Dan Winship
fd2a3a7561 devices: fix recursive-state-change check
nm_device_state_changed() had a check to make sure it wasn't entered
recursively (which had been a source of bugs in the past), but it was
global rather than per-device, so it caused errors when VLANs changed
state in response to their parent device changing state. Fix that.

https://bugzilla.gnome.org/show_bug.cgi?id=698619
2013-05-20 16:38:34 -03:00
Dan Winship
2bb5178897 devices, platform: fix up carrier-detection detection
Some devices aren't expected to support carrier detection, so there's
no reason to have NMDevice log about it. Move that message into
NMDeviceEthernet, where failure to support carrier-detect really is
worth mentioning.

Also, make NMDeviceEthernet use NMPlatform for carrier-detection
detection (and move the MII carrier-detect-support check from
NMDeviceEthernet into NMLinuxPlatform).

Finally, have NMDeviceGeneric actually check whether the device
supports carrier detect, rather than just always assuming it doesn't.
2013-05-20 16:38:34 -03:00
Dan Williams
be807819b0 core: clean up and simplify device capabilities handling
This is really, really old 2007-era code.  Any NMDevice that gets
created is already supported, so there's no reason to have every
device set NM_DEVICE_CAP_NM_SUPPORTED.  For those subclasses that
only set that capability, we can remove the subclass method
entirely.  Next, it turns out that the "type capabilities" code
wasn't used anywhere, so remove that too.  Lastly, "cipsec"
interfaces haven't been used on linux in about 5 years (they
were created by the Cisco binary-only IPSec kernel module for
Cisco VPNs long before vpnc and openswan came around) so we can
remove that code too.
2013-05-20 16:38:34 -03:00
Dan Winship
38459f5a00 core: remove NMDeviceWired
With carrier handling moved to NMDevice, the only thing left in
NMDeviceWired was speed, which was actually ethernet-specific anyway.
So move that to NMDeviceEthernet, and then kill NMDeviceWired.
2013-05-20 16:38:34 -03:00
Dan Winship
82222d3898 core: move carrier handling to NMDevice
Move carrier handling for most device types into NMDevice.

Based on an earlier patch by Pavel Šimerda.
2013-05-20 16:38:33 -03:00
Dan Winship
5a223b9089 core: make nm-properties-changed-signal always export the right properties
Change the way that nm-properties-changed-signal works, and parse the
dbus-binding-tool-generated info to get the exact list of properties
that it's expected to export.

This makes NM_PROPERTY_PARAM_NO_EXPORT unnecessary, and also fixes the
problem of properties like NMDevice:hw-address being exported on
classes where it shouldn't be.
2013-05-20 16:38:33 -03:00
Dan Williams
04cb58eacd core: convert the DBus manager to a single-ref object
It's created very, very early and never needs to be unrefed
by anything except the main() function.
2013-05-20 16:38:33 -03:00
Dan Winship
e3bd3278e9 core: belatedly remove "hw-address" property #defines 2013-05-20 16:38:33 -03:00
Dan Williams
1d8ab72a60 libnm-util: fix hashing of secrets broken by 4d326182
4d326182 changed connection hashing slightly such that now base type settings
are always returned even if they are empty. Unfortunately a bunch of code in
the settings hashed connections with the ONLY_SECRETS flag and then checked
whether the returned hash was NULL or not to determine whether there were
any secrets, and then called nm_connection_update_secrets() with the hash.

nm_connection_update_secrets() would fail in the case where a setting
name was given, but the passed-in secrets hash did not contain any secrets
for the requested setting.  Instead, the function should return success
to match the semantics of passing in an entire connection hash which may
not have any secrets either.
2013-05-20 13:56:48 -05:00
Dan Williams
43f64489d8 gsystem: update gsystem which got reverted by 0f91894132 2013-05-20 13:28:49 -05:00
Pavel Šimerda
0f91894132 ifnet: replace SIOCGIFHWADDR ioctl 2013-05-18 23:14:19 +02:00
Pavel Šimerda
f63c7f8ee6 platform: link mtu setting 2013-05-18 04:38:17 +02:00
Pavel Šimerda
6c55e5a1c6 platform: link address setting 2013-05-18 04:38:17 +02:00
Pavel Šimerda
a28a880214 platform: vlan support 2013-05-18 04:38:17 +02:00
Pavel Šimerda
aa943f3115 platform: cleanup: use link_get, not rtnl_link_get
It sets up the correct error value for free and is more consistent.
2013-05-18 04:38:17 +02:00
Pavel Šimerda
b0c88d7b59 platform: don't clear the whole NMFakePlatformLink
This is necessary for freeing data structures at finalize time.
2013-05-18 04:38:17 +02:00
Dan Williams
8baebadcb5 core: update libsystem to build with glib 2.32 2013-05-17 15:56:03 -05:00
Sweta Kothari
da58786abf po: updated Gujarati (gu) translation (bgo #700360) 2013-05-17 20:29:26 +02:00
Shankar Prasad
2612af618c po: updated Kannada (kn) translation (bgo #700271) 2013-05-17 20:24:58 +02:00
Krishna Babu K
1ea315e800 po: updated Telugu (te) translation (bgo #700002) 2013-05-17 20:21:14 +02:00
Rajesh Ranjan
b5c7510411 po: updated Hindi (hi) translation (bgo #699559) 2013-05-17 20:16:21 +02:00
Colin Walters
468c08511c core: add libgsystem as a git submodule
And change src/main.c to use the local allocation macros.  This
results in much cleaner code, as one can see from the diff.

Because libgsystem is designed for nonrecursive make, it fits best in
the current recursive setup if we build . first.  This will be a lot
nicer when we switch NM to a nonrecursive setup.
2013-05-16 14:08:09 -05:00
Pavel Šimerda
cd09159201 trivial: typedesc to typename 2013-05-16 14:58:44 +02:00
Pavel Šimerda
f714c1033f platform: fix NMPlatformLink/NMFakePlatformLink type mismatch 2013-05-16 14:58:44 +02:00
Jiří Klimeš
0376f0be16 cli: make prompts asking for user input translatable in 'nmcli device' 2013-05-16 14:03:49 +02:00
Jiří Klimeš
55e816b36e man: nmcli man page update for numeric bonding modes 2013-05-16 10:44:17 +02:00
Jiří Klimeš
d0b74b7d8d cli: 'connection add': allow numeric bonding modes 2013-05-16 10:44:17 +02:00
Jiří Klimeš
68dd1cf880 man: nmcli man page update for '--wait' and removing '--nowait', '--timeout'
and '--private' -> 'private yes|no' change
2013-05-16 10:37:57 +02:00
Jiří Klimeš
2b843dac50 cli: change '--private' to 'private yes|no' in 'nmcli dev wifi connect'
Missing 'private' argument default to private=no, the same way as before.
2013-05-16 10:28:40 +02:00
Jiří Klimeš
fa6ecaed32 cli: remove '--nowait' and '--timeout' options and use global '--wait' instead
'--wait 0' corresponds to '--nowait'
'--wait n' for n > 0 corresponds to '--timeout n'
2013-05-16 10:28:40 +02:00
Jiří Klimeš
7d55426992 cli: add global '--wait <seconds>' option - timeout waiting for operations
--wait <0-maxint>

0    : means "do not wait". nmcli exits immediatelly with success.
1... : if operation doesn't finish within the timeout, nmcli exits with an error
2013-05-16 10:28:40 +02:00
Dan Williams
8bab0c8203 core: ensure newly-created master interfaces are ready for activation
Reverts part of

2226a00cc2
core: add a "default-unmanaged" setting for devices

Newly-created master interfaces are in the UNAVAILABLE state, but if
they were created in response to a slave connection being activated,
the master must be activated immediately too.  But a device cannot
be activated unless it's in the DISCONNECTED state, so restore that
state change.
2013-05-15 14:56:36 -05:00
Dan Williams
4ca885f5e3 core: fix list manipulation when removing multiple slaves
nm_device_release_one_slave() may change the list head, but the
for loop in nm_device_master_release_slaves() can't handle that.
Use a while loop instead.
2013-05-15 14:39:16 -05:00
Dan Williams
7d12ede07b libnm-glib: fix documentation C&P error 2013-05-15 13:44:51 -05:00