Commit graph

205 commits

Author SHA1 Message Date
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
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
7e980d8be3 ip6: fix manual IP config application 2010-04-30 15:49:41 -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
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
4a2bb8b647 core: don't even bother running IPv4 or IPv6 when they are disabled 2010-04-23 12:56:33 -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
87c6e5db76 netlink: merge nm-netlink.c into nm-netlink-monitor.c 2010-04-20 17:22:58 -07:00
Dan Williams
5e6ae3b226 core: don't require IPv4 configuration during activation 2010-04-15 14:59:29 -07:00
Dan Williams
c049680515 core: use constant instead of hardcoding a string 2010-04-15 14:54:22 -07:00
Dan Williams
c57c40a621 core: fix device log message in UNAVAILABLE state 2010-04-08 15:51:54 -07:00
Dan Williams
b0f056d787 core: log device delayed state transitions 2010-04-07 16:41:44 -07:00
Dan Williams
058f1edb40 core: update base device logging 2010-04-07 12:31:39 -07:00
Dan Williams
89af61f73c core: better matching of rfkill types
This also fixes a bug where WWAN devices were not correctly
recognized for enable/disable operations.
2010-03-25 11:36:19 -07:00
Dan Williams
9e627d1bce trivial: rename some CamelCase source files to not-camel-case 2010-03-02 15:06:14 -08:00
Dan Williams
35c4b97d7d dhcp6: first stab at autoconf otherconf/managed mode support 2010-01-27 16:20:09 -08:00
Dan Williams
fbe413cbcd dhcp: ensure DHCP client is stopped on timeout 2010-01-15 12:50:38 -08:00
Dan Williams
f9bd97020d ipv6: push router advertisement flags to listeners 2010-01-14 22:57:51 -08:00
Dan Williams
a9e32f3c3b dhcp: add initial DHCPv6 support (managed mode only) 2010-01-14 00:45:10 -08:00
Dan Williams
9e805187cd core: rename some DHCPv4 specific variables 2010-01-13 18:06:05 -08:00
Dan Williams
2a718bbb1b core: simplify DHCP setup and cleanup
nm_device_set_use_dhcp() and nm_device_get_use_dhcp() were somewhat
confusing and don't really reflect the new DHCP architecture with
NMDHCPClient.  Now that timeout and state signals are specific to
the NMDHCPClient it doesn't make sense to check for DHCP use
in the callbacks for those signals since they'll never get called
if DHCP isn't in use.  We might as well just keep the DHCP manager
around and check whether a DHCP client instance exists when we need
to figure out whether DHCP is in use.
2010-01-13 17:59:54 -08:00
Dan Williams
fe62e59c7e dhcp: add DHCPv6 functionality 2010-01-13 16:51:20 -08:00
Dan Williams
1806235049 dhcp: convert dhcp backends to classes 2010-01-12 22:09:28 -08:00
Dan Williams
d997785db3 dhcp6: genericize DHCP client tracking
Since the same interface could be used for both	DHCPv4 and DHCPv6 we
can't just use 'iface' for tracking DHCP client lease changes.  Instead
use a generated client ID, and track DHCP events based on the client's
PID instead of interface name.
2010-01-08 17:16:05 -08:00
Dan Williams
3ee1eb7a6c dhcp6: add dhclient ipv6 states 2010-01-08 15:22:11 -08:00
Dan Williams
23fec8dc72 ip6: save the accept_ra value and re-set it when the device is deactivated 2009-10-19 15:38:21 -07:00
Dan Williams
442dc676ef ip6: use device's IP interface, not its physical interface 2009-10-19 14:05:36 -07:00
Dan Williams
aa7bb93968 core: spacing fix 2009-09-28 10:49:55 -07:00
Dan Williams
99fb844657 core: device disconnection cleanups
Return an error when trying to disconnect an already-disconnected
or deactivated device.
2009-09-18 09:05:11 -07:00
Alexander Sack
2be94b44c3 core: implement manual disconnect feature
In the past networkmanager did not allow to manually disconnect devices.

