]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix debugging of Eui48::lookup() problems (#2211)
authorJoshua Rogers <MegaManSec@users.noreply.github.com>
Tue, 9 Sep 2025 04:00:06 +0000 (04:00 +0000)
committerSquid Anubis <squid-anubis@squid-cache.org>
Tue, 9 Sep 2025 04:00:12 +0000 (04:00 +0000)
arpReq.arp_ha.sa_data is not a null-terminated buffer.
Log meaningful data: the sa_family which caused the log.

src/eui/Eui48.cc

index 392ff31501eeb6e0b9b639cc627762ad25a6aa63..810e2bcca1151d853c96d240b1dd6272a48c6bcc 100644 (file)
@@ -209,7 +209,7 @@ Eui::Eui48::lookup(const Ip::Address &c)
         xclose(tmpSocket);
 
         if (arpReq.arp_ha.sa_family != ARPHRD_ETHER) {
-            debugs(28, 4, "id=" << (void*)this << " ... not an Ethernet interface: " << arpReq.arp_ha.sa_data);
+            debugs(28, 4, "id=" << (void*)this << " ... not an Ethernet interface, sa_family=" << arpReq.arp_ha.sa_family);
             clear();
             return false;
         }