summaryrefslogtreecommitdiff
path: root/service/src/node_forwarder.c
diff options
context:
space:
mode:
Diffstat (limited to 'service/src/node_forwarder.c')
-rw-r--r--service/src/node_forwarder.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/src/node_forwarder.c b/service/src/node_forwarder.c
index 84fff2e..5c697d3 100644
--- a/service/src/node_forwarder.c
+++ b/service/src/node_forwarder.c
@@ -59,8 +59,12 @@ struct forwarder_main * global_forwarder_main = &forwarder_main;
/* Sid check */
int sid_check(uint32_t sid)
{
+ if (sid >= FORWARDER_MAX_SID_NM)
+ return RT_ERR;
+
if (global_forwarder_main->forwarder_table[sid] == 0)
return RT_ERR;
+
return RT_SUCCESS;
}