[BusyBox] Silly bug in ifconfig
Jonas Holmberg
jonas.holmberg at axis.com
Mon Mar 26 12:23:42 UTC 2001
Could someone please commit this fix for function in_ether in ifconfig.c:
@@ -472,9 +472,9 @@
if (c >= '0' && c <= '9') {
c -= '0';
} else if (c >= 'a' && c <= 'f') {
- c -= ('a' + 10);
+ c -= ('a' - 10);
} else if (c >= 'A' && c <= 'F') {
- c -= ('A' + 10);
+ c -= ('A' - 10);
} else if (j && (c == ':' || c == 0)) {
break;
} else {
As you can see it won't get the ethernet address right if it contains a-f or A-F.
/Jonas
More information about the busybox
mailing list