Skip to content

Commit 32379b9

Browse files
committed
bgpd: Use the default local-preference value and not 0 when adjusting
If we use something like: route-map x permit 10 set local-preference +10 We treat that a default is 0, but it's not. We MUST respect the default BGP local preference value that is set. Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
1 parent b2cc85b commit 32379b9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

bgpd/bgp_routemap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2399,6 +2399,7 @@ route_set_local_pref(void *rule, const struct prefix *prefix, void *object)
23992399
/* Fetch routemap's rule information. */
24002400
rv = rule;
24012401
path = object;
2402+
locpref = path->peer->bgp->default_local_pref;
24022403

24032404
/* Set local preference value. */
24042405
if (path->attr->local_pref)

0 commit comments

Comments
 (0)