dect
/
libnl
Archived
13
0
Fork 0

nl_recv(): Zero out sockaddr in case the caller forgot

This commit is contained in:
Thomas Graf 2010-11-22 14:19:40 +01:00
parent 9fbdf6c92a
commit 4fb528bbaf
1 changed files with 2 additions and 0 deletions

View File

@ -427,6 +427,8 @@ int nl_recv(struct nl_sock *sk, struct sockaddr_nl *nla,
};
struct cmsghdr *cmsg;
memset(nla, 0, sizeof(*nla));
if (sk->s_flags & NL_MSG_PEEK)
flags |= MSG_PEEK;