mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-24 19:30:07 +01:00
ip6: Perform sanity check before processing prefix messages
Verifies that the provided message consists of at least the prefix header.
This commit is contained in:
parent
3f3a63084c
commit
1134eee1e6
1 changed files with 5 additions and 0 deletions
|
|
@ -624,6 +624,11 @@ process_prefix (NMIP6Manager *manager, struct nl_msg *msg)
|
|||
|
||||
nm_log_dbg (LOGD_IP6, "processing netlink new prefix message");
|
||||
|
||||
if (!nlmsg_valid_hdr (nlmsg_hdr (msg), sizeof(*pmsg))) {
|
||||
nm_log_dbg (LOGD_IP6, "ignoring invalid prefix message");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
pmsg = (struct prefixmsg *) NLMSG_DATA (nlmsg_hdr (msg));
|
||||
device = nm_ip6_manager_get_device (manager, pmsg->prefix_ifindex);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue