Commit Graph

4279 Commits

Author SHA1 Message Date
Dan Williams
16bb798861 agents: add agent capabilities
A new agent registration method enables agents to pass capabilities during
the registration process.
2013-07-31 08:16:34 -05:00
Pavel Šimerda
e0f37dce45 dhcp: fix IPv6 address timestamp setting 2013-07-30 16:36:47 +02:00
Pavel Šimerda
e59949c7cf platform: show address lifetimes in debug 2013-07-30 16:36:47 +02:00
Jiří Klimeš
379951ee18 platform-test: fix build with glib < 2.34
Use our compatibility version for g_clear_pointer() that is not defined
in glib < 2.34.
2013-07-30 12:53:42 +02:00
Pavel Šimerda
b502b6cd58 platform: ignore kernel-generated routes
This is necessary to avoid tinkering with IPv4 prefix routes
automatically inserted by the kernel for each IPv4 address.

https://bugzilla.gnome.org/show_bug.cgi?id=705102
2013-07-30 11:40:19 +02:00
Pavel Šimerda
68c3e1153c platform: update all address lifetimes
The nm_platform_ip[46]_address_sync() functions no longer use
nm_platform_ip[46]_address_exists() to avoid adding already
existing addresses. That means nm_platform_ip[46]_address_add()
is now called for *all* commited addresses and the lifetimes
are thus always updated.

Because of that, nm_platform_ip[46]_address_add() had to be modified to
accept existing addresses and update their lifetimes when appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=705102
2013-07-30 11:40:19 +02:00
Pavel Šimerda
3cf1b71de2 platform: simplify address comparisons 2013-07-30 11:40:19 +02:00
Pavel Šimerda
22c4f5f5af platform: handle empty arrays in array_contains_ip[46]_*() 2013-07-30 11:40:19 +02:00
Pavel Šimerda
53e55aab36 dhcp: push address lifetime to nm-ip[46]-config 2013-07-30 11:40:19 +02:00
Pavel Šimerda
a560148d27 core: use address lifetimes from router discovery 2013-07-30 11:40:19 +02:00
Pavel Šimerda
da71cc6e8c trivial: allow building tests from rdisc directory
The nm-rdisc subsystem, just as the nm-platform subsystem is separately
testable and it proved convenient to be able to build the test programs
by just typing 'make' in the rdisc/platform directory where the source
code for those modules resides.
2013-07-30 11:40:18 +02:00
Pavel Šimerda
f6ef374076 trivial: use 'preferred' attribute name for preferred lifetime 2013-07-30 11:40:18 +02:00
Dan Williams
9fea2430bd platform: temporarily work around mismatching lifetime/timestamp/preferred (bgo #705102)
Addresses in the platform cache will have timestamp/lifetime/preferred set,
but addresses to be added or removed (like new IP config from DHCP renewal
or new RAs) won't have these set, since they only get set when the address
is actually added to the kernel.  So when syncing addresses, we can't look
at any of these items or nothing matches, and all existing addresses get
removed.

https://bugzilla.gnome.org/show_bug.cgi?id=705102
2013-07-29 14:54:25 -05:00
Pavel Šimerda
0e361e894c core: turn link_changed() into a proper virtual function 2013-07-29 13:51:13 +02:00
Dan Williams
5767af2601 core: use NM_PLATFORM_LIFETIME_PERMANENT instead of G_MAXUINT32 2013-07-28 08:28:37 -05:00
Pavel Šimerda
5216cd4eb3 core: detect automatic addresses when assuming connections 2013-07-27 00:52:00 +02:00
Pavel Šimerda
afc3c2617a platform: cosmetic changes 2013-07-27 00:47:04 +02:00
Pavel Šimerda
00b63b975f platform: always cleanup nm-test-device 2013-07-27 00:47:04 +02:00
Pavel Šimerda
2ef7110f37 platform: fix memory leaks 2013-07-27 00:47:04 +02:00
Dan Williams
d83c0722da ifcfg-rh: convert test_read_wired_static_no_prefix() to a GTest 2013-07-26 16:23:23 -05:00
Dan Williams
76c09fb729 ifcfg-rh: start converting tests to GTest framework 2013-07-26 16:23:23 -05:00
Dan Williams
06b0fc7b64 ifcfg-rh: clean up certificate/key verification tests
Kill the CKType enum since we can figure out what we want
from the property name.
2013-07-26 16:23:23 -05:00
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