From f15bf553877254ec0cf2e5ccb87096ebd9efc9ba Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 17 Jan 2017 22:45:19 -0500 Subject: [PATCH] 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 --- pimd/pim_sock.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; } -- 2.39.5