mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 19:40:12 +01:00
ifcfg-rh: in get_route_attributes_string() check prefix for "lock" names
In practice, the profile probably validates, so all the attribute names are well-known. There is thus no attribute name that has "lock-" in the middle of the string. Still, fix it. We want to match only at the begin of the name.
This commit is contained in:
parent
3628cf4805
commit
efca0b8fa6
1 changed files with 1 additions and 1 deletions
|
|
@ -2335,7 +2335,7 @@ get_route_attributes_string(NMIPRoute *route, int family)
|
|||
names[i],
|
||||
(lock && g_variant_get_boolean(lock)) ? "lock " : "",
|
||||
g_variant_get_uint32(attr));
|
||||
} else if (strstr(names[i], "lock-")) {
|
||||
} else if (NM_STR_HAS_PREFIX(names[i], "lock-")) {
|
||||
const char *n = &(names[i])[NM_STRLEN("lock-")];
|
||||
|
||||
attr = nm_ip_route_get_attribute(route, n);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue