mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-07-09 18:09:00 +00:00
pimd: Fix wrong setsockopt() call
`setsockopt()` should be only called once with `MRT_TABLE` in "enable" case, otherwise it will fail. In current code, `mroute_socket` of "pim instance" with VRF can't be correctly closed. Skip it in the "disable" case to let `mroute_socket` safely closed. Signed-off-by: anlan_cs <vic.lan@pica8.com>
This commit is contained in:
parent
13c426150f
commit
ad855cdf34
@ -46,7 +46,7 @@ int pim_mroute_set(struct pim_instance *pim, int enable)
|
|||||||
/*
|
/*
|
||||||
* We need to create the VRF table for the pim mroute_socket
|
* We need to create the VRF table for the pim mroute_socket
|
||||||
*/
|
*/
|
||||||
if (pim->vrf->vrf_id != VRF_DEFAULT) {
|
if (enable && pim->vrf->vrf_id != VRF_DEFAULT) {
|
||||||
frr_with_privs (&pimd_privs) {
|
frr_with_privs (&pimd_privs) {
|
||||||
|
|
||||||
data = pim->vrf->data.l.table_id;
|
data = pim->vrf->data.l.table_id;
|
||||||
|
Loading…
Reference in New Issue
Block a user