about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/ifaddrs.c
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/unix/sysv/linux/ifaddrs.c
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/unix/sysv/linux/ifaddrs.c')
-rw-r--r--sysdeps/unix/sysv/linux/ifaddrs.c3
1 files changed, 2 insertions, 1 deletions
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)