rtbrick / bngblaster

The BNG Blaster is an open-source network tester for access and routing protocols.

Home Page:https://rtbrick.github.io/bngblaster/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor Config Parser

GIC-de opened this issue · comments

Today the BNG Blaster configuration parser ignores unknown elements, which could lead into unexpected results in case of typos or misconfiguration.

https://github.com/rtbrick/bngblaster/blob/main/code/bngblaster/src/bbl_config.c

Therefore instead of json_object_get, we should iterate over every key-value pair using json_object_foreach, check if known and apply, otherwise fail with error.

There is one exception, if unknown configuration elements start with _ like "__comment__" they are ignored.