Skip to content
Commit 1af7f88a authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

inet: fix inet_fill_ifaddr() flags truncation

I missed that (struct ifaddrmsg)->ifa_flags was only 8bits,
while (struct in_ifaddr)->ifa_flags is 32bits.

Use a temporary 32bit variable as I did in set_ifa_lifetime()
and check_lifetime().

Fixes: 3ddc2231

 ("inet: annotate data-races around ifa->ifa_flags")
Reported-by: default avatarYu Watanabe <watanabe.yu@gmail.com>
Dianosed-by: default avatarYu Watanabe <watanabe.yu@gmail.com>
Closes: https://github.com/systemd/systemd/pull/32666#issuecomment-2103977928
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarLarysa Zaremba <larysa.zaremba@intel.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20240510072932.2678952-1-edumazet@google.com
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c9f9df3f
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment