summaryrefslogtreecommitdiff
path: root/sysdep
diff options
context:
space:
mode:
authorOndrej Zajicek <santiago@crfreenet.org>2013-11-19 22:33:48 +0100
committerOndrej Zajicek <santiago@crfreenet.org>2013-11-19 22:33:48 +0100
commit1ec522538fb81a56b068c087d0a842faf7aa7869 (patch)
tree84dc0555c224120da8772b1714e7e4f1dfa66aa5 /sysdep
parent0e175f9f0fd872e95225355dbdeca49cd35ec0fd (diff)
BFD protocol, ready for release.
Supports OSPF and BGP and also statically configured sessions.
Diffstat (limited to 'sysdep')
-rw-r--r--sysdep/autoconf.h.in4
-rw-r--r--sysdep/unix/io.c2
-rw-r--r--sysdep/unix/log.c9
3 files changed, 14 insertions, 1 deletions
diff --git a/sysdep/autoconf.h.in b/sysdep/autoconf.h.in
index ac6f7a87..a9e46e27 100644
--- a/sysdep/autoconf.h.in
+++ b/sysdep/autoconf.h.in
@@ -39,10 +39,14 @@
#undef CONFIG_STATIC
#undef CONFIG_RIP
#undef CONFIG_RADV
+#undef CONFIG_BFD
#undef CONFIG_BGP
#undef CONFIG_OSPF
#undef CONFIG_PIPE
+/* We use multithreading */
+#undef USE_PTHREADS
+
/* We have <syslog.h> and syslog() */
#undef HAVE_SYSLOG
diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c
index f0ec6dae..da8343f9 100644
--- a/sysdep/unix/io.c
+++ b/sysdep/unix/io.c
@@ -538,6 +538,8 @@ sk_free(resource *r)
if (s->fd >= 0)
{
close(s->fd);
+
+ /* FIXME: we should call sk_stop() for SKF_THREAD sockets */
if (s->flags & SKF_THREAD)
return;
diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c
index 67b70773..9dd4d66f 100644
--- a/sysdep/unix/log.c
+++ b/sysdep/unix/log.c
@@ -36,13 +36,20 @@ static const bird_clock_t rate_limit_time = 5;
static const int rate_limit_count = 5;
-// XXX add ifdef for threads
+#ifdef USE_PTHREADS
#include <pthread.h>
static pthread_mutex_t log_mutex;
static inline void log_lock(void) { pthread_mutex_lock(&log_mutex); }
static inline void log_unlock(void) { pthread_mutex_unlock(&log_mutex); }
+#else
+
+static inline void log_lock(void) { }
+static inline void log_unlock(void) { }
+
+#endif
+
#ifdef HAVE_SYSLOG
#include <sys/syslog.h>