summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2003-11-13 23:39:31 +0000
committerUlrich Drepper <drepper@redhat.com>2003-11-13 23:39:31 +0000
commit25ce4c6b9e6facade00a35eec94780c3c67cf249 (patch)
tree250bffc9df5e81e55e84785f2df6bbccb5ec945b /sysdeps
parenta8067e8f899dc2842aba0780a6943bacb8247c8c (diff)
downloadglibc-25ce4c6b9e6facade00a35eec94780c3c67cf249.tar.gz
glibc-25ce4c6b9e6facade00a35eec94780c3c67cf249.tar.xz
glibc-25ce4c6b9e6facade00a35eec94780c3c67cf249.zip
Update.
2003-11-04  Ulrich Drepper  <drepper@redhat.com>

	* 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.
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)