Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions cloudinit/net/ephemeral.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,14 @@ def _bringup_static_routes(self):
via_arg = []
if gateway != "0.0.0.0":
via_arg = ["via", gateway]

# Use "append" rather than "add" since the DHCP server may provide
# rfc3442 classless static routes with multiple routes to the same
# subnet via different routers or local interface addresses.
#
# In this scenario, `ip r add` fails.
#
# RHBZ: #2003231
subp.subp(
["ip", "-4", "route", "append", net_address]
+ via_arg
Expand Down