aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/check_pf.c2
-rw-r--r--sysdeps/unix/sysv/linux/ifaddrs.c3
2 files changed, 3 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c
index 83a337c111..69924769bc 100644
--- a/sysdeps/unix/sysv/linux/check_pf.c
+++ b/sysdeps/unix/sysv/linux/check_pf.c
@@ -86,7 +86,7 @@ make_request (int fd, pid_t pid, bool *seen_ipv4, bool *seen_ipv6)
NLMSG_OK (nlmh, (size_t) read_len);
nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
{
- if ((pid_t) nlmh->nlmsg_pid != pid
+ if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != pid
|| nlmh->nlmsg_seq != req.nlh.nlmsg_seq)
continue;
diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c
index 837bfca664..439e26f76c 100644
--- a/sysdeps/unix/sysv/linux/ifaddrs.c
+++ b/sysdeps/unix/sysv/linux/ifaddrs.c
@@ -186,7 +186,8 @@ netlink_receive (struct netlink_handle *h)
NLMSG_OK (nlmh, (size_t) read_len);
nlmh = (struct nlmsghdr *) NLMSG_NEXT (nlmh, read_len))
{
- if ((pid_t) nlmh->nlmsg_pid != h->pid || nlmh->nlmsg_seq != h->seq)
+ if (nladdr.nl_pid != 0 || (pid_t) nlmh->nlmsg_pid != h->pid
+ || nlmh->nlmsg_seq != h->seq)
continue;
if (nlmh->nlmsg_type == NLMSG_DONE)