]> 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)
committerFrancesco Chemolli <5175948+kinkie@users.noreply.github.com>
Tue, 9 Sep 2025 09:20:58 +0000 (10:20 +0100)
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 ea2068bfead01e197dbdc1e0d145d5ff35268a0d..ef7a713d3e49595ff34ebce715d25a98a72b726b 100644 (file)
@@ -207,7 +207,7 @@ Eui::Eui48::lookup(const Ip::Address &c)
         close(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;
         }