This commit is contained in:
snar
2013-05-09 13:37:01 +00:00
parent 439f325547
commit 37730a6b43
5 changed files with 71 additions and 67 deletions

100
CHANGES
View File

@@ -1,3 +1,7 @@
0.1.19 (2013-05-09)
- CLANG compilation issues fixed.
- bgpq3.spec added. Thanks to Arnoud Vermeer.
0.1.18 (2013-01-08) 0.1.18 (2013-01-08)
- JSON output format. Thanks to Job Snijders (Atrato Networks). - JSON output format. Thanks to Job Snijders (Atrato Networks).
@@ -7,10 +11,10 @@
- bug in aggregation documentation fixed. Thanks to Nikolay Shopik. - bug in aggregation documentation fixed. Thanks to Nikolay Shopik.
0.1.16 (2012-01-19) 0.1.16 (2012-01-19)
- new option -m <len>: maximum length of accepted prefixes. - new option -m <len>: maximum length of accepted prefixes.
Suggested by Eugene Demidov, used to discard 'too long prefixes' Suggested by Eugene Demidov, used to discard 'too long prefixes'
(like /30-/32) even if they are registered in IRR. By default (like /30-/32) even if they are registered in IRR. By default
limit is not set and all prefixes accepted. limit is not set and all prefixes accepted.
- documentation redesigned into text/markdown and text/html (manpage - documentation redesigned into text/markdown and text/html (manpage
supported still). supported still).
@@ -25,7 +29,7 @@
- never publically released. - never publically released.
0.1.12 (2010-10-08) 0.1.12 (2010-10-08)
- Fixed bug preventing AS262144 (that's AS4.0 in asdot) to expand. - Fixed bug preventing AS262144 (that's AS4.0 in asdot) to expand.
Thanks to Sergey Matveychuk Thanks to Sergey Matveychuk
0.1.11 (2010-04-19) 0.1.11 (2010-04-19)
@@ -36,70 +40,70 @@
0.1.9 (2009-03-27) 0.1.9 (2009-03-27)
- RIPE changed ASN32 notation to asplain. And RADB does not support - RIPE changed ASN32 notation to asplain. And RADB does not support
asplain indexing (yet?).... Fixed. Thanks to Pavel Gluchouk. asplain indexing (yet?).... Fixed. Thanks to Pavel Gluchouk.
0.1.8 (2008-12-25) 0.1.8 (2008-12-25)
- new flag -D for Cisco asdot notation. Cisco behaviour is a bit - new flag -D for Cisco asdot notation. Cisco behaviour is a bit
strange for me, but, well, that's their decision: strange for me, but, well, that's their decision:
When the asdot format is enabled as the default, any regular expressions When the asdot format is enabled as the default, any regular expressions
to match 4-byte autonomous system numbers must be written using the asdot to match 4-byte autonomous system numbers must be written using the asdot
format, or else the regular expression match will fail. format, or else the regular expression match will fail.
(c) http://www.cisco.com/en/US/docs/ios/12_0s/release/ntes/120SNEWF.html (c) http://www.cisco.com/en/US/docs/ios/12_0s/release/ntes/120SNEWF.html
#wp3521658 (note the URL wrap). #wp3521658 (note the URL wrap).
0.1.7 (2008-12-19): 0.1.7 (2008-12-19):
- man page. Finally :) - man page. Finally :)
- option -h now means not help, but now it can be used to point to - option -h now means not help, but now it can be used to point to
alternate IRRD host, like in old bgpq. alternate IRRD host, like in old bgpq.
0.1.6 (2008-08-08): 0.1.6 (2008-08-08):
- maxsockbuf call added, that can help with pipelining of really large - maxsockbuf call added, that can help with pipelining of really large
as-sets. as-sets.
- new key -M <extra match condition> for juniper route-filters, f.e.: - new key -M <extra match condition> for juniper route-filters, f.e.:
bgpq3 -JEM "protocol bgp;\n community no-export" -l PolicyName/TermName bgpq3 -JEM "protocol bgp;\n community no-export" -l PolicyName/TermName
will generate term with additional match conditions, like: will generate term with additional match conditions, like:
policy-options { policy-options {
policy-statement PolicyName { policy-statement PolicyName {
term TermName { term TermName {
replace: replace:
from { from {
protocol bgp; protocol bgp;
community no-export; community no-export;
route-filter 10.0.0.0/24 exact; route-filter 10.0.0.0/24 exact;
} }
} }
} }
} }
0.1.5 (2008-06-02): 0.1.5 (2008-06-02):
- route-set's expansion added. Fully functional for IPv4 prefixes, but - route-set's expansion added. Fully functional for IPv4 prefixes, but
not for IPv6 - only those prefixes explicitely marked as 'member-of: RS..' not for IPv6 - only those prefixes explicitely marked as 'member-of: RS..'
will be expanded. This is due to limitation in IRRd. will be expanded. This is due to limitation in IRRd.
- extended access-lists (Cisco) and route-filters (Juniper) generation - extended access-lists (Cisco) and route-filters (Juniper) generation
is supported now with new -E key. For Cisco ipv6 access-lists is not is supported now with new -E key. For Cisco ipv6 access-lists is not
yet supported. yet supported.
0.1.4 (2008-05-30): 0.1.4 (2008-05-30):
- bugfix for juniper as-path group generation. Thanks to Alexander Shikoff. - bugfix for juniper as-path group generation. Thanks to Alexander Shikoff.
0.1.3 (2008-05-20): 0.1.3 (2008-05-20):
- aggregation (-A) now supported for Cisco prefix-lists. - aggregation (-A) now supported for Cisco prefix-lists.
- pipelining now can be enabled for RIPE-style queries too (ipv6). - pipelining now can be enabled for RIPE-style queries too (ipv6).
- more-specific routes (-R len) feature ported from bgpq - more-specific routes (-R len) feature ported from bgpq
- pipelining now set by default. -T flag now disables pipelining. - pipelining now set by default. -T flag now disables pipelining.
- strlcpy.c imported into sources. Not found on Linux :) - strlcpy.c imported into sources. Not found on Linux :)
0.1.2 (2008-05-19): 0.1.2 (2008-05-19):
- final support for asn32, now with correct syntax for Juniper. - final support for asn32, now with correct syntax for Juniper.
- experimental 'pipelining' mode (flag -T), much faster when - experimental 'pipelining' mode (flag -T), much faster when
working with big as-set's. working with big as-set's.
- RIPE-style query (-i origin) now requests only route6 objects. - RIPE-style query (-i origin) now requests only route6 objects.
0.1.1 (2008-05-16): 0.1.1 (2008-05-16):
- initial support for asn32 added (flag -3). By default it's off, - initial support for asn32 added (flag -3). By default it's off,
and when bgpq sees 32-bit asn in resolver queue, it either replaces and when bgpq sees 32-bit asn in resolver queue, it either replaces
it with AS23456 (in as-path generation mode) or queries radb for it with AS23456 (in as-path generation mode) or queries radb for
prefixes with that origin. prefixes with that origin.
Note: for now only JunOS 9.1 can handle asn32, not Cisco IOS.. Note: for now only JunOS 9.1 can handle asn32, not Cisco IOS..

