]> git.ipfire.org Git - thirdparty/bird.git/commitdiff
Netlink: fix occasional netlink hangs on busy machines
authorJan Moskyto Matejka <mq@ucw.cz>
Tue, 20 Dec 2016 19:13:08 +0000 (20:13 +0100)
committerJan Moskyto Matejka <mq@ucw.cz>
Tue, 20 Dec 2016 19:36:56 +0000 (20:36 +0100)
sysdep/linux/netlink.c
sysdep/unix/io.c

index 368e0ef9d9881666a78e933f8df2d5bc1bef01d6..22313f439977ae284366df50d75146b9e4a78373 100644 (file)
@@ -1497,6 +1497,7 @@ nl_async_hook(sock *sk, uint size UNUSED)
           *  One day we might react to it by asking for route table
           *  scan in near future.
           */
+         log(L_WARN "Kernel dropped some netlink messages, will resync on next scan.");
          return 1;     /* More data are likely to be ready */
        }
       else if (errno != EWOULDBLOCK)
index 644a4fcd7688aa8122d850ec461f980df52bcd95..8773f4c41e86d10500d491ac2125e579453f8d59 100644 (file)
@@ -2238,7 +2238,8 @@ io_loop(void)
              if (pfd[s->index].revents & (POLLHUP | POLLERR))
                {
                  sk_err(s, pfd[s->index].revents);
-                 goto next2;
+                 if (s != current_sock)
+                   goto next2;
                }
 
              current_sock = sk_next(s);