Page MenuHomeVyOS Platform

Unable to subtract value from local-preference in route-map
Closed, ResolvedPublicFEATURE REQUEST

Description

When trying to lower the local preference in a route-map, I get an error:

[email protected]# set rule 300 set local-preference "-10"
 "-10" is not a valid value of type "u32"

Even though http://docs.frrouting.org/en/latest/routemap.html?highlight=local-preference#clicmd-setlocal-preferenceLOCAL_PREF mentions that the local preference can be lowered like this.

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.2.6-S1
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible

Event Timeline

@tuxis-ie
FRR doesn't allow you to set that value. It's not a bug of VyOS.
In commands description allowed values (0-4294967295)

r12-1.2.6(config)# route-map FOO permit 100
r12-1.2.6(config-route-map)# set local-preference 
  (0-4294967295)  Preference value
r12-1.2.6(config-route-map)# set local-preference 
  (0-4294967295)  Preference value
r12-1.2.6(config-route-map)# set local-preference -10
% Unknown command: set local-preference -10

I think the FRR documentation is out of date.

@tuxis-ie we are running FRR 7.3 and can not easily upgrade to 7.4 due do changes in the FRR behavior and known bugs which we already faced in a rolling release which was running FRR 7.5.

Very well.

Suggestions on how to achieve the same behaviour are welcome.

I think this bug should be a feature-request for a later version of Vyos which includes FRR >7.4?

Viacheslav changed the subtype of this task from "Bug" to "Feature Request".Jan 6 2021, 2:48 PM
Viacheslav edited projects, added VyOS 1.4 Sagitta; removed VyOS 1.2 Crux.
Viacheslav triaged this task as Normal priority.Feb 22 2021, 9:48 AM
Viacheslav changed Difficulty level from Unknown (require assessment) to Easy (less than an hour).

As we use 7.5 in 1.4 now, we can implement that feature.

PR https://github.com/vyos/vyatta-cfg-quagga/pull/72

VyOS config

set policy route-map FOO rule 10 action 'permit'
set policy route-map FOO rule 10 set local-preference '+25'

FRR config

!
route-map FOO permit 10
 set local-preference +25
!
Viacheslav claimed this task.