Page MenuHomeVyOS Platform

static route blackhole, not respecting distance
Closed, ResolvedPublicBUG

Description

When setting a blackholed static route, the distance is not set correctly. Metric 20 seems to be an FRR default?

Sample config

 protocols {
     static {
         route 0.0.0.0/8 {
             blackhole {
                 distance 80
             }
         }
     }
}

'ip ro' command then displays

blackhole 0.0.0.0/8 proto static metric 20

'route -n' also dislayed incorrect metric

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         0.0.0.0         255.0.0.0       U     20     0        0 *

DHCP distance also does not seem to be applying and defaults to 20

Details

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

Event Timeline

vtysh show ip route, shows correct route

S>* 0.0.0.0/8 [80/0] unreachable (blackhole), weight 1, 2d08h41m

So if FRR takes over routing, why is it in ip route?

curtdept claimed this task.

It appears this is by design, FRR creates kernel routes with metric 20

see https://docs.frrouting.org/en/latest/zebra.html#route-replace-semantics
and https://github.com/FRRouting/frr/issues/14656