When an interface is deleted IPV6_DROP_MEMBERSHIP is not called leaking mc memory in kernel making radvd fail to send RA on new interfaces with the following errors:
sendmsg: No buffer space available
can't join ipv6-allrouters on tap1
can't join ipv6-allrouters on tap1
can't join ipv6-allrouters on tap1
[...]
The following script reproduces the issue:
#!/bin/bash
IFNAME=tap1
for i in {1..1000}; do
echo "Iteration: $i"
echo "Creating tap..."
ip tuntap add mode tap ${IFNAME}
ip link set ${IFNAME} up
echo "Spawning qemu..."
# radvd waits 1 second by default before joining the multicast group
timeout 1.5 qemu-system-x86_64 -boot n -net nic -net tap,ifname=${IFNAME},script=no,downscript=no -nographic
echo "Removing tap..."
ip link delete ${IFNAME}
done
Related-To: https://github.com/radvd-project/radvd/issues/177
When an interface is deleted
IPV6_DROP_MEMBERSHIP
is not called leaking mc memory in kernel making radvd fail to send RA on new interfaces with the following errors:The following script reproduces the issue:
with the following config file:
Note: on our kernel the issue happens on about ~366 iterations with the following config: