From cc7c2a9dcd3d501561bcc7ef67c67601404248bf Mon Sep 17 00:00:00 2001 From: Michael Brown Date: Tue, 28 Jun 2011 10:21:30 +0100 Subject: [PATCH] [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 Signed-off-by: Michael Brown --- src/net/ipv4.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 465df45e..5bb48f61 100644 --- a/src/net/ipv4.c +++ b/src/net/ipv4.c @@ -347,6 +347,8 @@ static int ipv4_tx ( struct io_buffer *iobuf, ll_dest ) ) != 0 ) { DBG ( "IPv4 has no link-layer address for %s: %s\n", inet_ntoa ( next_hop ), strerror ( rc ) ); + /* Record error for diagnosis */ + netdev_tx_err ( netdev, iob_disown ( iobuf ), rc ); goto err; }