net: Always build the string_to_enetaddr() helper
Part of the env cleanup moved this out of the environment code and into the net code. However, this helper is sometimes needed even when the net stack isn't included. Move the helper to lib/net_utils.c like it's similarly-purposed string_to_ip(). Also rename the moved function to similar naming. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reported-by: Ondrej Jirman <megous@megous.com>
This commit is contained in:
@@ -864,7 +864,7 @@ static int keyword_match_mac_addr(enum ethsw_keyword_id key_id, int argc,
|
||||
return 0;
|
||||
}
|
||||
|
||||
eth_parse_enetaddr(argv[*argc_nr + 1], parsed_cmd->ethaddr);
|
||||
string_to_enetaddr(argv[*argc_nr + 1], parsed_cmd->ethaddr);
|
||||
|
||||
if (is_broadcast_ethaddr(parsed_cmd->ethaddr)) {
|
||||
memset(parsed_cmd->ethaddr, 0xFF, sizeof(parsed_cmd->ethaddr));
|
||||
|
||||
Reference in New Issue
Block a user