From 3ba4383de8e8c0bf4d054caa8f65ce8a0a983340 Mon Sep 17 00:00:00 2001 From: Donatas Abraitis Date: Mon, 18 Nov 2024 11:10:22 +0200 Subject: [PATCH] bgpd: Use int, not long long for route-map action in Lua script This is an issue for big-endian architectures, that causes incorrect castings. lua_tointegerp() uses int*, not long long*. Signed-off-by: Donatas Abraitis --- bgpd/bgp_routemap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bgpd/bgp_routemap.c b/bgpd/bgp_routemap.c index 8666831c7f59..bc384c4a7501 100644 --- a/bgpd/bgp_routemap.c +++ b/bgpd/bgp_routemap.c @@ -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;