Commit Graph

7740 Commits

Author SHA1 Message Date
Jiří Klimeš
d1f63c62f0 cli: align UTF-8 strings properly
Not all utf-8 characters occupy 1 screen column. Some may be 2-column
wide, some are unprintable - zero columns.
2010-04-26 17:32:18 +02:00
Jiří Klimeš
f53a2aeac9 cli: use the same version string as NetworkManager daemon 2010-04-26 11:05:36 +02:00
Jiří Klimeš
825d999a05 Merge branch 'master' into cli-output
Conflicts:
	man/Makefile.am
2010-04-26 10:44:28 +02:00
Dan Williams
0ad8fc1adc libnm-glib: use max timeout for settings dbus calls
These calls may require authentication, and thus could be in-progress
for much longer than the default D-Bus timeout, which is pretty short.
2010-04-25 22:48:10 -07:00
Dan Williams
9b944dec96 core: ignore mobile broadband ethernet devices that aren't usable (rh #585214)
Not all ethernet devices are immediately usable; newer mobile broadband
devices (Ericsson, Option, Sierra) require setup on the tty before the
ethernet device is usable.  2.6.33 and later kernels set the 'DEVTYPE'
uevent variable which we can use to ignore the interface as a NMDevice
subclass.  ModemManager will pick it up though and so we'll handle it
through the mobile broadband stuff.
2010-04-25 09:52:01 -07:00
Dan Williams
a799b0a0b9 Merge remote branch 'origin/master' into ip6only 2010-04-24 15:09:40 -07:00
Marek Černocký
a7ab278498 po: update Czech translation (bgo #616630) 2010-04-24 00:15:40 -07:00
Shankar Prasad
9f01ed9f9a po: update Kannada translation (bgo #616625) 2010-04-24 00:14:45 -07:00
Krishna Babu K
f8d1d7e832 po: update Telugu translation (bgo #616399) 2010-04-24 00:13:31 -07:00
Dan Williams
e218092d62 core: first pass of IPv6 routing and DNS update on IP config change
Mostly the same as the IPv4 bits; dupe them for IPv6.  A lot of
duplicated code, but it's hard to consolidate.
2010-04-23 22:11:22 -07:00
Dan Williams
837364726b dns: handle IPv6 nameservers more like IPv4 ones 2010-04-23 22:08:56 -07:00
Dan Williams
bb936cd46c core: ensure IP stage failure when stuff actually fails 2010-04-23 21:52:10 -07:00
Dan Williams
8d0d80d8df core: assure a valid IPv6 config on timeout success 2010-04-23 21:51:09 -07:00
Dan Williams
aaf10a8edb core: don't pointlessly clear IP6 config on success 2010-04-23 21:48:16 -07:00
Dan Williams
6b63481d4d core: prepare for IPv6 routing and DNS stuff 2010-04-23 16:37:45 -07:00
Dan Williams
b172519045 core: fail connections if IP configuration expires
Need to mark these connections invalid too, otherwise they'll just be
retried over and over and over.  Ran into a problem with DHCPv6 where
lease expiration (cached lease really) was *negative*, which caused
the lease to expire immediately after being bound.  Previously the
policy wouldn't mark connections like this as invalid because they
hadn't failed during activation.

NetworkManager: <info> (eth0): carrier now ON (device state 2)
NetworkManager: <info> (eth0): device state change: 2 -> 3 (reason 40)
NetworkManager: <info> Activation (eth0) starting connection 'dhcp6 test'
NetworkManager: <info> (eth0): device state change: 3 -> 4 (reason 0)
NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) started...
NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
NetworkManager: <info> Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) starting...
NetworkManager: <info> (eth0): device state change: 4 -> 5 (reason 0)
NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) successful.
NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
NetworkManager: <info> Activation (eth0) Stage 2 of 5 (Device Configure) complete.
NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
NetworkManager: <info> (eth0): device state change: 5 -> 7 (reason 0)
NetworkManager: <info> Activation (eth0) Beginning DHCPv6 transaction (timeout in 45 seconds)
NetworkManager: <info> dhclient started with pid 6639
NetworkManager: <info> Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Internet Systems Consortium DHCP Client 4.1.1
Copyright 2004-2010 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

