From 56027b5cbd7f432d30f7fc99bcf8680c840e6163 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Nov 2013 21:58:43 +0100 Subject: [PATCH 1/5] Minor fix in log_commit() w.r.t. changes in BFD branch. --- filter/test.conf | 6 +++--- sysdep/unix/log.c | 2 ++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/filter/test.conf b/filter/test.conf index 62c807b7..ae8a95a6 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -267,7 +267,7 @@ pair set ps; ec set ecs; ip set ips; prefix set pxs; -string s; +string st; { print "1a-a1 = 30: ", '1a-a1'; print "Testing filter language:"; @@ -352,8 +352,8 @@ string s; print "Testing EC set, false: ", (ro, 10, 20) ~ ecs, " ", (rt, 10, 21) ~ ecs, " ", (ro, 100000, 99) ~ ecs, " ", (ro, 12345, 10) ~ ecs, " ", (rt, 12346, 0) ~ ecs, " ", (ro, 0.1.134.160, 150) ~ ecs; - s = "Hello"; - print "Testing string: ", s, " true: ", s ~ "Hell*", " false: ", s ~ "ell*"; + st = "Hello"; + print "Testing string: ", st, " true: ", st ~ "Hell*", " false: ", st ~ "ell*"; b = true; print "Testing bool: ", b, ", ", !b; diff --git a/sysdep/unix/log.c b/sysdep/unix/log.c index 9dd4d66f..0f4c06e9 100644 --- a/sysdep/unix/log.c +++ b/sysdep/unix/log.c @@ -130,6 +130,8 @@ log_commit(int class, buffer *buf) /* FIXME: cli_echo is not thread-safe */ cli_echo(class, buf->start); + + buf->pos = buf->start; } int buffer_vprint(buffer *buf, const char *fmt, va_list args); From 41f8bf57c4d80cbec89b90b901afa9df4d2d76f1 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Nov 2013 21:59:43 +0100 Subject: [PATCH 2/5] Changes identifiers to avoid use of reserved ones. --- lib/birdlib.h | 20 ++++++++++---------- proto/bfd/bfd.h | 6 +++--- proto/bfd/io.h | 2 +- proto/radv/config.Y | 2 +- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/birdlib.h b/lib/birdlib.h index b7a5a6a6..04fb7fed 100644 --- a/lib/birdlib.h +++ b/lib/birdlib.h @@ -20,14 +20,14 @@ /* Utility macros */ -#define _MIN(a,b) (((a)<(b))?(a):(b)) -#define _MAX(a,b) (((a)>(b))?(a):(b)) +#define MIN_(a,b) (((a)<(b))?(a):(b)) +#define MAX_(a,b) (((a)>(b))?(a):(b)) #ifndef PARSER #undef MIN #undef MAX -#define MIN(a,b) _MIN(a,b) -#define MAX(a,b) _MAX(a,b) +#define MIN(a,b) MIN_(a,b) +#define MAX(a,b) MAX_(a,b) #endif #define ABS(a) ((a)>=0 ? (a) : -(a)) @@ -54,17 +54,17 @@ typedef s64 btime; -#define _S *1000000 -#define _MS *1000 -#define _US *1 +#define S_ *1000000 +#define MS_ *1000 +#define US_ *1 #define TO_S /1000000 #define TO_MS /1000 #define TO_US /1 #ifndef PARSER -#define S _S -#define MS _MS -#define US _US +#define S S_ +#define MS MS_ +#define US US_ #endif diff --git a/proto/bfd/bfd.h b/proto/bfd/bfd.h index f4ab3fcc..9b61be64 100644 --- a/proto/bfd/bfd.h +++ b/proto/bfd/bfd.h @@ -28,9 +28,9 @@ #define BFD_ECHO_PORT 3785 #define BFD_MULTI_CTL_PORT 4784 -#define BFD_DEFAULT_MIN_RX_INT (10 _MS) -#define BFD_DEFAULT_MIN_TX_INT (100 _MS) -#define BFD_DEFAULT_IDLE_TX_INT (1 _S) +#define BFD_DEFAULT_MIN_RX_INT (10 MS_) +#define BFD_DEFAULT_MIN_TX_INT (100 MS_) +#define BFD_DEFAULT_IDLE_TX_INT (1 S_) #define BFD_DEFAULT_MULTIPLIER 5 diff --git a/proto/bfd/io.h b/proto/bfd/io.h index 3f166a47..641ee054 100644 --- a/proto/bfd/io.h +++ b/proto/bfd/io.h @@ -75,7 +75,7 @@ static inline void tm2_start_max(timer2 *t, btime after) { btime rem = tm2_remains(t); - tm2_start(t, _MAX(rem, after)); + tm2_start(t, MAX_(rem, after)); } */ diff --git a/proto/radv/config.Y b/proto/radv/config.Y index c5b7aaee..ff70a2f7 100644 --- a/proto/radv/config.Y +++ b/proto/radv/config.Y @@ -113,7 +113,7 @@ radv_iface_finish: struct radv_iface_config *ic = RADV_IFACE; if (ic->min_ra_int == (u32) -1) - ic->min_ra_int = _MAX(ic->max_ra_int / 3, 3); + ic->min_ra_int = MAX_(ic->max_ra_int / 3, 3); if (ic->default_lifetime == (u32) -1) ic->default_lifetime = 3 * ic->max_ra_int; From 547d3bf45dd430828d597dfb56624bdc1bd798b3 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Nov 2013 22:42:47 +0100 Subject: [PATCH 3/5] Allows pthreads by default on Linux and FreeBSD only. --- configure.in | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/configure.in b/configure.in index 9b5dc3e2..5af574a5 100644 --- a/configure.in +++ b/configure.in @@ -83,6 +83,14 @@ if test -z "$GCC" ; then AC_MSG_ERROR([This program requires the GNU C Compiler.]) fi +# Enable threads by default just in Linux and FreeBSD +if test "$enable_pthreads" = try ; then + case "$host_os" in + (linux* | freebsd*) enable_pthreads=try ;; + (*) enable_pthreads=no ;; + esac +fi + if test "$enable_pthreads" != no ; then BIRD_CHECK_PTHREADS From 77e43c8b72ff77dc7607accb09576c0baab422e0 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Fri, 22 Nov 2013 22:49:04 +0100 Subject: [PATCH 4/5] Minor fixes. --- proto/bgp/bgp.c | 1 - proto/bgp/bgp.h | 2 +- proto/ospf/config.Y | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/proto/bgp/bgp.c b/proto/bgp/bgp.c index 07ad31f3..cc5318e8 100644 --- a/proto/bgp/bgp.c +++ b/proto/bgp/bgp.c @@ -59,7 +59,6 @@ #include "nest/iface.h" #include "nest/protocol.h" #include "nest/route.h" -#include "nest/bfd.h" #include "nest/cli.h" #include "nest/locks.h" #include "conf/conf.h" diff --git a/proto/bgp/bgp.h b/proto/bgp/bgp.h index d2a96bbb..b5e216b7 100644 --- a/proto/bgp/bgp.h +++ b/proto/bgp/bgp.h @@ -11,10 +11,10 @@ #include #include "nest/route.h" +#include "nest/bfd.h" struct linpool; struct eattr; -struct bfd_request; struct bgp_config { struct proto_config c; diff --git a/proto/ospf/config.Y b/proto/ospf/config.Y index 68efa230..c47a8cd2 100644 --- a/proto/ospf/config.Y +++ b/proto/ospf/config.Y @@ -128,7 +128,7 @@ CF_KEYWORDS(NEIGHBORS, RFC1583COMPAT, STUB, TICK, COST, COST2, RETRANSMIT) CF_KEYWORDS(HELLO, TRANSMIT, PRIORITY, DEAD, TYPE, BROADCAST, BCAST, DEFAULT) CF_KEYWORDS(NONBROADCAST, NBMA, POINTOPOINT, PTP, POINTOMULTIPOINT, PTMP) CF_KEYWORDS(NONE, SIMPLE, AUTHENTICATION, STRICT, CRYPTOGRAPHIC, TTL, SECURITY) -CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK, ONLY) +CF_KEYWORDS(ELIGIBLE, POLL, NETWORKS, HIDDEN, VIRTUAL, CHECK, LINK, ONLY, BFD) CF_KEYWORDS(RX, BUFFER, LARGE, NORMAL, STUBNET, HIDDEN, SUMMARY, TAG, EXTERNAL) CF_KEYWORDS(WAIT, DELAY, LSADB, ECMP, LIMIT, WEIGHT, NSSA, TRANSLATOR, STABILITY) CF_KEYWORDS(GLOBAL, LSID, ROUTER, SELF, INSTANCE, REAL, NETMASK, TX, PRIORITY) From 2b3d52aa421ae1c31e30107beefd82fddbb42854 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Sat, 23 Nov 2013 01:56:16 +0100 Subject: [PATCH 5/5] NEWS and version update. --- NEWS | 10 ++++++++++ misc/bird.spec | 2 +- sysdep/config.h | 2 +- 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index 2e851a10..1341fcd4 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,13 @@ +Version 1.3.12 (2013-11-23) + o BFD protocol (RFC 5880). + o BFD support for OSPF and BGP. + o New 'allow local as' option for BGP. + o Filters allows setting gw, ifname and ifindex. + o Filter operator 'delete/filter' extended to bgp_paths. + o Filter operator 'len' extended to [e]clists. + o PID file support. + o Several bugfixes and minor improvements. + Version 1.3.11 (2013-07-27) o OSPF stub router option (RFC 3137). o TTL security for OSPF and RIP. diff --git a/misc/bird.spec b/misc/bird.spec index 3b8bb5ec..c27eabbf 100644 --- a/misc/bird.spec +++ b/misc/bird.spec @@ -1,6 +1,6 @@ Summary: BIRD Internet Routing Daemon Name: bird -Version: 1.3.11 +Version: 1.3.12 Release: 1 Copyright: GPL Group: Networking/Daemons diff --git a/sysdep/config.h b/sysdep/config.h index e2320411..914c1090 100644 --- a/sysdep/config.h +++ b/sysdep/config.h @@ -7,7 +7,7 @@ #define _BIRD_CONFIG_H_ /* BIRD version */ -#define BIRD_VERSION "1.3.11" +#define BIRD_VERSION "1.3.12" /* Include parameters determined by configure script */ #include "sysdep/autoconf.h"