route with link scope must not required a via parameter

Bug #1777681 reported by Jean-Daniel Dupas
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
Undecided
Unassigned

Bug Description

I'm trying to define a route to a single host via a link.
This can be done either using 'ip'

ip route add 192.168.0.1/32 dev enp1s0

or using systemd unit:

[Route]
Destination=192.168.0.1/32
Scope=link

but when I try to define such route in netplan:

- { to: 192.168.0.1/32, scope: link }

it fails with the error:

'Error in network definition //etc/netplan/20-vip.yaml line 8 column 8: unicast route must include both a 'to' and 'via' IP'

Revision history for this message
Lukasz Klimek (lklimek) wrote :

Workaround: use "via: 0.0.0.0"

Revision history for this message
Daniel Axtens (daxtens) wrote :

Hi,

I can confirm this. We've also seen this in LP: #1789862, and a fix has been committed in https://github.com/CanonicalLtd/netplan/pull/33

Regards,
Daniel

Changed in netplan:
status: New → Confirmed
status: Confirmed → Fix Committed
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Fixed in netplan.io version 0.40 and above (so released in 18.04 and later releases).

This is fixed in https://github.com/CanonicalLtd/netplan/commit/b4f4c637ded8750414081247a874df4683d86e32

Changed in netplan:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.