Commit Graph

7740 Commits

Author SHA1 Message Date
Dan Williams
04ecdb8187 zones: fix up formatting and simplify some functions 2011-11-09 22:06:36 -06:00
Jiri Popelka
62cd6ece48 policy: let firewall know about the zone when connection gets updated 2011-11-09 22:02:02 -06:00
Jiri Popelka
1c0aeb4575 firewall: add firewall manager
src/firewall-manager tracks whether firewall is on the bus or not.
In nm-device.c at stage5 (ip-config-commit) before we actually
apply the IP configuration to the interface, we send the
IP interface name and zone to firewall and asynchronously wait
for a D-Bus reply.  Then after we get the reply
(or if the firewall isn't running) we proceed with
applying the IP configuration to the interface.
2011-11-09 22:02:02 -06:00
Jiri Popelka
9963a41da9 nmcli: add zone field to 'con status' 2011-11-09 21:40:13 -06:00
Jiri Popelka
3e11682ddc ifcfg-rh: read/write zone name from/to ZONE key 2011-11-09 21:40:13 -06:00
Jiri Popelka
04c8ec7360 libnm-util: new 'zone' property for NMSettingConnection
Used to indicate what firewall zone the interface should be in
when the connection is active.
2011-11-09 21:40:12 -06:00
Dan Williams
88faa0e0ca trivial: fix misspelling 2011-11-09 21:36:52 -06:00
Dan Williams
56513f5289 ip6: save autoconf config when starting DHCP
Otherwise it just gets lost, and we want it later to combine with
the DHCP config to get the final config that's applied to the interface.
2011-11-09 21:36:52 -06:00
Dan Williams
314d0968e1 ip6: print RA flags description
Helps debugging:

'S' = RS_SENT
'R' = RA_RCVD
'O' = OTHERCONF
'M' = MANAGED
2011-11-09 21:36:52 -06:00
Dan Williams
8434f3b3e0 core: combine DHCP and RA IPv6 configs when either changes
Since both RA and DHCP may be run at the same time, we want to
make sure to merge both configs into a final config when either
RA or DHCP changes.  Previously this only happened when RA changed,
but not when DHCP changed or completed.  This caused the config
applied when DHCP completed to not contain the RA-derived address,
which was then removed from the device, which then regressed the
IPv6 RA state, causing a device failure.

Found by Tore Anderson

Oct 18 18:35:00 wrath dhclient[13782]: RCV: Reply message on eth0 from fe80::ca6c:87ff:feab:da5f.
Oct 18 18:35:00 wrath NetworkManager[12390]: <info> (eth0): DHCPv6 state changed nbi -> renew6
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642273] [nm-device.c:1582] dhcp6_state_changed(): (eth0): new DHCPv6 client state 7
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642282] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'interface'=>'eth0'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642288] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'new_dhcp6_client_id'=>'0:3:0:1:0:30:1b:bc:7f:23'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642294] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'reason'=>'RENEW6'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642300] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'new_dhcp6_name_servers'=>'2001:840:100:: 2001:840:200::'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642305] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'new_dhcp6_server_id'=>'0:3:0:1:c8:6c:87🆎da:5f'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.642311] [nm-dhcp-client.c:1211] ip6_options_to_config(): (eth0): option 'pid'=>'13782'
Oct 18 18:35:00 wrath NetworkManager[12390]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) scheduled...
Oct 18 18:35:00 wrath NetworkManager[12390]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) started...
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.643641] [nm-system.c:182] sync_addresses(): (eth0): syncing addresses (family 10)
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.643655] [nm-system.c:235] sync_addresses(): (eth0): removing address '2001:840:3033:20:230:1bff:febc:7f23/64'
Oct 18 18:35:00 wrath NetworkManager[12390]: <debug> [1318955700.643702] [nm-system.c:218] sync_addresses(): (eth0): ignoring IPv6 link-local address
Oct 18 18:35:01 wrath NetworkManager[12390]: <info> Policy set 'Wired connection 1' (eth0) as default for IPv4 routing and DNS.
Oct 18 18:35:01 wrath NetworkManager[12390]: <info> Activation (eth0) Stage 5 of 5 (IPv6 Commit) complete.
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656335] [nm-ip6-manager.c:1041] netlink_notification(): netlink notificate type 21
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656345] [nm-ip6-manager.c:542] process_addr(): processing netlink new/del address message
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656359] [nm-ip6-manager.c:1069] netlink_notification(): (eth0): syncing device with netlink changes
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656367] [nm-ip6-manager.c:419] nm_ip6_device_sync_from_netlink(): (eth0): syncing with netlink (ra_flags 0x800000B0) (state/target 'got-address'/'got-address')
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656376] [nm-ip6-manager.c:438] nm_ip6_device_sync_from_netlink(): (eth0): netlink address: fe80::230:1bff:febc:7f23
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656382] [nm-ip6-manager.c:460] nm_ip6_device_sync_from_netlink(): (eth0): addresses synced (state got-address)
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656388] [nm-ip6-manager.c:474] nm_ip6_device_sync_from_netlink(): router advertisement requests parallel DHCPv6
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656393] [nm-ip6-manager.c:512] nm_ip6_device_sync_from_netlink(): (eth0): RA-provided address no longer valid
Oct 18 18:35:01 wrath NetworkManager[12390]: <info> (eth0): DHCPv6 client pid 13782 exited with status 0
Oct 18 18:35:01 wrath NetworkManager[12390]: <debug> [1318955701.656448] [nm-device.c:1582] dhcp6_state_changed(): (eth0): new DHCPv6 client state 23
Oct 18 18:35:01 wrath NetworkManager[12390]: <info> (eth0): device state change: activated -> failed (reason 'ip-config-unavailable') [100 120 5]
2011-11-09 21:36:52 -06:00
Dan Williams
3927ccd1c0 core: decouple initial IP configuration states from device state
Initial IP configuration can happen during ACTIVATED state if both
v4 and v6 are enabled, but one takes longer than the other.  Thus
various checks throughout the code for IP_CONFIG were incorrect
since they depended on IP configuration only happening during the
IP_CONFIG state.  Fix that by using a separate state for IP config
and using that state for various checks instead of the overall
device state.
2011-11-09 21:36:52 -06:00
Dan Williams
bdd556fe4d core: kill stage4 (IP Config Get)
It was somewhat pointless since the IP config is always known when
stage4 gets scheduled, so why not just pass the config to stage5
immediately?  Also helps consolidate the v4/v6 failure handling
logic and makes the operational flow clearer where both v4 and
v6 are active and proceeding in parallel.
2011-11-09 21:36:52 -06:00
Dan Williams
22d72483f6 core: remove unused 'config' parameter from IP timeout methods
Long ago used to create an IPv4 LL config when DHCP failed, but
we don't do that anymore, and it should be done differently anyway.
2011-11-09 21:36:52 -06:00
Dan Williams
31c09eeab2 core: remove unused prototype 2011-11-09 21:36:52 -06:00
Dan Williams
d90f0e186a core: consolidate DHCP failure handling code 2011-11-09 21:36:51 -06:00
Dan Williams
7050e6909c core: more DHCPv6 code shuffle
No functional changes.
2011-11-09 21:36:51 -06:00
Dan Williams
7e1b58234a core: split DHCPv4 and DHCPv6 state and lease handling code 2011-11-09 21:36:51 -06:00
Dan Williams
c821702276 core: move some more code around
No functional changes.
2011-11-09 21:36:51 -06:00
Dan Williams
e8bbcca3b5 core: move some code around
No functional changes, but prepare for splitting DHCPv4 and DHCPv6
code apart.
2011-11-09 21:36:51 -06:00
Mathieu Trudel-Lapierre
d5eee91134 device: allow for applying IPv4 and IPv6 settings in parallel
We don't really need to wait before both IPv4 and IPv6 are established before
applying all the settings to the device. Instead, we can apply each separately
when they are ready, which will bring up the interface sooner.
2011-11-09 21:34:01 -06:00
Dan Williams
e9d998835b wifi: check whether driver supports AP mode (nl80211 only)
For future use of wpa_supplicant's lightweight AP mode instead
of using Ad-Hoc for hotspot stuff.
2011-11-09 21:28:02 -06:00
Dan Williams
8faa032a27 nl80211: use floats for signal quality calculations
Since we're working with numbers less than one but greater than
zero, we need floats.  Otherwise stuff just gets clipped.
2011-11-09 21:28:02 -06:00
Dan Williams
3f39e6a95f build: check for nl80211.h too 2011-11-09 21:28:02 -06:00
Dan Williams
779c1e43d7 wifi: simplify nl80211 bitrate reporting 2011-11-09 21:28:02 -06:00
Dan Williams
55b3059690 wifi: add some logging about nl80211 failures on device setup 2011-11-09 21:28:02 -06:00
Dan Williams
2243980018 todo: nl80211 work is finished 2011-11-09 21:28:02 -06:00
Dan Williams
d043e28b44 wifi: fix some bugs in nl80211 code
A forgotten return caused a free of invalid data on success, and
the txrate should be in Kbps.
2011-11-09 21:28:02 -06:00
Dan Williams
bd66cda773 wifi: add message when WEXT is used 2011-11-09 21:28:02 -06:00
Johannes Berg
ba8527ca58 wifi: preliminary nl80211 patch
Add nl80211 support to wifi utils.
2011-11-09 21:28:02 -06:00
Dan Williams
1189b248e1 wifi/mesh: convert OLPC Mesh WEXT usage to wifi utils 2011-11-09 21:28:02 -06:00
Dan Williams
2dc0f6a375 wifi: add 'check_scan' parameter to wifi utils init
Normal WiFi devices want this (since we dont' support devices that
cannot scan) but OLPC Mesh devices don't.
2011-11-09 21:28:02 -06:00
Dan Williams
fe4c8eb022 wifi: add some mesh bits to wifi utils 2011-11-09 21:28:02 -06:00
Dan Williams
a5c2c47b3e wifi: make wireless-helper.h private to src/
The less stuff that needs WEXT the better.
2011-11-09 21:28:02 -06:00
Dan Williams
46437ed525 wifi: move WEXT-based WiFi interface detection to wifi-utils 2011-11-09 21:28:02 -06:00
Dan Williams
9a629f8cb4 wifi: clean up some usage of wireless-helper.h 2011-11-09 21:28:02 -06:00
Dan Williams
02ecc5cbc4 wifi: split WEXT handling out into its own file 2011-11-09 21:28:01 -06:00
Dan Williams
7d0761588c wifi: remove dependency on wireless-tools/libiw 2011-11-09 21:28:01 -06:00
Dan Williams
316d0ed106 wifi: remove some WEXT leftovers 2011-11-09 21:28:01 -06:00
Dan Williams
47eba095ec wifi: split out WEXT handling code to make nl80211 conversion simpler 2011-11-09 21:28:01 -06:00
Dan Williams
901536e823 release: bump development version to 0.9.3
Remember, releases that end in odd numbers are development releases.
2011-11-09 21:26:45 -06:00
Dan Williams
c04e00219c release: bump version to 0.9.2 2011-11-09 15:28:54 -06:00
David Rothlisberger
acadb7da8b dhclient: pass DBUS_SYSTEM_BUS_ADDRESS environment variable
So that dhclient will, in turn, pass it to the action script
(the action script tries to send a DBus signal to NetworkManager
over the system bus).

