svn commit: r353689 - head/sys/net

Conrad Meyer cem at FreeBSD.org
Thu Oct 17 17:48:33 UTC 2019


Author: cem
Date: Thu Oct 17 17:48:32 2019
New Revision: 353689
URL: https://svnweb.freebsd.org/changeset/base/353689

Log:
  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

Modified:
  head/sys/net/debugnet.c

Modified: head/sys/net/debugnet.c
==============================================================================
--- head/sys/net/debugnet.c	Thu Oct 17 17:19:16 2019	(r353688)
+++ head/sys/net/debugnet.c	Thu Oct 17 17:48:32 2019	(r353689)
@@ -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;


More information about the svn-src-head mailing list