diff options
author | Dan Winship <danw@gnome.org> | 2014-02-20 14:23:06 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2014-02-21 13:54:02 -0500 |
commit | 95cf36fa8b5912b9333bce99eb4e20a01ff632fe (patch) | |
tree | 6e56d5c46203ad1c36f708faa8b02b1cf6369476 | |
parent | 255cc3f70783a7f94f7ba857217fa920a67a7c1b (diff) | |
download | NetworkManager-95cf36fa8b5912b9333bce99eb4e20a01ff632fe.tar.gz |
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.)
-rw-r--r-- | src/platform/nm-linux-platform.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index dde01c2019..59967b1894 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -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; } |