diff options
| author | Donald Lee <dlqs@gmx.com> | 2021-08-09 17:18:14 +0800 |
|---|---|---|
| committer | Donald Lee <dlqs@gmx.com> | 2021-08-09 17:19:28 +0800 |
| commit | a852e5a62dbd3940c20102aecb8cf0282a36bc8c (patch) | |
| tree | b2e9f1afe3d65c27f18644374056b41b0ed1b62a /lib/frrlua.c | |
| parent | d04e7788c19e39de207ef2ea0f63f0d31702aa76 (diff) | |
lib: check return on str2sockunion
Signed-off-by: Donald Lee <dlqs@gmx.com>
Diffstat (limited to 'lib/frrlua.c')
| -rw-r--r-- | lib/frrlua.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/frrlua.c b/lib/frrlua.c index 928780f2d4..54ebcf7e22 100644 --- a/lib/frrlua.c +++ b/lib/frrlua.c @@ -240,7 +240,9 @@ void lua_pushsockunion(lua_State *L, const union sockunion *su) void lua_decode_sockunion(lua_State *L, int idx, union sockunion *su) { lua_getfield(L, idx, "string"); - (void)str2sockunion(lua_tostring(L, -1), su); + if (str2sockunion(lua_tostring(L, -1), su) < 0) { + zlog_err("Lua hook call: Failed to decode sockunion"); + } lua_pop(L, 1); /* pop the table */ lua_pop(L, 1); |
