diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-01-17 22:45:19 -0500 |
|---|---|---|
| committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2017-01-17 22:45:19 -0500 |
| commit | f15bf553877254ec0cf2e5ccb87096ebd9efc9ba (patch) | |
| tree | ffbcd9b6af2a5885d77cd246fe0aa3d537e4bfab /pimd/pim_sock.c | |
| parent | a7d3a72e116afcf26d7aa9b77a487a2c2b7c43fb (diff) | |
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>
Diffstat (limited to 'pimd/pim_sock.c')
| -rw-r--r-- | pimd/pim_sock.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index de56eb6076..43fe7b7d13 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -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; } |
