dhcpv4: fix lease ordering by ip address
authorDainis Jonitis <dainis.jonitis@ubnt.com>
Mon, 29 Apr 2019 11:57:13 +0000 (14:57 +0300)
committerHans Dedecker <dedeckeh@gmail.com>
Fri, 3 May 2019 12:51:52 +0000 (14:51 +0200)
commit3c9810b24b0794028ad9ed2ef7bc18ba41d78428
treed72b39ef715d3b94c949a2e7284248962e7941e4
parentb60c384a5ac698103f05bc102cbef92143f1f237
dhcpv4: fix lease ordering by ip address

1. Maintaining of sorted list was wrong for static lease case.
   Add dhcpv4_insert_assignment() helper function and use it from all places.
2. Add ip4toa() helper function to print ipv4 address that is stored as
   network byte-order uint32_t.

Signed-off-by: Dainis Jonitis <dainis.jonitis@ubnt.com>
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
src/dhcpv4.c