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:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user