mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-01 17:40:14 +01:00
core: fix possible unaligned access in nm_utils_get_ipv6_interface_identifier()
Fixes:e2270040c0('core: use Interface Identifiers for IPv6 SLAAC addresses') (cherry picked from commit0f4114c27c)
This commit is contained in:
parent
ed47047a36
commit
677be52f71
1 changed files with 1 additions and 1 deletions
|
|
@ -3272,7 +3272,7 @@ nm_utils_get_ipv6_interface_identifier(NMLinkType link_type,
|
|||
case NM_LINK_TYPE_GRE:
|
||||
/* Hardware address is the network-endian IPv4 address */
|
||||
g_return_val_if_fail(hwaddr_len == 4, FALSE);
|
||||
addr = *(guint32 *) hwaddr;
|
||||
addr = unaligned_read_ne32(hwaddr);
|
||||
out_iid->id_u8[0] = get_gre_eui64_u_bit(addr);
|
||||
out_iid->id_u8[1] = 0x00;
|
||||
out_iid->id_u8[2] = 0x5E;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue