Commit dd50247d authored by Jiri Pirko's avatar Jiri Pirko Committed by Stephen Hemminger

iproute2: arpd: use ll_addr_a2n and ll_addr_n2a

Signed-off-by: default avatarJiri Pirko <jiri@resnulli.us>
parent aeb199d5
...@@ -36,6 +36,7 @@ ...@@ -36,6 +36,7 @@
#include "libnetlink.h" #include "libnetlink.h"
#include "utils.h" #include "utils.h"
#include "rt_names.h"
int resolve_hosts; int resolve_hosts;
...@@ -721,8 +722,7 @@ int main(int argc, char **argv) ...@@ -721,8 +722,7 @@ int main(int argc, char **argv)
goto do_abort; goto do_abort;
} }
dbdat.data = hexstring_a2n(macbuf, b1, 6); if (ll_addr_a2n((char *) b1, 6, macbuf) != 6)
if (dbdat.data == NULL)
goto do_abort; goto do_abort;
dbdat.size = 6; dbdat.size = 6;
...@@ -747,7 +747,7 @@ int main(int argc, char **argv) ...@@ -747,7 +747,7 @@ int main(int argc, char **argv)
printf("%-8d %-15s %s\n", printf("%-8d %-15s %s\n",
key->iface, key->iface,
inet_ntoa(*(struct in_addr*)&key->addr), inet_ntoa(*(struct in_addr*)&key->addr),
hexstring_n2a(dbdat.data, 6, b1, 18)); ll_addr_n2a(dbdat.data, 6, ARPHRD_ETHER, b1, 18));
} else { } else {
printf("%-8d %-15s FAILED: %dsec ago\n", printf("%-8d %-15s FAILED: %dsec ago\n",
key->iface, key->iface,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment