Maciej Żenczykowski 9846d8c8c3 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:17:34 +01:00
..
2021-07-01 13:19:48 -07:00
2020-05-05 13:23:29 -07:00
2023-11-20 11:08:28 +01:00
2019-12-09 10:36:44 -08:00
2020-06-22 21:12:44 -07:00
2023-09-19 12:22:59 +02:00
2021-07-27 13:05:56 +01:00
2021-10-18 13:47:09 +01:00
2020-03-04 13:25:55 -08:00
2023-06-14 11:13:02 +02:00
2019-10-05 16:29:00 -07:00
2021-08-03 13:05:26 +01:00
2020-06-18 20:46:23 -07:00
2023-08-11 15:13:54 +02:00
2019-12-09 10:28:43 -08:00