summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Habets <thomas@habets.pp.se>2008-08-08 20:19:47 +0200
committerThomas Habets <thomas@habets.pp.se>2008-08-08 20:19:47 +0200
commit5920895bcb0b75ea21847a59346154ce69dffe10 (patch)
tree20b6cd7b4ded2bb84fbbceeb6ed4f3db7669047c
parent8e7a5fe664677fb5035b468deb8eed49ea70ae3e (diff)
downloadarping-5920895bcb0b75ea21847a59346154ce69dffe10.tar.gz
libnet_addr2name4_r() fix
-rw-r--r--arping-2/arping.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/arping-2/arping.c b/arping-2/arping.c
index c01708d..a5481c9 100644
--- a/arping-2/arping.c
+++ b/arping-2/arping.c
@@ -185,8 +185,8 @@ static const char *arping_lookupdev(const char *ifname,
int n;
do_libnet_init(ifname);
- libnet_addr2name4_r(dstip,0,buf2);
- libnet_addr2name4_r(srcip,0,buf1);
+ libnet_addr2name4_r(dstip,0,buf2,1024);
+ libnet_addr2name4_r(srcip,0,buf1,1024);
/*
* Construct and run command
@@ -238,7 +238,7 @@ arping_lookupdev(const char *ifname,
int n;
do_libnet_init(ifname);
- libnet_addr2name4_r(dstip,0,buf1);
+ libnet_addr2name4_r(dstip,0,buf1, 1024);
//libnet_addr2name4_r(srcip,0,buf1);
/*
@@ -397,7 +397,7 @@ static int is_mac_addr(const char *p)
{
/* cisco-style */
if (3*5-1 == strlen(p)) {
- int c;
+ unsigned int c;
for (c = 0; c < strlen(p); c++) {
if ((c % 5) == 4) {
if ('.' != p[c]) {
@@ -413,7 +413,7 @@ static int is_mac_addr(const char *p)
}
/* windows-style */
if (6*3-1 == strlen(p)) {
- int c;
+ unsigned int c;
for (c = 0; c < strlen(p); c++) {
if ((c % 3) == 2) {
if ('-' != p[c]) {