View File

@@ -353,11 +353,11 @@ bgpq_pipeline(FILE* f, int (*callback)(char*, void*), void* udata,
bp=malloc(sizeof(struct bgpq_prequest)); bp=malloc(sizeof(struct bgpq_prequest));
if(!bp) { if(!bp) {
sx_report(SX_FATAL,"Unable to allocate %i bytes: %s\n", sx_report(SX_FATAL,"Unable to allocate %lu bytes: %s\n",
sizeof(struct bgpq_prequest),strerror(errno)); sizeof(struct bgpq_prequest),strerror(errno));
exit(1); exit(1);
}; };
memset(bp,0,sizeof(bp)); memset(bp,0,sizeof(struct bgpq_prequest));
ret=fwrite(request,1,strlen(request),f); ret=fwrite(request,1,strlen(request),f);
@@ -494,7 +494,7 @@ bgpq_expand_radb(FILE* f, int (*callback)(char*, void*), void* udata,
sx_report(SX_FATAL,"EOF from radb (expand,radb)\n"); sx_report(SX_FATAL,"EOF from radb (expand,radb)\n");
exit(1); exit(1);
}; };
SX_DEBUG(debug_expander>2,"expander: initially got %i bytes, '%s'\n", SX_DEBUG(debug_expander>2,"expander: initially got %lu bytes, '%s'\n",
strlen(request),request); strlen(request),request);
if(request[0]=='A') { if(request[0]=='A') {
char* eon, *c; char* eon, *c;
@@ -516,7 +516,7 @@ bgpq_expand_radb(FILE* f, int (*callback)(char*, void*), void* udata,
}; };
exit(1); exit(1);
}; };
SX_DEBUG(debug_expander>2,"expander: final reply of %i bytes, '%s'\n", SX_DEBUG(debug_expander>2,"expander: final reply of %lu bytes, '%s'\n",
strlen(recvbuffer),recvbuffer); strlen(recvbuffer),recvbuffer);
for(c=recvbuffer; c<recvbuffer+togot;) { for(c=recvbuffer; c<recvbuffer+togot;) {

18
configure vendored
View File

@@ -1,6 +1,6 @@
#! /bin/sh #! /bin/sh
# Guess values for system-dependent variables and create Makefiles. # Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for bgpq3 0.1.18. # Generated by GNU Autoconf 2.69 for bgpq3 0.1.19.
# #
# Report bugs to <snar@snar.spb.ru>. # Report bugs to <snar@snar.spb.ru>.
# #
@@ -579,8 +579,8 @@ MAKEFLAGS=
# Identity of this package. # Identity of this package.
PACKAGE_NAME='bgpq3' PACKAGE_NAME='bgpq3'
PACKAGE_TARNAME='bgpq3' PACKAGE_TARNAME='bgpq3'
PACKAGE_VERSION='0.1.18' PACKAGE_VERSION='0.1.19'
PACKAGE_STRING='bgpq3 0.1.18' PACKAGE_STRING='bgpq3 0.1.19'
PACKAGE_BUGREPORT='snar@snar.spb.ru' PACKAGE_BUGREPORT='snar@snar.spb.ru'
PACKAGE_URL='' PACKAGE_URL=''
@@ -1186,7 +1186,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing. # Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh. # This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF cat <<_ACEOF
\`configure' configures bgpq3 0.1.18 to adapt to many kinds of systems. \`configure' configures bgpq3 0.1.19 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]... Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1247,7 +1247,7 @@ fi
if test -n "$ac_init_help"; then if test -n "$ac_init_help"; then
case $ac_init_help in case $ac_init_help in
short | recursive ) echo "Configuration of bgpq3 0.1.18:";; short | recursive ) echo "Configuration of bgpq3 0.1.19:";;
esac esac
cat <<\_ACEOF cat <<\_ACEOF
@@ -1326,7 +1326,7 @@ fi
test -n "$ac_init_help" && exit $ac_status test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then if $ac_init_version; then
cat <<\_ACEOF cat <<\_ACEOF
bgpq3 configure 0.1.18 bgpq3 configure 0.1.19
generated by GNU Autoconf 2.69 generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc. Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1494,7 +1494,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake. running configure, to aid debugging if configure makes a mistake.
It was created by bgpq3 $as_me 0.1.18, which was It was created by bgpq3 $as_me 0.1.19, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@ $ $0 $@
@@ -3368,7 +3368,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their # report actual input values of CONFIG_FILES etc. instead of their
# values after options handling. # values after options handling.
ac_log=" ac_log="
This file was extended by bgpq3 $as_me 0.1.18, which was This file was extended by bgpq3 $as_me 0.1.19, which was
generated by GNU Autoconf 2.69. Invocation command line was generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES CONFIG_FILES = $CONFIG_FILES
@@ -3430,7 +3430,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\ ac_cs_version="\\
bgpq3 config.status 0.1.18 bgpq3 config.status 0.1.19
configured by $0, generated by GNU Autoconf 2.69, configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\" with options \\"\$ac_cs_config\\"

View File

@@ -1,4 +1,4 @@
AC_INIT(bgpq3,0.1.18,snar@snar.spb.ru) AC_INIT(bgpq3,0.1.19,snar@snar.spb.ru)
AC_CONFIG_HEADER(config.h) AC_CONFIG_HEADER(config.h)
AC_PROG_CC AC_PROG_CC
AC_PROG_INSTALL AC_PROG_INSTALL

View File

@@ -187,7 +187,7 @@ sx_radix_node_new(struct sx_prefix* prefix)
return rn; return rn;
}; };
inline int int
sx_prefix_eqbits(struct sx_prefix* a, struct sx_prefix* b) sx_prefix_eqbits(struct sx_prefix* a, struct sx_prefix* b)
{ {
int i; int i;
@@ -206,7 +206,7 @@ sx_prefix_eqbits(struct sx_prefix* a, struct sx_prefix* b)
return b->masklen; return b->masklen;
}; };
inline int int
sx_prefix_isbitset(struct sx_prefix* p, int n) sx_prefix_isbitset(struct sx_prefix* p, int n)
{ {
unsigned char s; unsigned char s;
@@ -649,7 +649,7 @@ sx_radix_tree_aggregate(struct sx_radix_tree* tree)
static void static void
setGlueUpTo(struct sx_radix_node* node, void* udata) setGlueUpTo(struct sx_radix_node* node, void* udata)
{ {
unsigned refine=(unsigned)udata; unsigned refine=*(unsigned*)udata;
if(node && node->prefix.masklen <= refine) { if(node && node->prefix.masklen <= refine) {
node->isGlue=1; node->isGlue=1;
}; };
@@ -663,11 +663,11 @@ sx_radix_node_refine(struct sx_radix_node* node, unsigned refine)
node->aggregateLow=node->prefix.masklen; node->aggregateLow=node->prefix.masklen;
node->aggregateHi=refine; node->aggregateHi=refine;
if(node->l) { if(node->l) {
sx_radix_node_foreach(node->l, setGlueUpTo, (void*)refine); sx_radix_node_foreach(node->l, setGlueUpTo, &refine);
sx_radix_node_refine(node->l, refine); sx_radix_node_refine(node->l, refine);
}; };
if(node->r) { if(node->r) {
sx_radix_node_foreach(node->r, setGlueUpTo, (void*)refine); sx_radix_node_foreach(node->r, setGlueUpTo, &refine);
sx_radix_node_refine(node->r, refine); sx_radix_node_refine(node->r, refine);
}; };
} else if(!node->isGlue && node->prefix.masklen==refine) { } else if(!node->isGlue && node->prefix.masklen==refine) {