Bug 1369905 - [RFE] NetworkManager only configures static/manual IP addresses after DHCP completes
Summary: [RFE] NetworkManager only configures static/manual IP addresses after DHCP co...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: NetworkManager
Version: 7.3
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Beniamino Galvani
QA Contact: Desktop QE
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-08-24 16:37 UTC by Thomas Haller
Modified: 2019-08-06 13:16 UTC (History)
9 users (show)

Fixed In Version: NetworkManager-1.16.2-0.1.20190328git8ec0954570.el7
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1695070 (view as bug list)
Environment:
Last Closed: 2019-08-06 13:16:20 UTC
Target Upstream Version:


Attachments (Terms of Use)
[PATCH] device: apply static addresses immediately for DHCPv4 method (5.70 KB, patch)
2018-08-01 15:18 UTC, Beniamino Galvani
no flags Details | Diff
[NM-CI PATCH] ipv4: add test @ipv4_dhcp_apply_static_address_immediately (2.30 KB, patch)
2018-08-01 15:20 UTC, Beniamino Galvani
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2302 0 None None None 2019-08-06 13:16:36 UTC

Description Thomas Haller 2016-08-24 16:37:55 UTC
subject...

it means, if you have a connection with ipv4.method=auto and additional static addresses ipv4.addresses, that the static addresses are not configured as early as possible, but only after DHCP completes.

That should be improved.

Comment 2 Beniamino Galvani 2018-07-06 16:53:00 UTC
Please review branch bg/dhcpv4-static-addr-rh1369905.

Comment 3 Thomas Haller 2018-07-11 15:27:50 UTC
(In reply to Beniamino Galvani from comment #2)
> Please review branch bg/dhcpv4-static-addr-rh1369905.

nice work, thanks for pushing this forward...


first patch lgtm. Maybe merge that one early and backport to 1.12.


Second patch also looks fine, but I think it could be improved.

Optimally, handling of manual addresses is always done the same, regardless of the ipv4.method. In the patch, it's once handled under

  if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0) {

and then again below under

  } else if (strcmp (method, NM_SETTING_IP4_CONFIG_METHOD_MANUAL) == 0) {

I think these two places should be unified.


For example, both places result in the callbacks ipv4_dhcp_method_apply_manual() vs. ipv4_manual_method_apply(). These two callbacks look rather similar, is it really necessary that they are different? It seems to me, when ACD calls back, there should be one callback, and that should then figure out what to do (possibly on the enabled IP methods, etc). This is only a small example, where I think manual-addressing should be handled identical, both with method=auto and method=manual.

Comment 4 Beniamino Galvani 2018-08-01 15:18:52 UTC
Created attachment 1472140 [details]
[PATCH] device: apply static addresses immediately for DHCPv4 method

Comment 5 Beniamino Galvani 2018-08-01 15:20:04 UTC
Created attachment 1472141 [details]
[NM-CI PATCH] ipv4: add test @ipv4_dhcp_apply_static_address_immediately

Comment 6 Thomas Haller 2018-08-02 08:37:31 UTC
(In reply to Beniamino Galvani from comment #4)
> Created attachment 1472140 [details]
> [PATCH] device: apply static addresses immediately for DHCPv4 method

lgtm

Comment 11 errata-xmlrpc 2019-08-06 13:16:20 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2019:2302


Note You need to log in before you can comment on or make changes to this bug.