mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-15 11:30:30 +00:00
zebra: Fix the RA send failed in netns mode
In the rtadv_timer(), it always uses the zvrf's socket to send RA packets. In the vrf-lite mode, it's righ since it uses the default vrf to send the RA packets. But in the netns mode, it uses socket in each netns. So the issue only happens in the netns mode because the zvrf's socket may not be in the same netns as the interface's netns. In order to compatible with both vrf-lite and netns mode, the fix uses the if_lookup_by_index() to check whether interfaces can use the zvrf's socket. Signed-off-by: LEI BAO <bali.baolei@cn.ibm.com>
This commit is contained in:
parent
9e89bcd4f4
commit
553dbdbf8e
@ -494,7 +494,7 @@ static int rtadv_timer(struct thread *thread)
|
||||
RB_FOREACH (vrf, vrf_id_head, &vrfs_by_id)
|
||||
FOR_ALL_INTERFACES (vrf, ifp) {
|
||||
if (if_is_loopback_or_vrf(ifp) || !if_is_operative(ifp)
|
||||
|| ifp->vrf_id != zvrf->vrf->vrf_id)
|
||||
|| if_lookup_by_index(ifp->ifindex, zvrf->vrf->vrf_id) == NULL)
|
||||
continue;
|
||||
|
||||
zif = ifp->info;
|
||||
|
Loading…
Reference in New Issue
Block a user