mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 19:30:07 +01:00
platform: sanitize a boolean property
Make sure NMPlatformGreProperties->path_mtu_discovery is always TRUE or FALSE, even if the value from the kernel is "2" or "16" or something. (This makes it consistent with what we do for other boolean netlink properties.)
This commit is contained in:
parent
255cc3f707
commit
95cf36fa8b
1 changed files with 1 additions and 1 deletions
|
|
@ -2281,7 +2281,7 @@ gre_info_data_parser (struct nlattr *info_data, gpointer parser_data)
|
|||
props->remote = nla_get_u32 (tb[IFLA_GRE_REMOTE]);
|
||||
props->tos = nla_get_u8 (tb[IFLA_GRE_TOS]);
|
||||
props->ttl = nla_get_u8 (tb[IFLA_GRE_TTL]);
|
||||
props->path_mtu_discovery = nla_get_u8 (tb[IFLA_GRE_PMTUDISC]);
|
||||
props->path_mtu_discovery = !!nla_get_u8 (tb[IFLA_GRE_PMTUDISC]);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue