Commit Graph

7740 Commits

Author SHA1 Message Date
Dan Williams
27a14a7d11 core: fix routing if gateway not given in the first address
The gateway doesn't have to be there, but can be associated with
any address.  NM should look through all addresses and find the
first usable gateway.  Previously it was just using the first
address' gateway even if it was 0.

Broken by 2384dea3 (policy: split routing and DNS updates)
2012-10-11 17:07:21 -05:00
Marius Kotsbak
b4f2f6f596 ifupdown: fix for compile error 2012-10-11 15:49:50 -05:00
Alberto Ruiz
48a84c1271 libnm-glib: add missing NMSettingHashFlags argument to NMSecretAgentGetSecretsFunc docs
The nm_connection_to_hash() call in the NMSecretAgentGetSecretsFunc
documentation missed the last argument. This patch adds
NM_SETTING_HASH_FLAG_ALL as the last argument in the example.
2012-10-11 09:12:47 -05:00
Jiří Klimeš
b95b6c8aa1 core: fix a crash due to GValueArray/GArray freeing mismatch (rh #865009) 2012-10-11 15:41:48 +02:00
Chris Leonard
d4049c5c0a po: updated British English (en_GB) translation (bgo #684757) 2012-10-11 13:02:52 +02:00
Sandeep Shedmake
4cda9b0969 po: updated Marathi (mr) translation (bgo #684659) 2012-10-11 12:57:46 +02:00
chandankumar
826767bd8f po: updated Hindi (hi) translation (bgo #684647) 2012-10-11 12:50:42 +02:00
A S Alam
82dc54a9fe po: updated Punjabi (pa) translation (bgo #685017) 2012-10-11 12:42:28 +02:00
Ani Peter
3bbca1f57e po: updated Malayalam (ml) translation (bgo #684497) 2012-10-11 12:36:31 +02:00
Sweta Kothari
b0cfd271ce po: updated Gujarati (gu) translation (bgo #684191) 2012-10-11 12:28:09 +02:00
Nilamdyuti Goswami
1e40483f9a po: updated Assamese (as) translation (bgo #684016) 2012-10-11 12:20:47 +02:00
Aleksander Morgado
8aac52bce3 device: clear nm_device_state_changed() re-entry check on early exit 2012-10-10 11:03:50 -05:00
Dan Williams
4cccab61ab supplicant: handle some D-Bus spawn errors better
If D-Bus fails to spawn the supplicant it sometimes returns a method
timeout error instead of a spawn error.  We've seen that happen on
F18 when systemd is used to autolaunch the supplicant.  That causes
NM to assume that the supplicant crashed and thus never try to talk
to it again, on the assumption that (a) it crashed and (b) it will
crash again if we try to use it, and thus we'll be in a spawn loop.

First, (a) is not necessarily the case, and second, the supplicant
doesn't crash like that anymore.  So we're pretty safe to just talk
to the supplicant if it starts later instead of ignoring it if
we detect the timeout error.
2012-10-06 17:08:53 -05:00
Dan Williams
14e87a583a trivial: warn if we ever re-enter nm_device_state_changed()
Motivated by ba48be3a34.
2012-10-06 12:38:41 -05:00
Dan Winship
ba48be3a34 core: fix NMDevice::state-changed emission of ACTIVATED (bgo #685581)
NMPolicy was calling nm_device_state_changed() from inside its
NMDevice::state-changed handler, which caused the D-Bus signal to get
lost. Use nm_device_queue_state() instead.
2012-10-05 17:15:01 -04:00
Dan Williams
30db13ae5a libnm-glib: don't try to query for connections synchronously when NM isn't running (bgo #685345)
And ensure we clear out properties when NM quits, and that we request them
when NM starts up again.
2012-10-05 08:54:35 -05:00
Colin Walters
50712597ae dispatcher: Don't segfault if no dispatcher scripts exist (bgo #685451)
If /etc/NetworkManager/dispatcher.d didn't exist or was
empty, we'd try to pull the first element of a 0-sized array.

To fix this cleanly, we need to explicitly separate discovery
of binaries to execute from setting up the callback data.
2012-10-04 16:33:54 -04:00
Dan Williams
ae0fd58a75 hosts: reduce warnings to debug messages
No point in always printing warnings when we can't open files
we don't meaningfully change.
2012-10-04 14:40:27 -05:00
Dan Williams
c0d3004d44 ifcfg-rh: trivial: fix possibly uninitialized variable usage 2012-10-04 13:38:13 -05:00
Dan Winship
f14ecfb9f5 build: distcheck fixes 2012-10-04 09:36:19 -04:00
Dan Winship
7005762f50 build: "make check" fixes 2012-10-04 09:07:49 -04:00
Dan Williams
8bbd7f207e modem: reduce "starting the modem manager" to a debug message 2012-10-02 17:02:31 -05:00
Dan Winship
0fdf2e7438 core: implement NMDevice::state-changed more idiomatically
Rather than having NMDevice subclasses connect to their own
::state-changed signal, fix up the signal definition so they can just
override the class handler.
2012-10-02 15:46:08 -04:00
Dan Winship
565c43e91d core: remove "real_" prefix from method implementation names
The idea was copied from gtk, but it's only used there in cases where
the method's wrapper function and default implementation would
otherwise have the same name, which never happens in NM because our
method implementations aren't prefixed with the type name, so it's
just noise here.
2012-10-02 15:43:24 -04:00
Dan Winship
14b19982f6 policy: add a configure option for a permissive modify.system default
Add --enable-modify-system, to change the default for
org.freedesktop.NetworkManager.settings.modify.system to allow users
to edit system connections without needing to authenticate.
2012-09-28 08:45:05 -04:00
Dan Winship
a7ad36987a ifcfg-rh: write out wired settings on vlan connections
VLAN connections can have "hardware" settings in addition to the
VLAN-specific ones. ifcfg-rh was reading in wired settings for VLANs,
but was not writing them back out.
2012-09-27 13:57:47 -04:00
Dan Winship
0a30843caa core: don't try to create VLANs on devices that don't support them
VLANs are only supported on certain kinds of devices, so don't try to
create them on other devices. (In fact, NM currently assumes that
VLANs are only created on Ethernet devices, so we need to be even more
picky than that.)
2012-09-27 13:57:47 -04:00
Dan Winship
de0163fc5c libnm-util: Improve NMSettingVlan's verify()
Do slightly more validation if NMSettingVlan properties, and make sure
that at least one method of specifying a parent is used.

Remove the check that id is in range, since gobject will not allow you
to set the property to a value outside its declared range anyway.
2012-09-27 13:57:20 -04:00
Dan Winship
6878d20ac4 all: Don't use ctype.h macros
The ctype macros (eg, isalnum(), tolower()) are locale-dependent. Use
glib's ASCII-only versions instead.

Also, replace isascii() with g_ascii_isprint(), since isascii()
accepts control characters, which isn't what the code wanted in any of
the places where it was using it.
2012-09-26 12:14:37 -04:00
Dan Winship
74b6b9c768 libnm-util: move nm_utils_is_uuid() here
This is useful outside the daemon too, so move it into libnm-utils.
2012-09-26 12:14:37 -04:00
Dan Winship
77c90d3f36 ifcfg-rh: Fix the filename in two error messages 2012-09-26 12:10:24 -04:00
Dan Winship
c87f1758be ifcfg-rh: Fix bonds-of-InfiniBand
Move the bond-slave check out of the wired-specific code so that it
can be shared with the infiniband code again.
2012-09-26 12:10:23 -04:00
Dan Winship
89b08a0243 ipv6: restore the ability to set a default IPv6 route via a device (rh #829010)
replace_default_ip6_route() was mistakenly requiring gw to be
non-NULL, which meant it could only set the route via a gateway, not
via a device (thus breaking IPv6-over-openconnect)
2012-09-26 10:24:33 -04:00
Pavel Šimerda
bbbf9ad37b distro: remove src/backends
It is no longer used. Also remove an obsolete comment about backends
in nm-system.h.
2012-09-25 16:44:12 -05:00
Pavel Šimerda
3efc2c4b9d distro: remove nm_backend_enable_loopback()
We don't need to use distribution-specific network scripts to just bring
up the loopback interface.

I'm not aware of any init dependency problems but even if there are some,
it is more practical to solve them in the respective configuration files.

This function also tried to add 127.0.0.1 to the list of addresses but
not ::1. We don't need to set the interfaces up as this is done by the
kernel.
2012-09-25 16:44:12 -05:00
Pavel Šimerda
3ada5b5a6a distro: remove nm_backend_ipv6_use_tempaddr()
This function was *not* distribution specific and was used only in one place.
2012-09-25 16:44:12 -05:00
Pavel Šimerda
97745c7498 distro: remove nm_backend_update_dns()
This function was basically the same for all distributions and
was used only in one place. It tried to restart nscd or ask it
to reload configuration. This is not necessary as nscd uses
inotify to watch /etc/resolv.conf.
2012-09-25 16:44:11 -05:00
Dan Williams
c200e3fddf systemd: restore D-Bus service alias name
Mistakenly removed while merging 86f14392fc
2012-09-25 15:35:57 -05:00
Pavel Šimerda
86f14392fc systemd: also install nm-wait-online on 'systemctl enable'
Inspired by openSUSE patches. There is no need to require
user/distributor manually enable nm-wait-online.
2012-09-25 15:03:39 -05:00
Pavel Šimerda
110888c782 device: remove useless ipv6 route addition
Link-local multicast routes are handled by kernel. Just try pinging
ff02::1%eth0 on a clean system without IP configuration.
2012-09-25 15:03:32 -05:00
Dan Williams
78e9c564b2 keyfile: fix use-after-free in log messages 2012-09-25 15:03:13 -05:00
Dan Williams
5d503fe434 wifi: add "Speedport W 501V" to list of BSSID-locked SSIDs
"Speedport W 501V" is another widely-used SSID set on routers
given out by a German telecom.
2012-09-24 13:30:18 -05:00
Jiří Klimeš
784af22159 examples: fix python example file names in EXTRA_DIST 2012-09-24 13:22:24 +02:00
Jiří Klimeš
033e8d2a77 examples: fix add-system-connection.py -> add-connection.py rename
It fixes 'make dist' that fails otherwise.
Found by pavlix.
2012-09-24 12:59:09 +02:00
Jiří Klimeš
07fc3dcb90 api: add NM_DEVICE_STATE_REASON_SECONDARY_CONNECTION_FAILED reason and use that 2012-09-24 10:38:26 +02:00
Jiří Klimeš
ece5e209cd core: VPN autoconnect feature (bgo #560471) (rh #483120)
We go through the SECONDARIES state where we check if there are some secondary
(VPN or other) UUIDs that are to be activated before progressing to ACTIVATED.
In case of an error with a secondary UUID or its activation, the base connection
can't activate successfully.
2012-09-24 10:38:26 +02:00
Jiří Klimeš
65ce4e52ef core: add some helper functions to activation request 2012-09-24 10:38:26 +02:00
Jiří Klimeš
8fde1b1d2a core: add nm_active_connection_get_name() for easy access to connection name 2012-09-24 10:38:18 +02:00
Jiří Klimeš
dc3b2a4c81 cli: print 'secondaries' property of 'connection' setting
nmcli -f connection con list id "my connection"
2012-09-24 10:38:17 +02:00
Jiří Klimeš
eb407143fd ifcfg-rh: read/write 'secondaries' property of 'connection' setting
as SECONDARY_UUIDS variable
2012-09-21 13:47:01 +02:00