]> git.puffer.fish Git - mirror/frr.git/commitdiff
bgpd: Update flag after frrscript call
authorDonald Lee <dlqs@gmx.com>
Sun, 27 Jun 2021 21:38:37 +0000 (05:38 +0800)
committerDonald Lee <dlqs@gmx.com>
Sun, 27 Jun 2021 21:42:06 +0000 (05:42 +0800)
Signed-off-by: Donald Lee <dlqs@gmx.com>
bgpd/bgp_routemap.c

index 3a329792ac407a206ae48d1e58832446ba435be9..c298b8d8ccef261179abc0ee0c1ad53971f3231f 100644 (file)
@@ -407,6 +407,9 @@ route_match_script(void *rule, const struct prefix *prefix, void *object)
        case LUA_RM_MATCH_AND_CHANGE:
                status = RMAP_MATCH;
                zlog_debug("Updating attribute based on script's values");
+               if (path->attr->local_pref != 0)
+                       SET_FLAG(path->attr->flag,
+                                ATTR_FLAG_BIT(BGP_ATTR_LOCAL_PREF));
                break;
        case LUA_RM_MATCH:
                status = RMAP_MATCH;