mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-28 00:30:36 +01:00
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. (cherry picked from commit997d72932d) (cherry picked from commit21b1978072) (cherry picked from commitef1587bd88) (cherry picked from commit6aa3d40199)
This commit is contained in:
parent
57342756ed
commit
bd2fe272bb
1 changed files with 2 additions and 2 deletions
|
|
@ -3425,12 +3425,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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue