diff --git a/ChangeLog b/ChangeLog index 1f35f29d77..d09fb5ece4 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2018-06-29 Daniel Alvarez + Jakub Sitnicki + + [BZ #21812] + * sysdeps/unix/sysv/linux/ifaddrs.c (getifaddrs_internal): Retry + on NLM_F_DUMP_INTR. + 2018-06-28 Szabolcs Nagy * manual/llio.texi: Remove spurious space. diff --git a/sysdeps/unix/sysv/linux/ifaddrs.c b/sysdeps/unix/sysv/linux/ifaddrs.c index 32381f54e4..ac0e1e5738 100644 --- a/sysdeps/unix/sysv/linux/ifaddrs.c +++ b/sysdeps/unix/sysv/linux/ifaddrs.c @@ -370,6 +370,14 @@ getifaddrs_internal (struct ifaddrs **ifap) if ((pid_t) nlh->nlmsg_pid != nh.pid || nlh->nlmsg_seq != nlp->seq) continue; + /* If the dump got interrupted, we can't rely on the results + so try again. */ + if (nlh->nlmsg_flags & NLM_F_DUMP_INTR) + { + result = -EAGAIN; + goto exit_free; + } + if (nlh->nlmsg_type == NLMSG_DONE) break; /* ok */