Skip to content

Commit

Permalink
bgpd: Use int, not long long for route-map action in Lua script
Browse files Browse the repository at this point in the history
This is an issue for big-endian architectures, that causes incorrect castings.

lua_tointegerp() uses int*, not long long*.

Signed-off-by: Donatas Abraitis <donatas@opensourcerouting.org>
  • Loading branch information
ton31337 committed Nov 18, 2024
1 parent af0b4b1 commit 3ba4383
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bgpd/bgp_routemap.c
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,7 @@ route_match_script(void *rule, const struct prefix *prefix, void *object)
return RMAP_NOMATCH;
}

long long *action = frrscript_get_result(fs, routematch_function,
int *action = frrscript_get_result(fs, routematch_function,
"action", lua_tointegerp);

int status = RMAP_NOMATCH;
Expand Down

0 comments on commit 3ba4383

Please sign in to comment.