Dhclient "execve"s the action script with a hand-constructed environment
that only includes specific variables, plus whatever is passed to
dhclient with "-e".

As far as I know, dhcpcd has no option equivalent to dhclient's "-e".
2011-11-09 11:17:04 -06:00
Dan Williams
c25b97b39f release: update NEWS 2011-11-07 13:33:03 -06:00
Dan Williams
2c5d9fe86b ip6: subscribe to route group so we get RTM_NEWROUTE/RTM_DELROUTE (lp:886410)
Found by Michael Mol; need to subscribe to the group otherwise
we won't get the messages.
2011-11-04 20:10:00 -05:00
Jiří Klimeš
077afa02f5 core: correct shared IP range to be 10.42.x.1 as is documented (bgo #657127)
This fixes possible "overflow" of range from 10.42.x.1 to the fourth (on LSB)
or the second (on MSB) octet.
2011-11-03 09:20:03 +01:00
Mathieu Trudel-Lapierre
fc0739a5d4 dns: don't update routing and DNS if no devices were ever managed (lp:862134)
Avoids blowing away existing routes and resolv.conf if NM never
managed any devices.
2011-11-02 15:28:43 -05:00
Dan Williams
bc8d07a733 Revert "dns: don't update routing and DNS if no devices were ever managed"
This reverts commit 0051b44a09.

While fixing up the patch I (dcbw) forgot to include the lp# in
the commit message.
2011-11-02 15:27:24 -05:00
Dan Williams
e04cbae154 policy: don't update DNS if the hostname hasn't actually changed
This was causing spurious rewrites of resolv.conf.
2011-11-02 15:21:52 -05:00
Dan Williams
a2ec91ca7e dns: remove unused parameter 2011-11-02 15:06:35 -05:00
Mathieu Trudel-Lapierre
0051b44a09 dns: don't update routing and DNS if no devices were ever managed
Avoids blowing away existing routes and resolv.conf if NM never
managed any devices.
2011-11-02 15:05:43 -05:00