GNOME Bugzilla – Bug 749052
static IP addresses no longer applied
Last modified: 2015-05-11 19:45:50 UTC
I have multiple Ethernet profiles, created through gnome-control-center – one for DHCP and two with static IP4 addresses. Starting with 1.1.0-dev commit 557667df12fc05b ("device: better accept external IP changes"), DHCP4 still works, but *no addresses are assigned at all* when activating the static IP4 profiles. (`ip monitor` does not show them.) Regular log says nothing at all: --- NetworkManager[362031]: <info> (eth0): Activation: starting connection 'Ethernet (Static internal)' NetworkManager[362031]: <info> (eth0): Activation: Stage 1 of 5 (Device Prepare) scheduled... NetworkManager[362031]: <info> (eth0): Activation: Stage 1 of 5 (Device Prepare) started... NetworkManager[362031]: <info> (eth0): device state change: disconnected -> prepare (reason 'none') [30 40 0] NetworkManager[362031]: <info> NetworkManager state is now CONNECTING NetworkManager[362031]: <info> (eth0): Activation: Stage 2 of 5 (Device Configure) scheduled... NetworkManager[362031]: <info> (eth0): Activation: Stage 1 of 5 (Device Prepare) complete. NetworkManager[362031]: <info> (eth0): Activation: Stage 2 of 5 (Device Configure) starting... NetworkManager[362031]: <info> (eth0): device state change: prepare -> config (reason 'none') [40 50 0] NetworkManager[362031]: <info> (eth0): Activation: Stage 2 of 5 (Device Configure) successful. NetworkManager[362031]: <info> (eth0): Activation: Stage 2 of 5 (Device Configure) complete. NetworkManager[362031]: <info> (eth0): Activation: Stage 3 of 5 (IP Configure Start) scheduled. NetworkManager[362031]: <info> (eth0): Activation: Stage 3 of 5 (IP Configure Start) started... NetworkManager[362031]: <info> (eth0): device state change: config -> ip-config (reason 'none') [50 70 0] NetworkManager[362031]: <info> (eth0): Activation: Stage 5 of 5 (IPv4 Configure Commit) scheduled... NetworkManager[362031]: <info> (eth0): Activation: Stage 3 of 5 (IP Configure Start) complete. NetworkManager[362031]: <info> (eth0): Activation: Stage 5 of 5 (IPv4 Commit) started... NetworkManager[362031]: <info> (eth0): device state change: ip-config -> ip-check (reason 'none') [70 80 0] NetworkManager[362031]: <info> (eth0): Activation: Stage 5 of 5 (IPv4 Commit) complete. NetworkManager[362031]: <info> (eth0): device state change: ip-check -> secondaries (reason 'none') [80 90 0] NetworkManager[362031]: <info> (eth0): device state change: secondaries -> activated (reason 'none') [90 100 0] NetworkManager[362031]: <info> NetworkManager state is now CONNECTED_LOCAL NetworkManager[362031]: <info> (eth0): Activation: successful, device activated. --- The profiles look like: --- [connection] id=Ethernet (Static internal) uuid=9bcd2484-18a1-45c4-8cbd-b7aecae1c917 type=ethernet autoconnect=false timestamp=1408609815 [ethernet] mac-address=F4:6D:04:85:FC:D7 [ipv4] method=manual address1=192.168.0.100/24 address2=192.168.1.100/24 address3=10.128.0.100/16 ignore-auto-routes=true ignore-auto-dns=true never-default=true --- NetworkManager 1.1.0-dev git
(commit was part of the fix for bug 740443)
Created attachment 303016 [details] [review] device: fix configuring static ip addresses When a connection had static ip-addresses, an early event from plaform would clear them from priv->con_ip4_config. Fix that, by don't initializing priv->con_ip4_config before we commit the first time. https://bugzilla.gnome.org/show_bug.cgi?id=749052 Fixes: 557667df12fc05b76326d6406553985effeeb2ac
(In reply to Mantas Mikulėnas from comment #0) > Starting with 1.1.0-dev commit 557667df12fc05b ("device: better accept > external IP changes"), DHCP4 still works, but *no addresses are assigned at > all* when activating the static IP4 profiles. (`ip monitor` does not show > them.) good catch. Thanks for pointing out the commit that introduced the bug!!
The patch works for me and looks good.
merged to master: http://cgit.freedesktop.org/NetworkManager/NetworkManager/commit/?id=843205521fd45ee5e73b26696cc5f6b82853709c