Skip to content

mac_pton: support more MAC address formats

Michael Pratt lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2mac_pton: support MAC addresses with other delimiterslib/net_utils.c+1 -11 reply
2/2mac_pton: support MAC addresses without delimiterslib/net_utils.c+15 -00 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH v1 0/2] mac_pton: support more MAC address formats

Currently, mac_pton() strictly requires the standard ASCII MAC address format with colons as the delimiter, however,
some hardware vendors don't store the address like that.

If there is no delimiter, one could use strtoul() but that would leave out important checks to make sure that each character in the string is hexadecimal.

This series adds support for other delimiters and lack of any delimiter to the mac_pton() function.

Tested with Openwrt on a MIPS system (ar9344).