|
|
049c96 |
From a3c9bb79b1f03896d09df67a7095cd545e495ab0 Mon Sep 17 00:00:00 2001
|
|
|
049c96 |
From: Davide Caratti <dcaratti@redhat.com>
|
|
|
049c96 |
Date: Wed, 6 Jul 2016 18:41:31 +0200
|
|
|
049c96 |
Subject: [PATCH] iproute2: arpd: use ll_addr_a2n and ll_addr_n2a
|
|
|
049c96 |
|
|
|
049c96 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1300765
|
|
|
049c96 |
Upstream Status: iproute2.git commit dd50247dba85
|
|
|
049c96 |
|
|
|
049c96 |
commit dd50247dba85255538d659551305b4bb75bcae62
|
|
|
049c96 |
Author: Jiri Pirko <jiri@resnulli.us>
|
|
|
049c96 |
Date: Thu May 15 15:10:20 2014 +0200
|
|
|
049c96 |
|
|
|
049c96 |
iproute2: arpd: use ll_addr_a2n and ll_addr_n2a
|
|
|
049c96 |
|
|
|
049c96 |
Signed-off-by: Jiri Pirko <jiri@resnulli.us>
|
|
|
049c96 |
|
|
|
049c96 |
Signed-off-by: Davide Caratti <dcaratti@redhat.com>
|
|
|
049c96 |
---
|
|
|
049c96 |
misc/arpd.c | 6 +++---
|
|
|
049c96 |
1 file changed, 3 insertions(+), 3 deletions(-)
|
|
|
049c96 |
|
|
|
049c96 |
diff --git a/misc/arpd.c b/misc/arpd.c
|
|
|
049c96 |
index cc5e1ca..7919eb8 100644
|
|
|
049c96 |
--- a/misc/arpd.c
|
|
|
049c96 |
+++ b/misc/arpd.c
|
|
|
049c96 |
@@ -36,6 +36,7 @@
|
|
|
049c96 |
|
|
|
049c96 |
#include "libnetlink.h"
|
|
|
049c96 |
#include "utils.h"
|
|
|
049c96 |
+#include "rt_names.h"
|
|
|
049c96 |
|
|
|
049c96 |
int resolve_hosts;
|
|
|
049c96 |
|
|
|
049c96 |
@@ -721,8 +722,7 @@ int main(int argc, char **argv)
|
|
|
049c96 |
goto do_abort;
|
|
|
049c96 |
}
|
|
|
049c96 |
|
|
|
049c96 |
- dbdat.data = hexstring_a2n(macbuf, b1, 6);
|
|
|
049c96 |
- if (dbdat.data == NULL)
|
|
|
049c96 |
+ if (ll_addr_a2n((char *) b1, 6, macbuf) != 6)
|
|
|
049c96 |
goto do_abort;
|
|
|
049c96 |
dbdat.size = 6;
|
|
|
049c96 |
|
|
|
049c96 |
@@ -747,7 +747,7 @@ int main(int argc, char **argv)
|
|
|
049c96 |
printf("%-8d %-15s %s\n",
|
|
|
049c96 |
key->iface,
|
|
|
049c96 |
inet_ntoa(*(struct in_addr*)&key->addr),
|
|
|
049c96 |
- hexstring_n2a(dbdat.data, 6, b1, 18));
|
|
|
049c96 |
+ ll_addr_n2a(dbdat.data, 6, ARPHRD_ETHER, b1, 18));
|
|
|
049c96 |
} else {
|
|
|
049c96 |
printf("%-8d %-15s FAILED: %dsec ago\n",
|
|
|
049c96 |
key->iface,
|
|
|
049c96 |
--
|
|
|
049c96 |
1.8.3.1
|
|
|
049c96 |
|