Commit Graph

7207 Commits

Author SHA1 Message Date
Dan Williams
bad980ccfa ifcfg-rh: simplify testcases #1
Use g_assert() macros where we can, and don't bother passing stuff
into connection_from_file() that we don't even look at.
2013-07-26 16:23:23 -05:00
Dan Williams
01f172e99e ifcfg-rh: don't require all arguments to connection_from_file()
Lets eg testcases pass NULL instead of a bunch of variables they
just throw away.
2013-07-26 16:23:23 -05:00
Dan Williams
4920330ae5 ifcfg-rh: cleanup connection_from_file() error handling
Don't bother with local error variables, just pass 'error' around.
2013-07-26 16:23:22 -05:00
Dan Williams
c2ad294290 ifcfg-rh: fix error handing in some functions that expect error != NULL
A couple functions depended on the passed-in error being !NULL to
correctly report errors, and we can't depend on that because it might
not be true.  So fix up those functions' call chain to ensure that
errors get reported regardless of whether 'error' is !NULL.
2013-07-26 16:23:22 -05:00
Pavel Šimerda
f121995fad platform: add support for address lifetimes 2013-07-26 22:45:15 +02:00
Pavel Šimerda
aca9b9b570 platform: fix udev/kernel interface race conditions
A network interface is only exposed if it's recognized by both netlink
cache and udev.
2013-07-26 21:14:08 +02:00
Pavel Šimerda
423307f6bc platform: improve signal handling in tests 2013-07-26 21:10:27 +02:00
Pavel Šimerda
1c88de0488 platform: remove nm_platform_delete_device_by_name() 2013-07-26 21:10:27 +02:00
Pavel Šimerda
ad5b0a8e67 platform: more logging for tests 2013-07-26 21:10:27 +02:00
Pavel Šimerda
6d688f9c87 trivial: simplify a condition 2013-07-26 18:16:18 +02:00
Pavel Šimerda
e07383f3de core: implement nm_ip[46]_config_update_setting() 2013-07-26 01:07:24 +02:00
Pavel Šimerda
b2a207b44b trivial: rename existing to connection in add_device() 2013-07-25 21:23:27 +02:00
Dan Williams
0744c6be08 build: simplify rdisc tests makefile subdirs
src/rdisc doesn't need a makefile just to point to the tests,
we can do that more easily from src/Makefile.am like we do for
all the other tests subdirs.
2013-07-24 14:05:46 -05:00
Jack Bates
f9494db7c1 dnsmasq: does handle more than one nameserver per domain
dnsmasq should query per-domain nameservers non-deterministically in the
normal dnsmasq manner. Currently it queries them in order, the same way
as if --strict-order was set. Simon Kelley plans to correct this, but
either way, dnsmasq does handle more than one nameserver per domain.

