summaryrefslogtreecommitdiff
path: root/lib/command.c
diff options
context:
space:
mode:
authorDonatas Abraitis <donatas@opensourcerouting.org>2022-06-06 09:49:37 +0300
committerDonatas Abraitis <donatas@opensourcerouting.org>2022-06-06 10:28:50 +0300
commit0f05ea43b0c18c890ef0faf81de1d4ad74893d86 (patch)
tree5a9831f0487ad01f9d04b2ea7a03a7bfffcc64db /lib/command.c
parent23a1220847f020c126aa5ac696e191dd8c4450ae (diff)
bgpd: Initialize attr->local_pref to the configured default value
When we use network/redistribute local_preference is configured inproperly when using route-maps something like: ``` network 100.100.100.100/32 route-map rm1 network 100.100.100.200/32 route-map rm2 route-map rm1 permit 10 set local-preference +10 route-map rm2 permit 10 set local-preference -10 ``` Before: ``` root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.100/32 json' | jq '.paths[].locPrf' 10 root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.200/32 json' | jq '.paths[].locPrf' 0 ``` After: ``` root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.100/32 json' | jq '.paths[].locPrf' 110 root@spine1-debian-11:~# vtysh -c 'show bgp ipv4 unicast 100.100.100.200/32 json' | jq '.paths[].locPrf' 90 ``` Set local-preference as the default value configured per BGP instance, but do not set LOCAL_PREF flag by default. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
Diffstat (limited to 'lib/command.c')
0 files changed, 0 insertions, 0 deletions