Signed-off-by: Jon Suphammer <jon@suphammer.net>
Patchwork: http://patchwork.openwrt.org/patch/5838/
[juhosg:
- fix coding style,
- check the first and the last character of the MAC string
instead of using the strchr() function]
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
SVN-Revision: 41622
goto free;
}
+ if (strlen(mac_str) == 19 && mac_str[0] == '"' && mac_str[18] == '"') {
+ mac_str[18] = 0;
+ mac_str++;
+ }
+
t = sscanf(mac_str, "%02hhx:%02hhx:%02hhx:%02hhx:%02hhx:%02hhx",
&mac[0], &mac[1], &mac[2], &mac[3], &mac[4], &mac[5]);