]> xenbits.xensource.com Git - libvirt.git/commit
network: Increase max route size when checking IPv6 forwarding
authorBrooks Swinnerton <bswinnerton@gmail.com>
Sat, 21 Jan 2023 00:58:05 +0000 (19:58 -0500)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 24 Jan 2023 08:19:13 +0000 (09:19 +0100)
commitdfef0e70deaf525122eb4cf4abd0ba0cded1a4c2
tree727e4c5dfeabe0f4911801ec1fdeb77423f85d1a
parent228e5a98d2567843c0c2f624956c7726e46b6234
network: Increase max route size when checking IPv6 forwarding

In d9ee51e, virNetDevIPCheckIPv6Forwarding was updated to walk the
contents of /proc/net/ipv6_route so that it could check to see if the
RTF_ADDRCONF was set on any IPv6 routes to ultimately determine if
enabling forwarding would result in an error due to accept_ra=1 being
set on the interface.

The implementation added in that commit limited the number of routes
that could be read from /proc/net/ipv6_route to 100_000, each with 150
characters. This is problematic for machines that have a full IPv6
routing table, as the IPv6 routing table has now grown to over 160_000
(it was closer to 100_000 at the time of that commit).

This patch increases the maximum route size from 100_000 to 1_000_000.
While a million routes is somewhat arbitrary, it's meant to be a value
that can be supported for the forseeable future. APNIC, one of the five
regional internet registries, recently published a forecast of IPv6
table growth which anticipates a worst-case growth to 1_000_000 in
January of 2029.

Signed-off-by: Brooks Swinnerton <bswinnerton@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/util/virnetdevip.c