diff options
author | Thomas Haller <thaller@redhat.com> | 2022-02-10 21:19:34 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2022-02-15 16:20:33 +0100 |
commit | 997d72932da9bfd2af52eb1d78e6a66504254ccc (patch) | |
tree | bcd6ab8643b4293f2ca7f446d55271b81266a586 | |
parent | 67ad9a62b1333158951588ddc46b5953ed631b92 (diff) | |
download | NetworkManager-997d72932da9bfd2af52eb1d78e6a66504254ccc.tar.gz |
platform: fix parsing RTA_MULTIHOP netlink attribute to use no policy
To parse the RTA_MULTIHOP message, "policy" is not right (which is used
to parse the overall message). Instead, we don't really have a special
policy that we should use.
This was not a severe issue, because the allocated buffer (with
G_N_ELEMENTS(policy) elements) was larger than need be. And apparently,
using the wrong policy also didn't cause us to reject important
messages.
-rw-r--r-- | src/libnm-platform/nm-linux-platform.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnm-platform/nm-linux-platform.c b/src/libnm-platform/nm-linux-platform.c index 93935b98d4..5824acdbb9 100644 --- a/src/libnm-platform/nm-linux-platform.c +++ b/src/libnm-platform/nm-linux-platform.c @@ -3467,12 +3467,12 @@ _new_from_nl_route(struct nlmsghdr *nlh, gboolean id_only) nh.ifindex = rtnh->rtnh_ifindex; if (rtnh->rtnh_len > sizeof(*rtnh)) { - struct nlattr *ntb[G_N_ELEMENTS(policy)]; + struct nlattr *ntb[RTA_GATEWAY + 1]; if (nla_parse_arr(ntb, (struct nlattr *) RTNH_DATA(rtnh), rtnh->rtnh_len - sizeof(*rtnh), - policy) + NULL) < 0) return NULL; |