]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: SO_BINDTODEVICE is not available on some platforms.
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Jan 2017 03:45:19 +0000 (22:45 -0500)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 18 Jan 2017 03:45:19 +0000 (22:45 -0500)
Follow bgp's lead and don't allow SO_BINDTODEVICE on *bsd.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
pimd/pim_sock.c

index de56eb60769b35ab2f417c3137f7f3ed4023591c..43fe7b7d13373504f3687f719e3f5caf660bedca 100644 (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;
 }