Commit Graph

7740 Commits

Author SHA1 Message Date
Dan Williams
e1eee77497 hostname: return NULL from failed hostname lookup, not zero-length string 2010-05-03 20:34:22 -07:00
Dan Williams
719738d133 keyfile: fix for IPv6 address gateways 2010-05-03 04:53:13 -07:00
Dan Williams
0ab71998ce ifcfg-rh: test implicit may-fail configuration 2010-05-03 04:12:18 -07:00
Dan Williams
7926b3ca95 ip6: turn RA acceptance off when RAs shouldn't be used (rh #588163)
Make sure we don't inadvertenly let the kernel assign an RA address
when connections that don't allow RA are used.
2010-05-03 03:42:43 -07:00
Dan Williams
10d6bc8d2e ip6: fail if the RA-provided address disappears or RDNSS expires 2010-05-03 03:02:57 -07:00
Dan Williams
c21416e956 ip6: don't prematurely remove RDNSS nameservers (rh #588192) 2010-05-03 02:48:18 -07:00
Dan Williams
670de9b5fb ip6: tune RDNSS parsing logging 2010-05-03 02:42:48 -07:00
Dan Williams
dd699c585f core: better logging for interface address syncing 2010-05-03 02:11:59 -07:00
Dan Williams
13e1aaa423 ifcfg-rh: add support for non-fatal IP configuration failure 2010-05-03 01:33:55 -07:00
Dan Williams
8aef7ef411 core: allow selective failure of IP configuration (rh #567978)
As long as at least one IP config method completes, and as long as
methods that the user required to complete do complete, allow the
connection to complete.
2010-05-03 01:19:54 -07:00
Dan Williams
3fb8cdb35f mesh: let parent class handle IP config timeout 2010-05-03 00:59:06 -07:00
Dan Williams
7025e054d9 libnm-util: clarify may-fail behavior 2010-05-03 00:08:02 -07:00
Dan Williams
806b74db34 libnm-util: add 'may-fail' for IPv4 and IPv6
When this property is TRUE, IP configuration can continue as long
as at least on IP configuration type succeeds.  This allows
connections to networks where the user does not necessarily know
whether the network supports IPv4 or IPv6 and does not require
that both complete succesfully.

Since most of the time the user doesn't really care what type
of connectivity they have, as long as they have *some* connectivity,
this allows better "Just Works" behavior as long as the system
settings plugins and connection editors/applets use the right
defaults.

Suggested defaults for may-fail are:

IPv4: no (ie, require IPv4 connectivity)
IPv6: yes (ie, do not require IPv6 connectivity)

Users who require a specific type of connectivity are probably
knowlegable enough to check the box as needed for their network.
2010-05-02 16:51:26 -07:00
Dan Williams
71c7ecba08 libnm-util: more IPv6 address gateway fixes 2010-05-02 13:22:29 -07:00
Dan Williams
5ca72c78a0 ip6: avoid autoconf routes where dest == gateway
These return errors when we try to add them via netlink (both internal
code and using /sbin/ip) so we'll ignore them for now.
2010-05-02 00:44:44 -07:00
Dan Williams
32b255e128 trivial: remove some debugging leftovers 2010-05-02 00:32:26 -07:00
Dan Williams
28d2c5592b dhcp: ensure getting DHCP IP config fails if the client died early
If the client never delivered any options to NM, make sure we don't
return a valid IP config object to callers when they request one.
2010-05-02 00:24:50 -07:00
Dan Williams
c34cc017ba dhcp: handle client early exit correctly
When the client	exits it may take a short amount of time for the
dhclient hook script to	deliver	the options to NetworkManager; so
we need	to keep	the client object around a bit (so we know what
NMDHCPClient the options getting delivered are for).  If we don't,
the DHCPManager will dispose of	the DHCPClient object and then
when the options come in, it can't match up the	PID from the
options with the PID of	an existing NMDHCPClient.  So put the
clients	on a removal timer that	keeps them around for a	bit before
we let the manager dispose of them.

Since we're keeping the	PID around too instead of zeroing it when
the client exits (for the reason above), track whether the client
is really dead yet so we don't indiscriminately	kill a random
process	that happens to re-use the PID.
2010-05-02 00:24:40 -07:00
Dan Williams
bec6147e9b dhcp6: track client mode better and handle info-only early-exit
Ignore early exits of the client in info-only mode; since there is
no address lease the client doesn't need to stick around after
getting DNS/etc options from the server.
2010-05-01 10:16:38 -07:00
Dan Williams
39c2797848 dhcp: don't reset pid on client exit
Clients in IPv6 info-only mode may exit after getting a response
from the server, since there are no leases involved in info-only
mode.  To ensure that the client's options are received when the
event comes in (which could be after we get the child watch
callback for the exit) we still need the client's PID.
2010-05-01 10:12:25 -07:00
Dan Williams
07de58bbeb dhcp: clean up client spawn return value 2010-05-01 09:53:49 -07:00
Dan Williams
8398ccba59 dhcp: simplify option iteration
Also removes the failure return when the lease isn't bound,
because nothing was respecting the return value anyway.
2010-05-01 09:48:31 -07:00
Dan Williams
41f3a67092 dhcp: fix client end state when it exits normally 2010-05-01 09:27:32 -07:00
Dan Williams
00bcc42a35 logging: log DHCP state changes 2010-05-01 09:26:57 -07:00
Dan Williams
0e546480fa dhcp6: fix merging of DHCPv6 config into interface config
If we're doing autoconf + DHCPv6 info-only, we need to combine the
DHCP and IPv6 configuration into the final device configuration.
2010-05-01 08:12:25 -07:00
Dan Williams
d1be3793a1 dhcp6: info-only requests don't require addresses
They aren't actual leases so an info-only request doesn't return
an address.
2010-05-01 08:10:49 -07:00
Dan Williams
e3de3b65ef logging: print DHCP client pid in warnings 2010-05-01 08:09:12 -07:00
Dan Williams
398b41a61d trivial: IP6Config object cleanups 2010-05-01 08:05:39 -07:00
Dan Williams
9f85d3533e ip6: fix log message arguments 2010-04-30 17:33:44 -07:00
Dan Williams
2282f352a4 ip6: better logging of IPv6 autoconf process 2010-04-30 17:30:36 -07:00
Dan Williams
8a59706712 ip6: ensure manager singleton is cleared when disposed 2010-04-30 17:30:11 -07:00
Dan Williams
7b3103b5eb ip6: initialize IPv6 address config a bit later
Stage 1 gets overridded by most device subclasses and it turns out
they don't every chain back up to NMDevice's stage1 implementation.
It's a bit complicated to make them all do that, so for now just
move the IPv6 address config a bit later.
2010-04-30 16:10:29 -07:00
Dan Williams
a64600d796 ip6: bump the autoconf RA timeout a bit
The RA interval is configurable on the router and we don't want
to miss one.  20s is still a lot less than we allow for DHCP so
the latency isn't that big of an issue.
2010-04-30 16:09:36 -07:00
Dan Williams
b24f5c8da9 ip6: 'manual' method doesn't use the IP6 manager 2010-04-30 16:09:02 -07:00
Dan Williams
7e980d8be3 ip6: fix manual IP config application 2010-04-30 15:49:41 -07:00
Dan Williams
cc0c2783b6 libnm-util: fix IPv6 address array -> string transform
Only used for debugging, but it's nice to see the actual address
instead of a transform error.
2010-04-30 15:29:53 -07:00
Dan Williams
93d1d81938 Revert "dbus: add Debian D-Bus permission config"
This reverts commit 3d69429a1e.

Apparently the 'netdev' group rules aren't as widespread anymore
and Debian ships with ConsoleKit by default, and thus can
use at_console.
2010-04-30 11:44:56 -07:00
Dan Williams
3d69429a1e dbus: add Debian D-Bus permission config
From Michael Biebl and the debian packages.
2010-04-30 11:18:12 -07:00
Dan Williams
9830c60d11 dhcp: fix superclass type of dhcpcd plugin
From Mikhail Efremov <sem@altlinux.org>
2010-04-29 11:31:43 -07:00
Dan Williams
e01039dcd2 examples: add example printing out all BSSIDs we can see 2010-04-29 08:26:28 -07:00
Dan Williams
257b4b34da examples: add example for listing connections 2010-04-28 18:39:42 -07:00
Dan Williams
17e0749c76 ip6: disconnect netlink signal handler on dispose 2010-04-27 17:16:02 -07:00
Jiří Klimeš
ea1e6f2f7b ip6: fix a crash when /proc/sys/net/ipv6/conf/<iface>/* files are not present 2010-04-27 15:59:46 +02:00
Dan Williams
871f9934fa build: default to pppd-2.4.5 plugin dir
People should be using 2.4.5 now anyway, since it's been out for
quite a while and includes the fixes for the bogus DNS servers.
2010-04-26 23:56:01 -07:00
Dan Williams
c3ebe98ae3 Merge remote branch 'origin/ip6only' 2010-04-26 17:33:45 -07:00
Dan Williams
5331c22adf dns: filter duplicates while constructing resolv.conf 2010-04-26 16:09:25 -07:00
Dan Williams
b127f4aa98 ip6: move class boilerplate/setup to the bottom 2010-04-26 15:04:01 -07:00
Dan Williams
de1a4dcc4b ip6: fix autoconf address and route scraping
Two things:

1) we need to bounce IPv6 on the interface because otherwise the
kernel won't start listening for new RAs.  So code gets added
to handle the 'disable_ipv6' /proc/sys/net/ipv6 parameter for
each interface.

2) Second, we need to grab a default route (if we find one) before
reading addresses, so that we can add it to each address that we
get out of the kernel.  Most of the time we'll get an -EEXIST error
when adding address, but that's OK since we're just trying to add
the same route back that the kernel already added from the RA.  We
also need to make sure the route and address caches are up-to-date
otherwise we won't get a complete picture of the routing table.
2010-04-26 14:08:10 -07:00
Dan Williams
11a6225aac ip6: correctly handle routes with no gateways
For these we don't need to set any gateway at all, and the kernel
assumes that it's a default route without a next hop.
2010-04-26 14:06:58 -07:00
Dan Williams
08c33651c7 test: needs -ldl too for logger code 2010-04-26 13:51:19 -07:00