From 4be266a9831799dcc2e67e83fc83d9db43828a64 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 18 Jul 2012 19:29:33 +0200 Subject: Implements wildcard matching in config file include. Also fixes some minor bugs in include. Thanks Kelly Cochran for suggestion and draft patch. --- sysdep/unix/main.c | 24 ------------------------ 1 file changed, 24 deletions(-) (limited to 'sysdep') diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index e0563aae..f0344a8f 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -162,29 +162,6 @@ cf_read(byte *dest, unsigned int len, int fd) return l; } -static int -cf_open(char *filename) -{ - char full_name[BIRD_FNAME_MAX]; - char *cur = filename; - int ret; - - if (*filename != '/') { - char dir[BIRD_FNAME_MAX]; - strncpy(dir, config_name, sizeof(dir)); - dir[sizeof(dir)-1] = 0; - snprintf(full_name, sizeof(full_name), "%s/%s", dirname(dir), filename); - full_name[sizeof(full_name)-1] = 0; - cur = full_name; - } - - if ((ret = open(cur, O_RDONLY)) == -1) - cf_error("Unable to open included configuration file: %s", cur); - - return ret; -} - - void sysdep_preconfig(struct config *c) { @@ -216,7 +193,6 @@ unix_read_config(struct config **cp, char *name) if (conf->file_fd < 0) return 0; cf_read_hook = cf_read; - cf_open_hook = cf_open; ret = config_parse(conf); close(conf->file_fd); return ret; -- cgit v1.2.3 From c4b76d7b19cf48ddbcbe913c22ef7f1e8429f5ea Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Wed, 18 Jul 2012 19:35:30 +0200 Subject: Rename sk_new() to avoid name collision with OpenSSL. --- lib/socket.h | 4 +++- sysdep/unix/io.c | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) (limited to 'sysdep') diff --git a/lib/socket.h b/lib/socket.h index b0c3eda2..0ee43b52 100644 --- a/lib/socket.h +++ b/lib/socket.h @@ -48,7 +48,9 @@ typedef struct birdsock { char *password; /* Password for MD5 authentication */ } sock; -sock *sk_new(pool *); /* Allocate new socket */ +sock *sock_new(pool *); /* Allocate new socket */ +#define sk_new(X) sock_new(X) /* Wrapper to avoid name collision with OpenSSL */ + int sk_open(sock *); /* Open socket */ int sk_send(sock *, unsigned len); /* Send data, <0=err, >0=ok, 0=sleep */ int sk_send_to(sock *, unsigned len, ip_addr to, unsigned port); /* sk_send to given destination */ diff --git a/sysdep/unix/io.c b/sysdep/unix/io.c index 475d660c..f91b5278 100644 --- a/sysdep/unix/io.c +++ b/sysdep/unix/io.c @@ -588,9 +588,12 @@ static struct resclass sk_class = { * This function creates a new socket resource. If you want to use it, * you need to fill in all the required fields of the structure and * call sk_open() to do the actual opening of the socket. + * + * The real function name is sock_new(), sk_new() is a macro wrapper + * to avoid collision with OpenSSL. */ sock * -sk_new(pool *p) +sock_new(pool *p) { sock *s = ralloc(p, &sk_class); s->pool = p; -- cgit v1.2.3 From c06de722ddf36f3d6aaabfd4ae9d74a3ea72bbf9 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Mon, 6 Aug 2012 11:09:13 +0200 Subject: Some minor fixes. --- proto/ospf/lsupd.c | 6 ++++-- sysdep/linux/netlink.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'sysdep') diff --git a/proto/ospf/lsupd.c b/proto/ospf/lsupd.c index f71c72d1..16967a7f 100644 --- a/proto/ospf/lsupd.c +++ b/proto/ospf/lsupd.c @@ -502,15 +502,17 @@ ospf_lsupd_receive(struct ospf_packet *ps_i, struct ospf_iface *ifa, continue; } #else /* OSPFv3 */ + u16 scope = ntoht(lsa->type) & LSA_SCOPE_MASK; + /* 4.5.1 (2) */ - if ((LSA_SCOPE(lsa) == LSA_SCOPE_AS) && !oa_is_ext(ifa->oa)) + if ((scope == LSA_SCOPE_AS) && !oa_is_ext(ifa->oa)) { log(L_WARN "Received LSA with AS scope in stub area from %I", n->ip); continue; } /* 4.5.1 (3) */ - if ((LSA_SCOPE(lsa) == LSA_SCOPE_RES)) + if (scope == LSA_SCOPE_RES) { log(L_WARN "Received LSA with invalid scope from %I", n->ip); continue; diff --git a/sysdep/linux/netlink.c b/sysdep/linux/netlink.c index eaaf048e..d1b203ef 100644 --- a/sysdep/linux/netlink.c +++ b/sysdep/linux/netlink.c @@ -737,7 +737,7 @@ nl_parse_route(struct nlmsghdr *h, int scan) (a[RTA_GATEWAY] && RTA_PAYLOAD(a[RTA_GATEWAY]) != sizeof(ip_addr)) || (a[RTA_PRIORITY] && RTA_PAYLOAD(a[RTA_PRIORITY]) != 4) || (a[RTA_PREFSRC] && RTA_PAYLOAD(a[RTA_PREFSRC]) != sizeof(ip_addr)) || - (a[RTA_FLOW] && RTA_PAYLOAD(a[RTA_OIF]) != 4)) + (a[RTA_FLOW] && RTA_PAYLOAD(a[RTA_FLOW]) != 4)) { log(L_ERR "KRT: Malformed message received"); return; -- cgit v1.2.3 From 94e2f1c111721d6213ea65cac5c53036e38e3973 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Tue, 7 Aug 2012 11:06:57 +0200 Subject: NEWS and version update. --- NEWS | 9 +++++++++ misc/bird.spec | 2 +- sysdep/config.h | 2 +- 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'sysdep') diff --git a/NEWS b/NEWS index 8193b54a..3aaa4dd6 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,12 @@ +Version 1.3.8 (2012-08-07) + o Generalized import and export route limits. + o RDNSS and DNSSL support for RAdv. + o Include in config file support wildcards. + o History deduplication in BIRD client. + o New route attributes krt_source, krt_metric. + o Different instance ID support for OSPFv3. + o Real broadcast mode for OSPFv2. + o Several minor bugfixes. Version 1.3.7 (2012-03-22) o Route Origin Authorization basics. diff --git a/misc/bird.spec b/misc/bird.spec index 60002a5d..de63a6a0 100644 --- a/misc/bird.spec +++ b/misc/bird.spec @@ -1,6 +1,6 @@ Summary: BIRD Internet Routing Daemon Name: bird -Version: 1.3.7 +Version: 1.3.8 Release: 1 Copyright: GPL Group: Networking/Daemons diff --git a/sysdep/config.h b/sysdep/config.h index 8d93d381..7106e4ba 100644 --- a/sysdep/config.h +++ b/sysdep/config.h @@ -7,7 +7,7 @@ #define _BIRD_CONFIG_H_ /* BIRD version */ -#define BIRD_VERSION "1.3.7" +#define BIRD_VERSION "1.3.8" /* Include parameters determined by configure script */ #include "sysdep/autoconf.h" -- cgit v1.2.3