From 6d567ec2dae2287f3bfb6ba55ccaf0f3a552ee5c Mon Sep 17 00:00:00 2001 From: Conrad Meyer Date: Thu, 17 Oct 2019 17:48:32 +0000 Subject: [PATCH] debugnet: Respond to broadcast ARP requests The in-tree netdump code has always ignored non-directed ARP requests, and that seems to work most of the time for netdump. In my work and testing on NetGDB, it seems like sometimes the remote FreeBSD conversant (the non-panic system) will send broadcast-destination ARP requests to the debugnet kernel; without this change, those are dropped and the remote will see EHOSTDOWN "Host is down" errors from the userspace interface of the network stack. Discussed with: markj --- sys/net/debugnet.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/net/debugnet.c b/sys/net/debugnet.c index 741e3156372..9c3803938d8 100644 --- a/sys/net/debugnet.c +++ b/sys/net/debugnet.c @@ -434,7 +434,8 @@ debugnet_pkt_in(struct ifnet *ifp, struct mbuf *m) goto done; } if (memcmp(ifr.ifr_addr.sa_data, eh->ether_dhost, - ETHER_ADDR_LEN) != 0) { + ETHER_ADDR_LEN) != 0 && + (etype != ETHERTYPE_ARP || !ETHER_IS_BROADCAST(eh->ether_dhost))) { DNETDEBUG_IF(ifp, "discard frame with incorrect destination addr\n"); goto done;