Commit 4ccfb44d authored by Stephen Hemminger's avatar Stephen Hemminger

Make link mode case independent

The link mode is printed in upper case, and following the general
rule that ip command output should work on input, allow either case.
parent 4f2fdd44
......@@ -134,9 +134,9 @@ struct link_util *get_link_kind(const char *id)
int get_link_mode(const char *mode)
{
if (strcmp(mode, "default") == 0)
if (strcasecmp(mode, "default") == 0)
return IF_LINK_MODE_DEFAULT;
if (strcmp(mode, "dormant") == 0)
if (strcasecmp(mode, "dormant") == 0)
return IF_LINK_MODE_DORMANT;
return -1;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment