aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-16 17:19:03 +0000
committerBernhard Reutner-Fischer <rep.dot.nop@gmail.com>2008-05-16 17:19:03 +0000
commit51a06c07da0fd535150c17e07f061c0a263f329c (patch)
tree8e17b17a3a562a813e6ce52272969abb6925fb14
parentb8635e28b521ce0f2c016fd16a716c4b43bd13e7 (diff)
downloadbusybox-w32-51a06c07da0fd535150c17e07f061c0a263f329c.tar.gz
busybox-w32-51a06c07da0fd535150c17e07f061c0a263f329c.tar.bz2
busybox-w32-51a06c07da0fd535150c17e07f061c0a263f329c.zip
- accept ip l s ib0 addr 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
-rw-r--r--networking/libiproute/iplink.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/networking/libiproute/iplink.c b/networking/libiproute/iplink.c
index 494b223bf..5aad6ed9f 100644
--- a/networking/libiproute/iplink.c
+++ b/networking/libiproute/iplink.c
@@ -130,9 +130,11 @@ static void parse_address(char *dev, int hatype, int halen, char *lla, struct if
130 memset(ifr, 0, sizeof(*ifr)); 130 memset(ifr, 0, sizeof(*ifr));
131 strncpy(ifr->ifr_name, dev, sizeof(ifr->ifr_name)); 131 strncpy(ifr->ifr_name, dev, sizeof(ifr->ifr_name));
132 ifr->ifr_hwaddr.sa_family = hatype; 132 ifr->ifr_hwaddr.sa_family = hatype;
133 alen = ll_addr_a2n((unsigned char *)(ifr->ifr_hwaddr.sa_data), 14, lla); 133
134 alen = hatype == 1/*ARPHRD_ETHER*/ ? 14/*ETH_HLEN*/ : 19/*INFINIBAND_HLEN*/;
135 alen = ll_addr_a2n((unsigned char *)(ifr->ifr_hwaddr.sa_data), alen, lla);
134 if (alen < 0) 136 if (alen < 0)
135 exit(1); 137 exit(EXIT_FAILURE);
136 if (alen != halen) { 138 if (alen != halen) {
137 bb_error_msg_and_die("wrong address (%s) length: expected %d bytes", lla, halen); 139 bb_error_msg_and_die("wrong address (%s) length: expected %d bytes", lla, halen);
138 } 140 }