mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-05-01 00:25:52 +00:00
ldpd: add missing privilege dropping on error path
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
This commit is contained in:
parent
9c0b0e6753
commit
07bc383384
@ -85,6 +85,8 @@ ldp_create_socket(int af, enum socket_type type)
|
||||
if (ldpd_privs.change(ZPRIVS_RAISE))
|
||||
log_warn("%s: could not raise privs", __func__);
|
||||
if (sock_set_reuse(fd, 1) == -1) {
|
||||
if (ldpd_privs.change(ZPRIVS_LOWER))
|
||||
log_warn("%s: could not lower privs", __func__);
|
||||
close(fd);
|
||||
return (-1);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user