mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-07 15:18:06 +00:00
pimd: SO_BINDTODEVICE is not available on some platforms.
Follow bgp's lead and don't allow SO_BINDTODEVICE on *bsd. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
a7d3a72e11
commit
f15bf55387
@ -94,7 +94,8 @@ pim_socket_ip_hdr (int fd)
|
|||||||
int
|
int
|
||||||
pim_socket_bind (int fd, struct interface *ifp)
|
pim_socket_bind (int fd, struct interface *ifp)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret = 0;
|
||||||
|
#ifdef SO_BINDTODEVICE
|
||||||
|
|
||||||
if (pimd_privs.change (ZPRIVS_RAISE))
|
if (pimd_privs.change (ZPRIVS_RAISE))
|
||||||
zlog_err ("%s: could not raise privs, %s",
|
zlog_err ("%s: could not raise privs, %s",
|
||||||
@ -107,6 +108,7 @@ pim_socket_bind (int fd, struct interface *ifp)
|
|||||||
zlog_err ("%s: could not lower privs, %s",
|
zlog_err ("%s: could not lower privs, %s",
|
||||||
__PRETTY_FUNCTION__, safe_strerror (errno));
|
__PRETTY_FUNCTION__, safe_strerror (errno));
|
||||||
|
|
||||||
|
#endif
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user