]> git.puffer.fish Git - mirror/frr.git/commit
zebra: Fix the RA send failed in netns mode
authorLEI BAO <bali.baolei@cn.ibm.com>
Fri, 5 Nov 2021 06:05:36 +0000 (14:05 +0800)
committerLEI BAO <bali.baolei@cn.ibm.com>
Fri, 5 Nov 2021 06:13:25 +0000 (14:13 +0800)
commit553dbdbf8e56c7162598908f7c53a6e020248a09
treec8445fab842586c080efefc89353d6cff49b3c07
parent9e89bcd4f4c1b6b229d4c654d5d5743b2f5192b1
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>
zebra/rtadv.c