+ struct pollfd pfd;
+ int ret;
+
+ memset(&pfd, 0, sizeof(pfd));
+ pfd.fd = rtsock;
+ pfd.events = POLLIN;
+ /*
+ * The timeout value below is somehow arbitrary.
+ * It's to detect the lost of routing messages due to
+ * buffer exhaustion etc. The routing socket is not
+ * reliable.
+ */
+ ret = poll(&pfd, 1, 500);
+ if (ret == -1) {
+ VLOG_ERR("Error polling on routing socket: %s",
+ ovs_strerror(errno));
+ close(rtsock);
+ return false;
+ }
+ if (ret == 0) {
+ if (retry_count-- > 0) {
+ VLOG_INFO("Timeout; resending routing message");
+ goto retry;
+ }
+ close(rtsock);
+ return false;
+ }