Frr 7.5.1 has different behavior for static routes
For example such configuration:
VyOS
set protocols static route 10.0.0.0/8 next-hop 192.0.2.2 commit set protocols static route 10.0.0.0/8 next-hop 192.0.2.2 distance '200' commit
FRR see it as "multinode" as 2 separate routes (Frr 7.5.1)
ip route 10.0.0.0/8 192.0.2.2 ip route 10.0.0.0/8 192.0.2.2 200
Frr 7.3 see it as 1 route
! ip route 10.0.0.0/8 192.0.2.2 200 ! line vty !
So we need to rewrite our node handlers for it
https://github.com/vyos/vyatta-cfg-quagga/blob/equuleus/templates/protocols/static/route/node.tag/next-hop/node.def
https://github.com/vyos/vyatta-cfg-quagga/blob/equuleus/templates/protocols/static/interface-route/node.tag/next-hop-interface/node.def
In other words we can't delete static routes in 7.5.1 now for 1.3 with distance
set protocols static interface-route 10.0.0.0/8 next-hop-interface dum08765 set protocols static route 10.0.0.0/8 next-hop 192.0.2.2 commit set protocols static interface-route 10.0.0.0/8 next-hop-interface dum08765 distance '200' set protocols static route 10.0.0.0/8 next-hop 192.0.2.2 distance '200' commit del protocols commit
vtysh
! ip route 10.0.0.0/8 192.0.2.2 200 ip route 10.0.0.0/8 dum08765 200 ! line vty !
Smoketest fail for routes with distance
07:23:08 DEBUG - Running Testcase: /usr/libexec/vyos/tests/smoke/cli/test_protocols_static.py 07:23:17 DEBUG - test_interface_routes (__main__.StaticRouteTest) ... ok 07:23:23 DEBUG - test_static_routes (__main__.StaticRouteTest) ... FAIL 07:23:23 DEBUG - 07:23:23 DEBUG - ====================================================================== 07:23:23 DEBUG - FAIL: test_static_routes (__main__.StaticRouteTest) 07:23:23 DEBUG - ---------------------------------------------------------------------- 07:23:23 DEBUG - Traceback (most recent call last): 07:23:23 DEBUG - File "/usr/libexec/vyos/tests/smoke/cli/test_protocols_static.py", line 112, in test_static_routes 07:23:23 DEBUG - self.assertTrue(found) 07:23:23 DEBUG - AssertionError: False is not true
Because in the "test_interface_routes" expect one route (node "dev")
{
"type":"unicast",
"dst":"10.0.0.0/8",
"nhid":41,
"dev":"dum08765",
"protocol":"static",
"scope":"global",
"metric":20,
"flags":[
]But get 2 routes (one route with distance was not deleted)
{
"type":"unicast",
"dst":"10.0.0.0/8",
"nhid":243,
"protocol":"static",
"scope":"global",
"metric":20,
"flags":[
],
"nexthops":[
{
"dev":"dum08765",
"weight":1,
"flags":[
]
},
{
"gateway":"192.0.2.2",
"dev":"dum08765",
"weight":1,
"flags":[
]
}
]
}