]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#4221] Start reader in ping channel open
authorThomas Markwalder <tmark@isc.org>
Thu, 20 Nov 2025 15:33:50 +0000 (10:33 -0500)
committerThomas Markwalder <tmark@isc.org>
Thu, 20 Nov 2025 15:33:50 +0000 (10:33 -0500)
/src/hooks/dhcp/ping_check/ping_channel.cc
    PingChannel::open()  - add call to startRead() to
    ensure we always handle read ready and avoid
    ICMP socket build up when not actively ping checking

changelog_unreleased/4221-ping-check-hook-can-break-dhcp-service-in-one-edge-case [new file with mode: 0644]
src/hooks/dhcp/ping_check/ping_channel.cc

diff --git a/changelog_unreleased/4221-ping-check-hook-can-break-dhcp-service-in-one-edge-case b/changelog_unreleased/4221-ping-check-hook-can-break-dhcp-service-in-one-edge-case
new file mode 100644 (file)
index 0000000..d0eb6d0
--- /dev/null
@@ -0,0 +1,5 @@
+[bug]          tmark
+       Corrected an issue in the ping-check hook library that
+       could result in the ICMP socket stuck in the read ready
+       state.
+       (Gitlab #4221)
index 1e495fc9588417a76bf8df3803ee47d9a74276f6..e0f08d4504fbe8e028f8fd3258e008cdd815d594 100644 (file)
@@ -101,6 +101,9 @@ PingChannel::open() {
         isc_throw(Unexpected, "PingChannel::open failed:" << ex.what());
     }
 
+    // Start reader now so unexpected ICMP traffic won't go unhandled and pile up.
+    startRead();
+
     LOG_DEBUG(ping_check_logger, isc::log::DBGLVL_TRACE_BASIC, PING_CHECK_CHANNEL_SOCKET_OPENED);
 }