Bug 1663365

Summary: systemd-networkd ignores UseRoutes=false in [DHCP] of .network file
Product: Red Hat Enterprise Linux 7 Reporter: Robert Scheck <redhat-bugzilla>
Component: systemdAssignee: systemd-maint
Status: CLOSED ERRATA QA Contact: Frantisek Sumsal <fsumsal>
Severity: high Docs Contact:
Priority: unspecified    
Version: 7.6CC: apmukher, fsumsal, jsynacek, julianf, lnykryn, systemd-maint-list
Target Milestone: rc   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: systemd-219-64.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-08-06 12:43:36 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch suggestion redhat-bugzilla: review? (jsynacek)

Description Robert Scheck 2019-01-04 04:19:53 UTC
Description of problem:
systemd-networkd ignores UseRoutes=false in [DHCP] of .network file, this
is upstream bug report https://github.com/systemd/systemd/issues/2282

Version-Release number of selected component (if applicable):
systemd-networkd-219-62.el7.x86_64

How reproducible:
$ cat /etc/systemd/network/wired.network 
[Match]
Name=eth0

[Network]
DHCP=ipv4

[DHCP]
UseRoutes=false
$ 

Even "UseRoutes=false" is set, there is still the default route from DHCP.

Actual results:
systemd-networkd ignores UseRoutes=false in [DHCP] of .network file.

Expected results:
systemd-networkd properly handles UseRoutes=false in [DHCP] of .network file.

Additional info:
Upstream patch is https://github.com/systemd/systemd/pull/3075

Comment 2 Jan Synacek 2019-01-04 07:21:22 UTC
systemd-networkd is shipped in the optional channel and is not supported. However, the fix is trivial and I'd say we could fix this as OtherQA or maybe even SanityOnly.

Comment 3 Robert Scheck 2019-01-14 00:26:29 UTC
Created attachment 1520395 [details]
Patch suggestion

Initially mentioned patch solves the issue (tested), but to make really sense, the following patches should be IMHO included as well:

 - https://github.com/systemd/systemd/commit/223932c786ada7f758a7b7878a6ad2dae0d1e5fb
 - https://github.com/systemd/systemd/pull/6594/commits/e98d8eac0ff3da6ed46d76c80a0f1200833707c7

The result is this patch suggestion.

Comment 4 Robert Scheck 2019-01-14 00:50:50 UTC
Filed case #02290894 at the Red Hat customer portal.

Comment 6 Jan Synacek 2019-01-15 12:37:16 UTC
Testing packages can be found at http://people.redhat.com/~jsynacek/systemd/bz1663365-dhcp-useroutes/.

Comment 7 Jan Synacek 2019-01-15 12:41:12 UTC
https://github.com/lnykryn/systemd-rhel/pull/270

Comment 8 Robert Scheck 2019-01-17 15:21:25 UTC
(In reply to Jan Synacek from comment #7)
> https://github.com/lnykryn/systemd-rhel/pull/270

Most of the packages there have a size of zero bytes, feels like a broken upload.

Comment 9 Apurbita Mukherjee 2019-01-18 06:53:04 UTC
(In reply to Robert Scheck from comment #8)
> (In reply to Jan Synacek from comment #7)
> > https://github.com/lnykryn/systemd-rhel/pull/270
> 
> Most of the packages there have a size of zero bytes, feels like a broken
> upload.

Yes, Robert seems so that's why couldn't able to upload the rest of the files with the case.

Comment 10 Jan Synacek 2019-01-18 08:04:10 UTC
I didn't realize that the quota was so low and in truncated the rest of my upload. I've rebuilt and reuploaded the packages.

Please, try again. The packages are there now.

Comment 11 Robert Scheck 2019-01-18 20:13:00 UTC
(In reply to Jan Synacek from comment #10)
> Please, try again. The packages are there now.

Thanks; systemd-networkd-219-63.el7.bz1663365_dhcp_useroutes.x86_64.rpm works here as expected.

Comment 12 Lukáš Nykrýn 2019-02-07 09:12:09 UTC
fix merged to staging branch -> https://github.com/lnykryn/systemd-rhel/pull/270 -> post

Comment 15 errata-xmlrpc 2019-08-06 12:43:36 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/RHSA-2019:2091