Maciej Żenczykowski 97275e470c net: ipv6: support reporting otherwise unknown prefix flags in RTM_NEWPREFIX
[ Upstream commit bd4a816752bab609dd6d65ae021387beb9e2ddbd ]

Lorenzo points out that we effectively clear all unknown
flags from PIO when copying them to userspace in the netlink
RTM_NEWPREFIX notification.

We could fix this one at a time as new flags are defined,
or in one fell swoop - I choose the latter.

We could either define 6 new reserved flags (reserved1..6) and handle
them individually (and rename them as new flags are defined), or we
could simply copy the entire unmodified byte over - I choose the latter.

This unfortunately requires some anonymous union/struct magic,
so we add a static assert on the struct size for a little extra safety.

Cc: David Ahern <dsahern@kernel.org>
Cc: Lorenzo Colitti <lorenzo@google.com>
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-20 15:44:27 +01:00
..
2021-06-10 13:39:24 +02:00
2020-05-05 13:23:29 -07:00
2023-11-20 11:06:55 +01:00
2019-12-09 10:36:44 -08:00
2020-06-22 21:12:44 -07:00
2023-09-19 12:20:27 +02:00
2021-08-04 12:46:43 +02:00
2020-03-04 13:25:55 -08:00
2023-06-14 11:09:42 +02:00
2019-10-05 16:29:00 -07:00
2020-06-18 20:46:23 -07:00
2023-08-11 11:57:50 +02:00
2019-12-09 10:28:43 -08:00