Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 336967
b: refs/heads/master
c: 95a69ad
h: refs/heads/master
i:
  336965: 2921fa9
  336963: 40ea7a9
  336959: 7a4ab01
v: v3
  • Loading branch information
Tomas Hozza authored and Greg Kroah-Hartman committed Nov 15, 2012
1 parent 98b2808 commit fd0ee5b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: aeba4a06f28fad11b1e61d150bd3cde3008b80c8
refs/heads/master: 95a69adab9acfc3981c504737a2b6578e4d846ef
8 changes: 7 additions & 1 deletion trunk/tools/hv/hv_kvp_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -1486,13 +1486,19 @@ int main(void)
len = recvfrom(fd, kvp_recv_buffer, sizeof(kvp_recv_buffer), 0,
addr_p, &addr_l);

if (len < 0 || addr.nl_pid) {
if (len < 0) {
syslog(LOG_ERR, "recvfrom failed; pid:%u error:%d %s",
addr.nl_pid, errno, strerror(errno));
close(fd);
return -1;
}

if (addr.nl_pid) {
syslog(LOG_WARNING, "Received packet from untrusted pid:%u",
addr.nl_pid);
continue;
}

incoming_msg = (struct nlmsghdr *)kvp_recv_buffer;
incoming_cn_msg = (struct cn_msg *)NLMSG_DATA(incoming_msg);
hv_msg = (struct hv_kvp_msg *)incoming_cn_msg->data;
Expand Down

0 comments on commit fd0ee5b

Please sign in to comment.