Manually disconnected devices will not be automatically reconnected until one
of the following events occur:
 1. user activates a connection for the currently disconnected device
 2. network manager awakes from hibernate/suspend
 3. network manager is restarted (e.g. reboot)

Add a Disconnect method to generic NMDevice dbus interface; set a new private
autoconnect_inhibit flag if Disconnect method is called through dbus.
Based on this auto activation for devices gets inhibited until one
of the above events occur.
2009-09-18 17:06:48 +02:00
Dan Williams
7a2e2cfda3 core: rename nm_device_can_activate -> nm_device_is_available
Becuase when the device is in >= DISCONNECTED state, that already
means it can activate if a connection is available.
2009-09-14 13:33:06 -07:00
Dan Williams
393bdd3737 core: generalize unavailable -> disconnected delayed transition
Instead of doing this in every device subclass, do it in the NMDevice
superclass.  nm_device_can_activate() already did the same logic that
each of the subclass device_state_changed() handlers were doing to
figure out whether they could do the transition from unavailable
to disconnected, so just use that in NMDevice and kill lots of code.
2009-09-14 13:24:29 -07:00
Dan Winship
7344cc186d Add NMIP6Manager to handle IPv6 addrconf
Automatic IPv6 configuration is handled by the kernel, but to
integrate it properly with NetworkManager, we need to watch what the
kernel does to see whether or not it was successful (so that we can
let the user know if there is no IPv6 router present, for example).
NMIP6Manager takes care of this.
2009-08-26 14:37:45 -04:00
Alexander Sack
b6637b2053 core: make sure device interfaces are up before ip4 configuration 2009-08-20 21:02:17 +02:00
Dan Williams
c2fb1f850a gsm/bt: fix merge of user-defined IPv4 settings 2009-08-17 19:48:42 -05:00
Dan Williams
78bb1c01b7 core: implement connection assumption
Mark activation requests that contain connections to be assumed,
and use that to short-circuit various parts of the activation
process by not touching various device attributes, since they
are already set up.  Also ensure the device is not deactivated
when it initially becomes managed, because that would kill the
connection we are about to assume.
2009-08-05 18:03:09 -04:00
Dan Williams
4802094985 Merge commit 'origin/master' into iscsi 2009-08-05 15:46:11 -04:00
Dan Williams
f2eb3dea65 core: base infrastructure for connection assumption
Figure out what connections can be assumed when a device is added,
and on shutdown don't blow away connections that can be assumed on
NM restart.
2009-08-03 17:15:03 -04:00
Dan Winship
fc8e609784 Initial IPv6 support (only handles "manual" and "ignore" currently) 2009-07-29 21:35:01 -04:00
Daniel Drake
8f0652a9f0 core: allow devices to suppress other device's autoconnect
This allows a device (or a companion) to signal that it is not a good
time for a specific device to autoconnect to a network.

The OLPC mesh device will use this to prevent automatic connection
to WLAN networks while the mesh device is active.
2009-07-15 17:22:10 -04:00
Daniel Drake
3fe8d0eed4 core: allow devices to specify a DHCP anycast address
Relevant only for OLPC at this point; the mesh device uses it to
target DHCP requests at a pre-defined mesh portal anycast address.
2009-07-15 13:53:49 -04:00
Daniel Drake
0f56957b77 core: allow device subclasses to override DHCP timeout 2009-07-15 13:48:28 -04:00
Dan Williams
be9bc944d4 core: fix setting device type during device creation 2009-07-07 22:25:58 -04:00
Dan Williams
b62ff36e33 core: get rid of nm_device_set_device_type() 2009-07-07 14:57:05 -04:00
Dan Williams
fa2bde265e core: kill nm_print_device_capabilities() 2009-07-07 14:38:55 -04:00
Dan Williams
a0629647e2 core: use NMDevicePrivate everywhere 2009-07-07 14:34:01 -04:00