Commit graph

4654 commits

Author SHA1 Message Date
Dan Williams
7b38686dbd Merge remote branch 'origin/master' into ip6only 2010-04-23 14:34:39 -07:00
Dan Williams
f20f7294f6 ifcfg-rh: fix handling of WEP passphrases (rh #581718)
ifcfg-rh wasn't updated for WEP passphrases after that capability
got added.  Can't use KEY for passphrases since there's no way
to distinguish some WEP passphrases from some WEP Hex and ASCII
keys, so we use KEY_PASSPHRASE instead.
2010-04-23 14:20:10 -07:00
Dan Williams
4a2bb8b647 core: don't even bother running IPv4 or IPv6 when they are disabled 2010-04-23 12:56:33 -07:00
Dan Williams
24bd77dc92 ifcfg-rh: missing IP4 setting means DHCP 2010-04-23 12:55:05 -07:00
Dan Williams
1d882c8ade Merge remote branch 'origin/master' into ip6only 2010-04-23 12:13:24 -07:00
Dan Williams
e46577ffe5 core: rearrange version macros a bit 2010-04-23 12:12:47 -07:00
Jiří Klimeš
b0548425d7 logging: log NetworkManager version; use distribution version when configured 2010-04-23 15:25:32 +02:00
Jiří Klimeš
8315a03632 core: return valid error to dbus-glib (rh #581794) 2010-04-23 13:12:41 +02:00
Jiří Klimeš
a4cc8873c9 system-settings: fix loading connection by plugins
The error case was as follows. When using 'ifupdown,keyfile' plugins
and 'eth0' present in /etc/network/interfaces on a Debian-based system,
'ifupdown' plugin, in unmanaged mode, load_connections() prematurely
and thus effectively blocked reading connections from 'keyfile' plugin.
Patch by Dan and tested by me.
2010-04-23 12:13:04 +02:00
Simon Schampijer
c309a2bc8a wifi: fix B/G band adhoc wifi auto channel selection 2010-04-22 17:14:33 -07:00
Dan Williams
eafb1a6725 Merge remote branch 'origin/master' into ip6only 2010-04-22 14:20:24 -07:00
Dan Williams
5a9b7b42d1 ifcfg-rh: return valid errors to dbus-glib (rh #581794) 2010-04-22 14:19:50 -07:00
Dan Williams
eeca251a27 core: return valid error to dbus-glib (rh #581794) 2010-04-22 12:39:48 -07:00
Dan Williams
6d6f7d3d90 core: ensure errors are dbus-glib accessible (rh #581794)
Errors that can possibly be returned from D-Bus method calls
need to be registered with dbus-glib.
2010-04-22 12:27:31 -07:00
Dan Williams
2ce8028e10 ip6: fix IPv6 addrconf detection and completion
Poll the device's IPv6 flags so we're notified when the RA has
been parsed and what the flags are.  Only when that's complete
and the device's target state has been reached (or Managed mode
was indicated by the RA) should we continue with IP configuration.
2010-04-21 15:43:34 -07:00
Dan Williams
5750529ff5 ip6: make sure IPv6 addrconf is cleaned up correctly 2010-04-21 15:20:16 -07:00
Dan Williams
34793c1fb1 core: use ifindex instead of interface name in a lot of places
Where we can do so, let's use ifindex since that's actually unique
and doesn't change when the interface name changes.  We already use
ifindex in a bunch of places, and netlink *only* uses ifindex, so
this will make it easier later when we move over to ifindexes fully.
2010-04-21 14:58:25 -07:00
Dan Williams
9fee99e123 netlink: provide both blocking and nonblocking netlink connections
The non-blocking connection is really only good for listening for
events.  It doesn't work for request/response operations (like
refilling link and address caches) because the message receive loop
in libnl will break out from the EAGAIN before it gets the response
it needs to update the cache with.

This is most evident with link cache refills when requesting the
interface index from the name, or vice-versa; the refill request
exits early with EAGAIN (due to the non-blocking nature of the
connection's socket) and the cache isn't refilled, and the index
lookup fails.  We need to use blocking netlink operations in quite
a few places besides index lookups, from address/route operations
to getting the initial device carrier state.

So, split the montior's netlink connection into a non-blocking
event listener connection, and a synchronous connection which gets
used for immediate operations.  This also has the effect of
validation the synchronous operations for security, which wasn't
done before in nm-netlink.c (though it wasn't really a problem).
2010-04-21 14:16:07 -07:00
Dan Williams
7cec17fcce netlink: fix checking multicast groups
Got the flags wrong in the previous commit; MULTI isn't about
multicast/unicast, but about multi-part packets.  Instead we need
to check the netlink sockaddr structure for the group mask.
2010-04-21 01:05:08 -07:00
Dan Williams
df3f09b633 netlink: fix group subscription 2010-04-20 17:24:49 -07:00
Dan Williams
87c6e5db76 netlink: merge nm-netlink.c into nm-netlink-monitor.c 2010-04-20 17:22:58 -07:00
Dan Williams
f722b180e2 trivial: netlink header cleanup 2010-04-20 16:55:13 -07:00
Dan Williams
d85583b928 po: remove dead translatable 2010-04-20 16:53:05 -07:00
Dan Williams
5b8b9fc608 netlink: fix IPv6 RA flag retrieval
The RA flags aren't in the link flags, they are in the special
PROTINFO flags that the IPv6 stack sends.  To get these, because
libnl doesn't have native support for them, we get to parse the
netlink messages directly.  Furthermore, the PROTINFO message
isn't sent unless it's explicitly requested with a
RTM_GETLINK/AF_INET6 message, meaning we get to poll for it
periodically.

So switch over to the netlink monitor object (killing a lot of
duplicate code) and start requesting the PROTINFO bits from
netlink.
2010-04-20 16:46:08 -07:00
Dan Williams
9476355be2 trivial: remove dead CFLAGS 2010-04-20 16:33:55 -07:00
Dan Williams
d1c7c37863 netlink: implement generic group subscription
Needed by the IPv6 manager.
2010-04-20 16:32:03 -07:00
Dan Williams
b3d8337465 netlink: s/monitor/self 2010-04-20 15:59:50 -07:00
Dan Williams
952745d4d3 netlink: add header part of 6695eb7423 2010-04-20 15:59:18 -07:00
Dan Williams
6695eb7423 netlink: let clients get netlink message for generic parsing
First step on the way to killing the IPv6-specific netlink listener.
2010-04-20 15:54:55 -07:00
Dan Williams
dd3848ea45 netlink: move generic GObject stuff to the bottom 2010-04-20 15:31:54 -07:00
Dan Williams
cadc56abc8 netlink: loosen sender checks to allow other multicast messages
We need the IFLA_PROTINFO messages, and these are apparently sent
(still by the kernel) but with our own PID.  So the current checks
that limit the netlink PID to zero block these messages out. Instead
(like udev) we should be checking the actual sender of the message
usign unix socket credentials.

Second, at least at this point only privileged processes can send
netlink multicast messages, so as long as the:

* the other end of the socket is UID 0 AND
   * the netlink PID is 0 OR
   * the message is multicast and sent to our netlink PID

the we accept the message and process it as normal.  For another
example of this, see 'netlink.c' from the dhcp6s program; do a
Google search for "IFLA_PROTINFO" to find it.
2010-04-20 15:22:36 -07:00
Dan Williams
3da6854f1f core: more netlink monitor cleanup and reorg 2010-04-20 10:55:40 -07:00
Dan Williams
e2d28adeb0 core: simplify netlink monitor code a bit 2010-04-20 10:45:01 -07:00
Dan Williams
f911307996 policy: move hostname/lookup thread operations into separate file 2010-04-19 16:59:34 -07:00
Dan Williams
fbcdc95a21 logging: logger needs -ldl for dladdr() 2010-04-19 16:56:50 -07:00
Dan Williams
b04ebe5cc3 keyfile: fix writing IPv6 addresses with new format 2010-04-19 16:55:40 -07:00
Dan Williams
31590021ab libnm-util: update IPv6 address property description 2010-04-19 15:10:17 -07:00
Dan Williams
151a2b4c5a libnm-util: quiet harmless message in type conversion 2010-04-19 15:10:03 -07:00
Dan Williams
c5ff30fa71 doc: update settings spec generator for IPv6 address changes 2010-04-19 15:07:18 -07:00
Dan Williams
83652e6b8e libnm-util: convert from old IP6 address format to new
Ensure it still works correctly if something tries to set the
'addresses' property using the old GType.  Also make sure that
the various IP6 address comparison operations and string conversion
functions handle the gateway.
2010-04-19 10:14:44 -07:00
Dan Williams
73a7e6b8e0 core: fix IP6Config property types to match introspection spec 2010-04-18 11:43:43 -07:00
Dan Williams
1d409aeb53 core: fix Address property type of IP6Config objects
We can change the property's D-Bus signature (and thus API) here
because querying the IP6Config object's properties caused NM to
crash.  Apparently we forgot to change the type of the Address
property when we C&P-ed the IP4Config into the IP6Config, and
DBUS_TYPE_G_ARRAY_OF_ARRAY_OF_UINT is certainly the wrong type
to use since the backing object that dbus-glib would marshal
into the ARRAY_OF_ARRAY_OF_UINT wasn't that type, causing a
crash in dbus-glib when a client got the IP6Config.
2010-04-17 17:19:30 -07:00
Dan Williams
44ea07a5d7 libnm-util: add gateway member to IPv6 addresses 2010-04-17 10:26:53 -07:00
Dan Williams
d8f0ba554c policy: reconfigure routing and DNS when either IPv4 or IPv6 changes 2010-04-15 15:28:42 -07:00
Dan Williams
37c411abc9 core: add 'default6' property to ActiveConnection implementations 2010-04-15 15:26:11 -07:00
Dan Williams
e2ad8c2a54 core: add 'default6' property for ActiveConnection objects
Since IPv4 and IPv6 have different routing one device can have the
active IPv4 connection and a completely different one can have the
active IPv6 one.
2010-04-15 15:18:08 -07:00
Dan Williams
5e6ae3b226 core: don't require IPv4 configuration during activation 2010-04-15 14:59:29 -07:00
Dan Williams
c35bec214c dhcp: ensure the IP4 method is compatible with DHCP 2010-04-15 14:54:42 -07:00
Dan Williams
c049680515 core: use constant instead of hardcoding a string 2010-04-15 14:54:22 -07:00
Dan Williams
fe25e20f6a ifcfg-rh: handle disabled IPv4 correctly
Instead of not including the IP4 setting, set its method to disabled.
In reality either one is legal, but including the IP4 setting wtih
the method set to 'disabled' is more explicit.
2010-04-15 14:52:43 -07:00