From: Thomas Markwalder Date: Thu, 20 Nov 2025 15:33:50 +0000 (-0500) Subject: [#4221] Start reader in ping channel open X-Git-Tag: Kea-3.1.4~33 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=511115da8ff64a5c19d48f77183c229d0da94aa8;p=thirdparty%2Fkea.git [#4221] Start reader in ping channel open /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 --- 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 index 0000000000..d0eb6d0989 --- /dev/null +++ b/changelog_unreleased/4221-ping-check-hook-can-break-dhcp-service-in-one-edge-case @@ -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) diff --git a/src/hooks/dhcp/ping_check/ping_channel.cc b/src/hooks/dhcp/ping_check/ping_channel.cc index 1e495fc958..e0f08d4504 100644 --- a/src/hooks/dhcp/ping_check/ping_channel.cc +++ b/src/hooks/dhcp/ping_check/ping_channel.cc @@ -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); }