dhcpv4: use iovec for forcereconf messages, fix hash
Do the same iovec conversion for dhcpv4_fr_send(), and remove dhcpv4_put() now
that the last user is gone. Yay.
Note that there was a bug in dhcpv4_fr_send() in that it would first
perform:
md5_hash(&fr_msg, sizeof(fr_msg), &md5);
And later:
sendto(/* fd */, &fr_msg, PACKET_SIZE(&fr_msg, cursor), ...)
But PACKET_SIZE is much smaller than sizeof(fr_msg), meaning that the hash is
not computed for the actual packet that gets sent.
Signed-off-by: David Härdeman <[email protected]>
Link: https://github.com/openwrt/odhcpd/pull/278
Signed-off-by: Álvaro Fernández Rojas <[email protected]>