Delete old IP addresses associated with the interface when setting the

DHCP-assigned IP, broadcast, and subnet.

The nl_foreach_nlmsg() gains a seq parameter that when set to non-0 will
cause nl_foreach_nlmsg() to ignore any nlmsg that has a seq number
that does not match the caller-supplied seq argument.
This commit is contained in:
Nicholas J. Kain
2014-03-15 04:43:29 -04:00
parent 7bf1cc419e
commit cce93139d0
4 changed files with 51 additions and 58 deletions

View File

@@ -131,7 +131,7 @@ void handle_nl_message(struct client_state_t *cs)
ret = nl_recv_buf(cs->nlFd, nlbuf, sizeof nlbuf);
if (ret == -1)
break;
if (nl_foreach_nlmsg(nlbuf, ret, cs->nlPortId, nl_process_msgs, cs)
if (nl_foreach_nlmsg(nlbuf, ret, 0, cs->nlPortId, nl_process_msgs, cs)
== -1)
break;
} while (ret > 0);