dect
/
libnl
Archived
13
0
Fork 0

link: Eat ACK followed by RTM_NEWLINK when requesting single link

When requesting a single link with RTM_GETLINK (no dump) the
RTM_NEWLINK carrying the answer will be followed by an ACK
we have to wait for.
This commit is contained in:
Thomas Graf 2011-09-14 11:43:10 +02:00
parent 67bd56f214
commit 5151cbc2f6
1 changed files with 4 additions and 0 deletions

View File

@ -996,6 +996,10 @@ int rtnl_link_get_kernel(struct nl_sock *sk, int ifindex, const char *name,
/* We have used link_msg_parser(), object is definitely a link */
*result = (struct rtnl_link *) obj;
/* If an object has been returned, we also need to wait for the ACK */
if (err == 0 && obj)
nl_wait_for_ack(sk);
return 0;
}