mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-08 01:15:12 +00:00
zebra: close fd when not needed
Upon decision that the vrf is not going to be supported by namespaces close the fd. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
267bf505c5
commit
4307629f18
@ -349,8 +349,10 @@ ns_id_t zebra_ns_id_get_default(void)
|
|||||||
|
|
||||||
if (fd == -1)
|
if (fd == -1)
|
||||||
return NS_DEFAULT_INTERNAL;
|
return NS_DEFAULT_INTERNAL;
|
||||||
if (!vrf_is_backend_netns())
|
if (!vrf_is_backend_netns()) {
|
||||||
|
close(fd);
|
||||||
return NS_DEFAULT_INTERNAL;
|
return NS_DEFAULT_INTERNAL;
|
||||||
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
return zebra_ns_id_get((char *)NS_DEFAULT_NAME);
|
return zebra_ns_id_get((char *)NS_DEFAULT_NAME);
|
||||||
#else /* HAVE_NETNS */
|
#else /* HAVE_NETNS */
|
||||||
|
Loading…
Reference in New Issue
Block a user