diff options
author | Michael Brown <mcb30@ipxe.org> | 2011-06-28 10:21:30 +0100 |
---|---|---|
committer | Michael Brown <mcb30@ipxe.org> | 2011-06-28 10:21:30 +0100 |
commit | cc7c2a9dcd3d501561bcc7ef67c67601404248bf (patch) | |
tree | 71fa3d01057abbca969ada9d3f9aa7614a8f1745 /src/net/ipv4.c | |
parent | d6115c91cfa4e3de72b87d3035b418d13b81e197 (diff) | |
download | ipxe-cc7c2a9dcd3d501561bcc7ef67c67601404248bf.zip ipxe-cc7c2a9dcd3d501561bcc7ef67c67601404248bf.tar.gz ipxe-cc7c2a9dcd3d501561bcc7ef67c67601404248bf.tar.bz2 |
[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>
Diffstat (limited to 'src/net/ipv4.c')
-rw-r--r-- | src/net/ipv4.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/net/ipv4.c b/src/net/ipv4.c index 465df45..5bb48f6 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; } |