This bug was fixed in the package systemd - 242-7ubuntu3.2

systemd (242-7ubuntu3.2) eoan; urgency=medium

  [ Dan Streetman ]
  * d/extra/dhclient-enter-resolved-hook:
    - Replace use of bash-only &> with > and 2> (LP: #1849608)
  * d/p/lp1849658-resolved-set-stream-type-during-DnsStream-creation.patch:
    - Fix bug in refcounting TCP stream types (LP: #1849658)
  * d/extra/dhclient-enter-resolved-hook: cleanup temp $newstate file

  [ Rafael David Tinoco ]
  * Add support to KeepConfiguration= fixing behaviour for HA (LP: #1815101)
    - d/p/lp1815101-01-networkd-add-support-to-keep-configuration.patch
    - d/p/lp1815101-02-networkd-stop-clients-when-networkd-shuts-down.patch
    - d/p/lp1815101-03-network-add-KeepConfiguration-dhcp-on-stop.patch
    - d/p/lp1815101-05-man-add-documentation-about-KeepConfiguration.patch

systemd (242-7ubuntu3.1) eoan; urgency=medium

  [ Balint Reczey ]
  * Fix shutdown and related actions from the login screen (LP: #1847896)
  * debian/gbp.conf: Set debian-branch to ubuntu-eoan
    File: debian/gbp.conf

  [ Dan Streetman ]
  * Fix bogus routes after DHCP lease change (LP: #1831787)
  * Set src address for dhcp 'classless' routes (LP: #1835581)
  * Allows cache=no-negative option to be set, ignoring negative answers to
    be cached (LP: #1668771)

 -- Dan Streetman <>  Fri, 01 Nov 2019 16:33:08

** Changed in: systemd (Ubuntu Eoan)
       Status: Fix Committed => Fix Released

You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.

  networkd-dhcp4 does not set prefsrc for dhcp-provided classless or
  static routes

Status in systemd:
  Fix Released
Status in systemd package in Ubuntu:
  In Progress
Status in systemd source package in Bionic:
  Fix Released
Status in systemd source package in Cosmic:
  Won't Fix
Status in systemd source package in Disco:
  Fix Released
Status in systemd source package in Eoan:
  Fix Released

Bug description:

  the systemd networkd dhcp4 client sets the prefsrc for the default
  route added when a dhcp server provides only the gateway; but if the
  dhcp server provides classless route(s), those are configured instead,
  and the prefsrc is not set for those.

  Normally this is ok, but if the dhcp client system has other
  address(es) configured on the interface using dhcp, then the src for
  packets sent through a classless/static route might not be the same as
  the address provided by the dhcp server.

  If the gateway/router provided in the dhcp classless/static route(s)
  only allows traffic from the address provided to the dhcp client, then
  traffic from the dhcp client may be dropped by the gateway/router.

  [test case]

  set up a dhcp server system (e.g. ubuntu with dnsmasq installed and
  configured) and a dhcp client system.  For example on the dhcp server,
  use this dnsmasq config:


  On the dhcp client system, use networkd config such as:

  $ cat /etc/systemd/network/


  Reboot the client, or restart networkd, and it should result in:

  $ ip -4 a show ens8
  3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP 
group default qlen 1000
      inet brd scope global ens8
         valid_lft forever preferred_lft forever
      inet brd scope global secondary dynamic ens8
         valid_lft 3580sec preferred_lft 3580sec

  $ ip r
  default via dev ens8 proto dhcp src metric 1024 dev ens8 proto kernel scope link src dev ens8 proto dhcp scope link src metric 1024

  Note that, because networkd completes the static ip configuration
  before the dhcp reply is returned and processed, the static address is
  used for the subnet-local routing.  But for global routing through the
  gateway, the dhcp-provided address is used:

  $ ip r get via dev ens8 src uid 1000

  Now on the server, add a classless route:


  and restart dnsmasq on the server.  Then on the client, reboot.  It
  should now have:

  $ ip -4 a show ens8
  3: ens8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP 
group default qlen 1000
      inet brd scope global ens8
         valid_lft forever preferred_lft forever
      inet brd scope global secondary dynamic ens8
         valid_lft 3585sec preferred_lft 3585sec

  $ ip r
  default via dev ens8 proto dhcp metric 1024 dev ens8 proto kernel scope link src

  Now, the global route will use the static address, not the dhcp-
  provided address:

  $ ip r get via dev ens8 src uid 1000

  If the router,, only will forward traffic sent from the dhcp
  address it provided,, then this configuration will result
  in the client being unable to reach anything through the router,
  because all its packets will have a source address of, which
  the router would drop/reject.

  [regression potential]

  this only affects dhcp routes provided by a dhcp server using the
  'static' or 'classless' route dhcp options.  Since this behavior is
  currently the default when a system doesn't add static address(es) to
  interfaces that also get dhcp addresses, this is likely not a change
  in behavior for the vast majority of systems.  And any systems that do
  add static address(es) would usually be able to route through a
  gateway from either the dhcp-provided, or static, address.  So the
  regression potential for this change should be low.

  [other info]

  Note that systemd in Eoan is being upgraded to upstream 242, so I am
  not adding this to Eoan now, as I don't want to disturb the merge.  If
  needed after the merge, I'll add to Eoan.

To manage notifications about this bug go to:

Mailing list:
Post to     :
Unsubscribe :
More help   :

Reply via email to