[rt31231]
Check the status when trying to read from a connection
and don't ask for more if we seem to have a closed
connection.
[ISC-Bugs #31231]
dhcpd.conf file as desired.
[ISC-Bugs #19337]
+- Check the status value when trying to read from a connection to
+ see if it may have been closed. If it appears closed don't try
+ to read from it again. This avoids a potential busy-wait like
+ loop when the peer names are mismatched.
+ [ISC-Bugs #31231]
+
Changes since 4.2.3
! Add a check for a null pointer before calling the regexec function.
if ((flags == ISC_SOCKFDWATCH_READ) &&
(obj->reader != NULL) &&
(obj->inner != NULL)) {
- obj->reader(obj->inner);
- /* We always ask for more when reading */
+ status = obj->reader(obj->inner);
+ /*
+ * If we are shutting down (basically tried to
+ * read and got no bytes) we don't need to try
+ * again.
+ */
+ if (status == ISC_R_SHUTTINGDOWN)
+ return (0);
+ /* Otherwise We always ask for more when reading */
return (1);
} else if ((flags == ISC_SOCKFDWATCH_WRITE) &&
(obj->writer != NULL) &&