summaryrefslogtreecommitdiff
path: root/lua
diff options
context:
space:
mode:
Diffstat (limited to 'lua')
-rw-r--r--lua/common.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lua/common.c b/lua/common.c
index fad2f857..a9c60489 100644
--- a/lua/common.c
+++ b/lua/common.c
@@ -123,7 +123,7 @@ static int luaB_ip4_tostring(lua_State *L) {
static void lua_puship4(lua_State *L, ip4_addr a) {
lua_newtable(L);
- lua_settableinteger(L, "addr", a);
+ lua_settableinteger(L, "addr", ip4_to_u32(a));
lua_newtable(L);
lua_settablecfunction(L, "__tostring", luaB_ip4_tostring);
@@ -170,7 +170,7 @@ lua_bird_state *luaB_init(lua_State *L, struct linpool *lp) {
lua_settablelightuserdata(L, "_internal_state", lbs);
- lua_settableip4(L, "router_id", config->router_id);
+ lua_settableip4(L, "router_id", ip4_from_u32(config->router_id));
lua_setglobal(L, "bird");