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:
Donald Sharp 2017-01-17 22:45:19 -05:00
parent a7d3a72e11
commit f15bf55387

View File

@ -94,7 +94,8 @@ pim_socket_ip_hdr (int fd)
int
pim_socket_bind (int fd, struct interface *ifp)
{
int ret;
int ret = 0;
#ifdef SO_BINDTODEVICE
if (pimd_privs.change (ZPRIVS_RAISE))
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",
__PRETTY_FUNCTION__, safe_strerror (errno));
#endif
return ret;
}