-
Notifications
You must be signed in to change notification settings - Fork 244
Closed
Milestone
Description
Hello!
Im trying to inject prefix to FIB, using lua/examples/example_of_dynamic_config_request.lua
As I can see, this example file is not working:
because its missing:
require "gatekeeper/dylib"
which we need to use to do dylib.c.add_fib_entry function for example.
I fixed this, so this is my simple final lua script:
require "gatekeeper/staticlib"
require "gatekeeper/dylib"
local dy_conf = staticlib.c.get_dy_conf()
if dy_conf == nil then
error("Failed to allocate dy_conf")
end
local ret = dylib.c.add_fib_entry("192.168.0.0/16", "10.255.0.66", "10.255.0.225", dylib.c.GK_FWD_GRANTOR, dy_conf.gk)
if ret < 0 then
return "gk: failed to add an FIB entry\n"
end
but its not working anyway, when I try to apply changes:
[root@srv351531 build]# ./gkctl lua/dyn.config
./lua/gatekeeper/dylib.lua:68: ';' expected near '=' at line 2
Perhaps we have an error in dylib.lua, or maybe I do something wrong, because C++ and lua is not my strong side:)
Metadata
Metadata
Assignees
Labels
No labels