Page MenuHomeVyOS Platform

ospfv3 route-map not applied in FRR configuration
Closed, ResolvedPublicBUG

Description

Configuration excerpt:

policy {
    route-map CL_OSPF_IN {
        rule 10 {
            action deny
            match {
                ip {
                    address {
                        prefix-len 0
                    }
                }
            }
        }
        rule 20 {
            action permit
        }
    }
    route-map CL_OSPF_IN6 {
        rule 10 {
            action deny
            match {
                ipv6 {
                    address {
                        prefix-len 0
                    }
                }
            }
        }
        rule 20 {
            action permit
        }
    }
}
protocols {
    ospf {
        interface eth0 {
            area 0
        }
        log-adjacency-changes {
        }
        parameters {
            router-id 1.2.3.4
        }
        redistribute {
            static {
            }
        }
        route-map CL_OSPF_IN
    }
    ospfv3 {
        interface eth0 {
            area 0
        }
        log-adjacency-changes {
        }
        parameters {
            router-id 1.2.3.4
        }
        redistribute {
            static {
            }
        }
        route-map CL_OSPF_IN6
    }

The resulting /etc/frr/frr.conf includes:

route-map CL_OSPF_IN6 deny 10
 match ipv6 address prefix-len 0
exit
!
route-map CL_OSPF_IN6 permit 20
exit
!
route-map CL_OSPF_IN deny 10
 match ip address prefix-len 0
exit
!
route-map CL_OSPF_IN permit 20
exit
!
ip protocol ospf route-map CL_OSPF_IN

but no equivalent of the last line for ospf6. I think the code to apply route maps is simply absent from /usr/libexec/vyos/conf_mode/protocols_ospfv3.py:

root@glenachulish:/usr/libexec/vyos/conf_mode# grep frr_cfg.modify_section protocols_ospf.py
    frr_cfg.modify_section('(\s+)?ip protocol ospf route-map [-a-zA-Z0-9.]+', stop_pattern='(\s|!)')
    frr_cfg.modify_section(f'^router ospf{vrf}', stop_pattern='^exit', remove_stop_mark=True)
            frr_cfg.modify_section(f'^interface {interface}{vrf}', stop_pattern='^exit', remove_stop_mark=True)
root@glenachulish:/usr/libexec/vyos/conf_mode# grep frr_cfg.modify_section protocols_ospfv3.py
    frr_cfg.modify_section(f'^router ospf6{vrf}', stop_pattern='^exit', remove_stop_mark=True)
            frr_cfg.modify_section(f'^interface {interface}{vrf}', stop_pattern='^exit', remove_stop_mark=True)

Details

Difficulty level
Unknown (require assessment)
Version
1.4-rolling-202303081533
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)

Event Timeline

Viacheslav changed the task status from Open to In progress.Mar 14 2023, 9:51 AM
Viacheslav claimed this task.

PR https://github.com/vyos/vyos-1x/pull/1888

set policy route-map RMAP6 rule 10 action 'deny'
set policy route-map RMAP6 rule 10 match ip address prefix-len '0'
set protocols ospfv3 route-map 'RMAP6'

Zebra config

vyos@r14# vtysh -c "show run zebra"
Building configuration...

Current configuration:
!
frr version 8.4.2
frr defaults traditional
hostname debian
log syslog
log facility local7
hostname r14
service integrated-vtysh-config
!
route-map RMAP6 deny 10
 match ip address prefix-len 0
exit
!
ipv6 protocol ospf6 route-map RMAP6
!
end
[edit]
vyos@r14#

Will be fixed in the next rolling release

Viacheslav changed the task status from In progress to Needs testing.Mar 14 2023, 12:54 PM
Viacheslav moved this task from Need Triage to Finished on the VyOS 1.4 Sagitta board.

We actually need the same for BGP...