After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 749052 - static IP addresses no longer applied
static IP addresses no longer applied
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
git master
Other Linux
: Normal normal
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-05-07 06:06 UTC by Mantas Mikulėnas (grawity)
Modified: 2015-05-11 19:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
device: fix configuring static ip addresses (2.26 KB, patch)
2015-05-07 08:53 UTC, Thomas Haller
none Details | Review

Description Mantas Mikulėnas (grawity) 2015-05-07 06:06:41 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
Comment 1 Mantas Mikulėnas (grawity) 2015-05-07 06:09:32 UTC
(commit was part of the fix for bug 740443)
Comment 2 Thomas Haller 2015-05-07 08:53:01 UTC
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
Comment 3 Thomas Haller 2015-05-07 08:54:14 UTC
(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!!
Comment 4 Beniamino Galvani 2015-05-11 12:16:56 UTC
The patch works for me and looks good.