config: use multi-stage parsing of uci sections
authorDainis Jonitis <dainis.jonitis@ubnt.com>
Mon, 29 Apr 2019 11:47:13 +0000 (14:47 +0300)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 3 May 2019 12:51:52 +0000 (14:51 +0200)
commitb60c384a5ac698103f05bc102cbef92143f1f237
tree14ac446c2d86102f05390f764ca5a4e47cd65b8b
parenta2dd8d6bd918fb211db491c7dcb1810032f3f8ca
config: use multi-stage parsing of uci sections

When loading uci sections from config file, in one pass do not
mix sections from different types. First load odhcpd global
settings, then all interface sections and finally static leases.
It ensures that section order in file can't affect what information
is already parsed. For example static lease section may need
information about all interfaces, to decide whether ip address
belongs to any of currently defined interfaces/address pools.

Signed-off-by: Dainis Jonitis <dainis.jonitis@ubnt.com>
src/config.c