NetworkManager: <info> (eth0): DHCPv6 state changed nbi -> preinit6
Bound to *:546
Listening on Socket/eth0
Sending on   Socket/eth0
PRC: Confirming active lease (INIT-REBOOT).
XMT: Forming Confirm, 0 ms elapsed.
XMT:  X-- IA_NA 5a:47:1f:71
XMT:  | X-- Confirm Address 3ffe:501:ffff::4
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 1090ms.
send_packet6: Cannot assign requested address
dhc6: sendpacket6() sent -1 of 80 bytes
XMT: Forming Confirm, 1090 ms elapsed.
XMT:  X-- IA_NA 5a:47:1f:71
XMT:  | X-- Confirm Address 3ffe:501:ffff::4
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 2120ms.
send_packet6: Cannot assign requested address
dhc6: sendpacket6() sent -1 of 80 bytes
XMT: Forming Confirm, 3210 ms elapsed.
XMT:  X-- IA_NA 5a:47:1f:71
XMT:  | X-- Confirm Address 3ffe:501:ffff::4
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 4320ms.
XMT: Forming Confirm, 7530 ms elapsed.
XMT:  X-- IA_NA 5a:47:1f:71
XMT:  | X-- Confirm Address 3ffe:501:ffff::4
XMT:  V IA_NA appended.
XMT: Confirm on eth0, interval 2470ms.
Max retransmission duration exceeded.
PRC: Bound to lease 00:01:00:01:12:e1:92:d9:00:14:22:fd:06:e7.
PRC: Rebind event scheduled in -8604281 seconds, to run for 110 seconds.
PRC: Depreference scheduled in -8604241 seconds.
PRC: Expiration scheduled in -8604171 seconds.
PRC: Rebinding lease on eth0.
PRC: Depreference scheduled in -8604241 seconds.
PRC: Expiration scheduled in -8604171 seconds.
NetworkManager: <info> (eth0): DHCPv6 state changed preinit6 -> bound6
NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP6 Configure Get) scheduled...
NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP6 Configure Get) started...
NetworkManager: <info>   address 3ffe:501:ffff::4
NetworkManager: <info>   prefix 64
NetworkManager: <info>   nameserver '2000::2'
NetworkManager: <info>   domain search 'ibm.com.'
NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
NetworkManager: <info> Activation (eth0) Stage 4 of 5 (IP6 Configure Get) complete.
NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
PRC: Address 3ffe:501:ffff::4 depreferred.
PRC: Expiration scheduled in -8604171 seconds.
PRC: Address 3ffe:501:ffff::4 expired.
PRC: Bound lease is devoid of active addresses.  Re-initializing.
PRC: Soliciting for leases (INIT).
XMT: Forming Solicit, 0 ms elapsed.
XMT:  X-- IA_NA 5a:47:1f:71
XMT:  | X-- Request renew in  +3600
XMT:  | X-- Request rebind in +5400
XMT: Solicit on eth0, interval 1040ms.
Stopping nscd: [  OK  ]
Starting nscd: [  OK  ]
NetworkManager: <info> (eth0): device state change: 7 -> 8 (reason 0)
NetworkManager: <info> Activation (eth0) successful, device activated.
NetworkManager: <info> Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.
NetworkManager: <info> (eth0): DHCPv6 state changed bound6 -> depref6
NetworkManager: <info> (eth0): DHCPv6 state changed depref6 -> expire6
2010-04-23 15:52:09 -07:00
Dan Williams
eaa750dda9 dhcp: add missing DHCPv6 client states 2010-04-23 15:30:46 -07:00
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