Parcourir la source

[ipv4] Record ARP resolution errors

At the time of attempting ARP resolution, we already know the
transmitting network device.  We can therefore record ARP errors using
netdev_tx_err() so that they show up in the output of "ifstat".

Inspired-by: Dominik Russenberger <dominik.russenberger@terreactive.ch>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown il y a 14 ans
Parent
révision
cc7c2a9dcd
1 fichiers modifiés avec 2 ajouts et 0 suppressions
  1. 2
    0
      src/net/ipv4.c

+ 2
- 0
src/net/ipv4.c Voir le fichier

347
 				   ll_dest ) ) != 0 ) {
347
 				   ll_dest ) ) != 0 ) {
348
 		DBG ( "IPv4 has no link-layer address for %s: %s\n",
348
 		DBG ( "IPv4 has no link-layer address for %s: %s\n",
349
 		      inet_ntoa ( next_hop ), strerror ( rc ) );
349
 		      inet_ntoa ( next_hop ), strerror ( rc ) );
350
+		/* Record error for diagnosis */
351
+		netdev_tx_err ( netdev, iob_disown ( iobuf ), rc );
350
 		goto err;
352
 		goto err;
351
 	}
353
 	}
352
 
354
 

Chargement…
Annuler
Enregistrer