Page MenuHomeVyOS Platform

vyos.vyos: vyos_static_routes mishandles interface next-hops (lost hops, KeyError, facts crash)
Open, NormalPublic

Description

vyos_static_routes keys next-hops on forward_router_address when parsing facts, which is empty for interface next-hops (set protocols static route 10.0.0.0/8 interface eth0). With two interface next-hops the second is merged into the first (name lost, distance applied to the wrong hop); with three, fact gathering fails with 'NoneType' object does not support item assignment. Generating commands for an interface-only next-hop with admin_distance or enabled: false fails with KeyError: 'forward_router_address'.

Fix: key hops on address or interface name, and address interface-only hops as interface Y distance N / interface Y disable (interface-route ... next-hop-interface Y on 1.3).

Details

Version
rolling
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)