From 25ce4c6b9e6facade00a35eec94780c3c67cf249 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 13 Nov 2003 23:39:31 +0000 Subject: Update. 2003-11-04 Ulrich Drepper * sysdeps/unix/sysv/linux/ifaddrs.c: Make sure it's the kernel who sends the netlink data. * sysdeps/unix/sysv/linux/check_pf.c: Likewise. --- sysdeps/unix/sysv/linux/check_pf.c | 2 +- sysdeps/unix/sysv/linux/ifaddrs.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'sysdeps/unix') diff --git a/sysdeps/unix/sysv/linux/check_pf.c b/sysdeps/unix/sysv/linux/check_pf.c index 83a337c..6992476 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 837bfca..439e26f 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) -- cgit v1.1