From 00d9e83a3ff388f53cbe252632ff94dc4dcc1fbd Mon Sep 17 00:00:00 2001 From: Quentin Young Date: Sun, 29 Nov 2020 13:21:14 -0500 Subject: [PATCH] lib: encode plen when passing prefixes to scripts Signed-off-by: Quentin Young --- lib/frrlua.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/frrlua.c b/lib/frrlua.c index 4d576829c5..eeac98ccd8 100644 --- a/lib/frrlua.c +++ b/lib/frrlua.c @@ -78,7 +78,9 @@ int frrlua_newtable_prefix(lua_State *L, const struct prefix *prefix) lua_newtable(L); lua_pushstring(L, prefix2str(prefix, buffer, 100)); - lua_setfield(L, -2, "route"); + lua_setfield(L, -2, "network"); + lua_pushinteger(L, prefix->prefixlen); + lua_setfield(L, -2, "length"); lua_pushinteger(L, prefix->family); lua_setfield(L, -2, "family"); -- 2.39.5