Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib: Load built-in Lua functions #16907

Merged

Conversation

ton31337
Copy link
Member

@ton31337 ton31337 commented Sep 24, 2024

Closes #16900

We can't use even `string()` function because built-in functions are not
loaded.

Testing with:

```
$ cat /etc/frr/scripts/zebra.lua
function on_rib_process_dplane_results(ctx)
	log.warn(string.upper("testas"))
	return {}
end
```

This results to "TESTAS" in the logs.

Signed-off-by: Donatas Abraitis <[email protected]>
@ton31337 ton31337 force-pushed the fix/load_built-in_lua_functions branch from 5a20edd to 623fb6d Compare September 24, 2024 10:40
Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@riw777 riw777 merged commit 5cf4af6 into FRRouting:master Sep 24, 2024
11 checks passed
@ton31337 ton31337 deleted the fix/load_built-in_lua_functions branch September 24, 2024 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
libfrr master size/S tests Topotests, make check, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Lua is loaded into an empty namespace, preventing key Lua functions
2 participants