summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJiri Popelka <jpopelka@redhat.com>2012-01-05 17:01:05 +0100
committerJiri Popelka <jpopelka@redhat.com>2012-01-06 11:48:03 +0100
commit1b74c24baec28bd158d13acf67575826a427c364 (patch)
tree125618abc82b4df3e8867ec555e91bd4bbaa06a3
parent9dc3a20511a409e1de1a41d715a10028d3bc1b56 (diff)
downloadnet-tools-1b74c24baec28bd158d13acf67575826a427c364.tar.gz
net-tools-1b74c24baec28bd158d13acf67575826a427c364.tar.bz2
net-tools-1b74c24baec28bd158d13acf67575826a427c364.zip
inform user that ifconfig can correctly show only first 8 bytes of Infiniband hw address
-rw-r--r--lib/ib.c3
-rw-r--r--man/en_US/ifconfig.810
2 files changed, 12 insertions, 1 deletions
diff --git a/lib/ib.c b/lib/ib.c
index 7475293..3684e43 100644
--- a/lib/ib.c
+++ b/lib/ib.c
@@ -47,7 +47,8 @@ static const char *pr_ib(const char *ptr)
pos += sprintf(pos, "%02X:", (*ptr++ & 0377));
}
buff[strlen(buff) - 1] = '\0';
-
+ char *ib_warning = "Infiniband hardware address can be incorrect! Please read BUGS section in ifconfig(8).";
+ fprintf(stderr, _(ib_warning));
/* snprintf(buff, sizeof(buff), "%02X:%02X:%02X:%02X:%02X:%02X",
(ptr[0] & 0377), (ptr[1] & 0377), (ptr[2] & 0377),
(ptr[3] & 0377), (ptr[4] & 0377), (ptr[5] & 0377)
diff --git a/man/en_US/ifconfig.8 b/man/en_US/ifconfig.8
index 1dc40ff..e69d12d 100644
--- a/man/en_US/ifconfig.8
+++ b/man/en_US/ifconfig.8
@@ -211,6 +211,16 @@ for more information.
.br
.I /proc/net/if_inet6
.SH BUGS
+Ifconfig uses the ioctl access method to get the full address information,
+which limits hardware addresses to 8 bytes.
+Because Infiniband hardware address has 20 bytes,
+only the first 8 bytes are displayed correctly.
+Please use
+.B ip link
+command from
+.B iproute2
+package to display link layer informations including the hardware address.
+.LP
While appletalk DDP and IPX addresses will be displayed they cannot be
altered by this command.
.SH SEE ALSO