https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1003842/comments/58
https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1003842/comments/55
2013-07-24 10:19:40 -05:00
Pavel Šimerda
7cc7a38288 platform: handle address/route deletion upon link actions (bgo #704770)
When link goes !IFF_UP by internal or external action, we need to delete
related routes from the route cache. The same is done for both addresses
and routes upon link removal.

https://bugzilla.gnome.org/show_bug.cgi?id=704770
2013-07-24 09:49:03 -05:00
Jiří Klimeš
d60dae2558 keyfile: ignore Emacs interlocking link named .#<file_name> (rh #987629)
https://bugzilla.redhat.com/show_bug.cgi?id=987629
http://stackoverflow.com/questions/5738170/why-does-emacs-create-temporary-symbolic-links-for-modified-files
2013-07-24 12:32:18 +02:00
Pavel Šimerda
38a57b3497 platform: listen for route changes properly 2013-07-24 10:05:41 +02:00
Dan Williams
fe5f0d2070 core: let device classes indicate their HW address will never change (bgo #701744)
Bluetooth device hardware addresses won't change during the lifetime
of the object (since that would mean a completely new device) and
they also won't have an ifindex because they aren't netdevices.

Various bits of the core periodically call nm_device_update_hw_address()
to update a device's hardware address, but this function expects that
any device with a hardware address also has an ifindex.  Except that
Bluetooth devices don't because they aren't netdevices.

Modify the get_hw_address_length() function to return a boolean
indicating whether or not the address can ever change, and set that
for BT devices.  nm_device_update_hw_address() then exits early if
there's no point in re-checking the hardware address, avoiding the
assertion.

https://bugzilla.gnome.org/show_bug.cgi?id=701744
2013-07-22 15:56:34 -05:00
Dan Williams
86a197f177 dhcp: add debug logging to config file merging 2013-07-22 14:28:48 -05:00
Dan Williams
1364ccb2c2 dhcp: also check for config files by UUID 2013-07-22 14:28:48 -05:00
Dan Williams
0f592b40c8 core: re-add assertions to NMIP[4|6]Config objects
They make any problems apparent at the source instead of later where
the problem must be more intesively debugged.
2013-07-22 14:28:48 -05:00
Dan Winship
17e91fd46a core: change the rules for ignore-carrier
The previous ignore-carrier rules did not work well with dynamic IP
(dhcp/slaac) connections. Change the rule so that only static IP
connections can be activated when carrier is not present (but both
static and dynamic connections will remain up when carrier is lost).
2013-07-22 11:30:21 -04:00
Dan Winship
328dea9c5c core: make monitor-connection-files be false by default 2013-07-22 11:30:21 -04:00
Pavel Šimerda
801434ce45 platform: don't remove default route in *_route_sync() 2013-07-22 13:03:46 +02:00
Pavel Šimerda
db46beaa2f core: fix NULL IPv6 gateway handling 2013-07-22 13:03:46 +02:00
Pavel Šimerda
9ef294f007 trivial: remove nm-ip6-manager 2013-07-20 17:08:01 +02:00
Pavel Šimerda
bd1c7fbece device: use internal router discovery implementation 2013-07-20 17:08:01 +02:00
Pavel Šimerda
c3a4656a68 rdisc: libndp implementation 2013-07-20 16:50:18 +02:00
Pavel Šimerda
21a8a71d48 rdisc: abstract class and fake implementation
Abstract class, fake implementation and a manual testing tool for
NetworkManager's internal IPv6 router discovery module. When a real
implementation is ready, it will replace nm-ip6-manager and will be used
by nm-device.
2013-07-20 16:50:18 +02:00
Pavel Šimerda
74d8d374b3 trivial: remove unnecessary check
inet_ntop doesn't even have enough information to add the percent sign
and the device name.
2013-07-20 16:50:17 +02:00
Pavel Šimerda
f7b2443035 core: always commit ip[46]-config to nm-platform
This is necessary to update the address lifetimes.
2013-07-20 15:30:09 +02:00
Pavel Šimerda
d8e6065f63 core: switch nm-ip4-config's NMIP[46]Address to NMPlatformIP[46]Address 2013-07-20 15:30:08 +02:00
Pavel Šimerda
74621a8f5c core: replace nm_ip[46]_config_diff()
Callers of these functions now only care whether two IP configs are
different and not what specific property changed, so we can simplify
this code down to a simple comparison for equality, based on the hashing
that's already done for the DNS manager.
2013-07-20 15:30:08 +02:00
Pavel Šimerda
a291448cf4 policy: don't use nm_ip[46]_config_diff()
nm-platform will cope with unnecessary configuration commits.
2013-07-20 15:30:08 +02:00
Dan Williams
c370c04fee core: fix trailing semicolon that caused all IP6 configs never to get applied 2013-07-15 17:10:45 -05:00
Pavel Šimerda
d42f99f590 device: clean up ip6 configuration flow
IP6 configuration is now stored in ac_ip6_config and dhcp6_ip6_config
and passing them as function arguments is avoided. Written with Dan
Williams.
2013-07-15 15:53:43 +02:00
Dan Williams
d687492d49 ifcfg-rh: add support for gateway ping timeout 2013-07-12 22:32:06 -05:00
Dan Williams
7c2abb2c9f core: fix stray semicolon causing VPN routes to not be added 2013-07-12 14:09:05 -05:00
Pavel Šimerda
317bd6bf6c trivial: check for NULL setting in nm_ip6_config_merge_setting() 2013-07-12 18:45:52 +02:00
Pavel Šimerda
7c0657a119 core: cleanup nm-ip[46]-config 2013-07-12 11:38:35 +02:00
Pavel Šimerda
19747082b2 trivial: remove unused tried_ipv6 2013-07-09 12:29:47 +02:00
Pavel Šimerda
fca1c0d88f trivial: move vpn/bonding functions out of nm-system
As nm-system only contained auxiliary functions which fit in their
respective modules better, it can be safely removed.
2013-07-05 17:27:15 +02:00
Pavel Šimerda
019dd1b7d8 trivial: remove unused system.h includesl 2013-07-05 17:22:34 +02:00
Pavel Šimerda
becbf1a84c core: enable libgsystem
Got build problems with some of the pavlix/runtime patches without that.
2013-07-05 00:58:56 +02:00
Pavel Šimerda
7dcec4d100 trivial: move back nm_match_spec_string()
Was moved by accident.
2013-07-04 20:20:27 +02:00
Pavel Šimerda
c1538496a9 trivial: simplify nm_ip[46]_config_diff() NULL comparison logic 2013-07-04 18:15:30 +02:00
Pavel Šimerda
253906ecd2 trivial: simplify nm_ip[46]_config_diff() result check
nm_ip[46]_config_diff() explicitly checks for NULL arguments.
2013-07-04 18:15:08 +02:00
Pavel Šimerda
3e534c0e65 dhcp: use nm_ip[46]_config_get_gateway() in tests 2013-07-04 17:45:49 +02:00
Pavel Šimerda
8de1b1732e trivial: move merge_ip6_configs() to nm-ip6-config 2013-07-04 13:37:26 +02:00
Pavel Šimerda
6cdc16d147 core: use nm_ip[46]_config_get_gateway() 2013-07-04 13:22:46 +02:00