summaryrefslogtreecommitdiff
path: root/lib/frrlua.c
diff options
context:
space:
mode:
authorStephen Worley <sworley@nvidia.com>2021-08-23 08:20:33 -0600
committerGitHub <noreply@github.com>2021-08-23 08:20:33 -0600
commit95b4a691dd02d22a82296b2ec9cfbcc7b24efdf9 (patch)
tree6a183f1244701426e1a966101f895e46593141c3 /lib/frrlua.c
parentb87c5f4dd1a6fa357ed22669428a7a79a66beea6 (diff)
parent0db2bfc5accbe190325e3f50874f3cf4b6ee9229 (diff)
Merge pull request #9337 from dlqs/lua2
lib: check return on str2sockunion
Diffstat (limited to 'lib/frrlua.c')
-rw-r--r--lib/frrlua.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/frrlua.c b/lib/frrlua.c
index 928780f2d4..00491568f6 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);