Repository : ssh://git@open-mesh.org/batctl
On branch : master
commit 5fb3a4916c5dd8fbbc61609bfbfa1de85f6de063 Author: Sven Eckelmann sven@narfation.org Date: Wed Jul 5 17:15:10 2017 +0200
batctl: Fix error message when tcpdump packet send failed
The strerror converts the positive error code into a string. tcpdump must therefore convert the negative return code from icmp_interface_write into a positive one before using it as parameter for strerror.
Signed-off-by: Sven Eckelmann sven@narfation.org
5fb3a4916c5dd8fbbc61609bfbfa1de85f6de063 traceroute.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/traceroute.c b/traceroute.c index 124ce7c..79d3800 100644 --- a/traceroute.c +++ b/traceroute.c @@ -150,7 +150,7 @@ int traceroute(char *mesh_iface, int argc, char **argv) (struct batadv_icmp_header *)&icmp_packet_out, sizeof(icmp_packet_out)); if (res < 0) { - fprintf(stderr, "Error - can't send icmp packet: %s\n", strerror(res)); + fprintf(stderr, "Error - can't send icmp packet: %s\n", strerror(-res)); continue; }