zebra: Always receive RS
zebra: The socket is listening on ND_ROUTER_SOLICIT of icmpv6, but won't recv it when RA is disabled. It will let packets accumulate in kernel. We should always receive RS packets regardless of whether RA is disabled. fix: https://github.com/FRRouting/frr/issues/15303, https://github.com/FRRouting/frr/discussions/15365
I'm not sure this is the right approach. It seems to me that either a) we should stop unconditionally opening the per-vrf socket, or b) once opened, we should be willing to read it, and just drain the messages if they won't be used (because of configuration).
I confirm that this error occurred in this environment:
- Open OS IPv6 forwarding capability;
- Ceasing all interfaces to be an advertising interface(set the AdvSendAdvertisements flag to FALSE)
[root@localhost ~]# cat /etc/frr/zebra.conf
!configuration by zddi!
hostname zebra
password zebra
log file /disk_extend/var_log/frr_log/zebra.log
!
interface eth0
ip address 10.2.48.140/22
ipv6 nd suppress-ra
!
interface lo
!
line vty
All RS(Router Solicitation) packets will blocked in zebra's recv-q. It will be used more than 2GiB memory in my testing, although kernel's default rmem size is 67108864. The kernel's alloc_pages won't be caculated in /proc/meminfo, but we can see the used value in free command released almost 2G after zebra being stoped with recv-q buffer full.
I'm not sure this is the right approach. It seems to me that either a) we should stop unconditionally opening the per-vrf socket, or b) once opened, we should be willing to read it, and just drain the messages if they won't be used (because of configuration).
we also can set the recv-buffer of per-vrf socket to the 2097152. The value which can be acceptable to mem leak.
This PR is very important, if we only use BGP with ipv6-forward enabled. Since there will no configure in zebra.conf about RS/RA. All RS(Router Solicitation) packets will be blocked in zebra's recv-q by default.
hmm, well, I made a couple of suggestions, and then you also offered a suggestion. but the code in the PR still has the problem that I commented about. if the PR is important to you, then please ... fix it?
This PR is very important, if we only use BGP with ipv6-forward enabled. Since there will no configure in zebra.conf about RS/RA. All RS(Router Solicitation) packets will be blocked in zebra's recv-q by default.