[RFC PATCH 05/20] show symbols: don't show typed symbols

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- nest/cmds.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nest/cmds.c b/nest/cmds.c index da4015cf..9653675c 100644 --- a/nest/cmds.c +++ b/nest/cmds.c @@ -58,6 +58,9 @@ cmd_show_symbols(struct sym_show_data *sd) if (sd->type && (sym->class != sd->type)) continue; +

[RFC PATCH 00/20] Context typed filters

2019-12-30 Thread Asbjørn Sloth Tønnesen
This RFC patch series is a first stab, at adding some syntactic sugar making it more plessant to implement non-trivial dual-stack configurations, like https://bgpfilterguide.nlnog.net/ I'm not completely happy with the naming at this stage, but I want to get this series out before 36C3 ends. Look

[RFC PATCH 03/20] add new symbol flags for typed symbols

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- conf/conf.h | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/conf/conf.h b/conf/conf.h index 6029fee2..39015e62 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -156,7 +156,11 @@ struct sym_scope { #define SYM_VAL(s) ((s)->val->val) /* Symbol flags */ -#define SYM_FLAG

[RFC PATCH 15/20] adapt protocol filters

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- nest/config.Y | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/nest/config.Y b/nest/config.Y index bd1157c6..04808c00 100644 --- a/nest/config.Y +++ b/nest/config.Y @@ -262,8 +262,12 @@ proto_channel: channel_start channel_opt_list channel_end; rtable: CF_SYM_KNOWN

[RFC PATCH 19/20] add typed test config

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/test.conf | 41 + 1 file changed, 41 insertions(+) diff --git a/filter/test.conf b/filter/test.conf index d0941e11..cbc4e90d 100644 --- a/filter/test.conf +++ b/filter/test.conf @@ -1403,3 +1403,44 @@ protocol static ipv6 { import where f

[RFC PATCH 06/20] add initial FI_TYPED_CONSTANT instruction

2019-12-30 Thread Asbjørn Sloth Tønnesen
This instruction will eventually be replaced by FI_CONSTANT. --- filter/f-inst.c | 9 + 1 file changed, 9 insertions(+) diff --git a/filter/f-inst.c b/filter/f-inst.c index 51a35350..37fa0f39 100644 --- a/filter/f-inst.c +++ b/filter/f-inst.c @@ -438,6 +438,15 @@ RESULT_VAL(fstk->vst

[RFC PATCH 16/20] adapt sh route filters

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- nest/route.h | 1 + nest/rt-show.c | 9 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/nest/route.h b/nest/route.h index eaaa5c3f..74cb55f4 100644 --- a/nest/route.h +++ b/nest/route.h @@ -344,6 +344,7 @@ struct rt_show_data { struct fib_iterator fit;

[RFC PATCH 04/20] add support for defining typed symbols

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- conf/cf-lex.l | 74 + conf/conf.h | 37 - conf/confbase.Y | 1 - 3 files changed, 93 insertions(+), 19 deletions(-) diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 1d6cae2c..9b7df0b2 100644 --- a/conf/cf-lex.l +++

[RFC PATCH 01/20] add NET_ANY

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- lib/net.c | 1 + lib/net.h | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/net.c b/lib/net.c index 976ddbcc..2440506e 100644 --- a/lib/net.c +++ b/lib/net.c @@ -6,6 +6,7 @@ const char * const net_label[] = { + [NET_ANY]= "any", [NET_IP4]= "ipv4", [NET_IP6]= "i

[RFC PATCH 20/20] add typed documentation

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- doc/bird.sgml | 10 ++ 1 file changed, 10 insertions(+) diff --git a/doc/bird.sgml b/doc/bird.sgml index 8548c9c6..b9e5c45d 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1229,6 +1229,16 @@ bird> show route filter { if 127.0.0.5 ˜ net then accept; } bird> +Constants, functio

[RFC PATCH 02/20] make symbol types maskable

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- conf/conf.h | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/conf/conf.h b/conf/conf.h index 21dc3fa1..6029fee2 100644 --- a/conf/conf.h +++ b/conf/conf.h @@ -138,18 +138,20 @@ struct sym_scope { /* Remember to update cf_symbol_class_name() */ #define SYM_

[RFC PATCH 08/20] add f_has_typed_symbols helper function

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/Makefile | 2 +- filter/adapt.c | 31 +++ filter/decl.m4 | 44 filter/f-inst.c | 9 + filter/filter.h | 3 +++ 5 files changed, 80 insertions(+), 9 deletions(-) create mode 100644 filter/adapt.c diff

[RFC PATCH 11/20] check if functions need to be adapted

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/adapt.c | 7 +++ filter/config.Y | 1 + filter/filter.h | 1 + 3 files changed, 9 insertions(+) diff --git a/filter/adapt.c b/filter/adapt.c index b1223169..cb43177d 100644 --- a/filter/adapt.c +++ b/filter/adapt.c @@ -29,3 +29,10 @@ filter_tree_has_typed_symbols(const struct f_tr

[RFC PATCH 07/20] add generic pseudo filter check function

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/filter.c | 9 +++-- filter/filter.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index e505d570..b8147662 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -413,6 +413,12 @@ f_eval_buf(const struct f_line *expr, struct l

[RFC PATCH 13/20] use FI_TYPED_CONSTANT for typed constants

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/config.Y | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/filter/config.Y b/filter/config.Y index caca0d2b..a7d1dd9b 100644 --- a/filter/config.Y +++ b/filter/config.Y @@ -881,8 +881,11 @@ symbol_value: CF_SYM_KNOWN { switch ($1->class) { case SY

[RFC PATCH 17/20] adapt mrt filters

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- proto/mrt/mrt.c | 17 +++-- proto/mrt/mrt.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/proto/mrt/mrt.c b/proto/mrt/mrt.c index 7a396a84..bc20e5c6 100644 --- a/proto/mrt/mrt.c +++ b/proto/mrt/mrt.c @@ -483,6 +483,8 @@ mrt_rib_table_dump(struct mrt_table

[RFC PATCH 18/20] allow typed definitions

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- conf/confbase.Y | 5 + filter/config.Y | 18 +++--- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/conf/confbase.Y b/conf/confbase.Y index eda5b9c1..ca8ec19a 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -150,6 +150,11 @@ definition: if (f_eval(f

[RFC PATCH 09/20] use net_type when looking up symbols in SYM_FLAG_SAME check

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index b8147662..2e3ae8ba 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -461,7 +461,7 @@ filter_commit(struct config *new, struct config *old) WALK_LIST(sym, new-

[RFC PATCH 12/20] force consistent number of function arguments

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- conf/cf-lex.l | 1 + conf/conf.h | 1 + filter/adapt.c | 5 + filter/config.Y | 2 ++ 4 files changed, 9 insertions(+) diff --git a/conf/cf-lex.l b/conf/cf-lex.l index 9b7df0b2..ab984dca 100644 --- a/conf/cf-lex.l +++ b/conf/cf-lex.l @@ -677,6 +677,7 @@ cf_type_symbol(struct symbol

[RFC PATCH 14/20] adapt infrastructure

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/adapt.c | 107 filter/decl.m4 | 33 +++ filter/f-inst.c | 24 ++- filter/filter.h | 11 + 4 files changed, 173 insertions(+), 2 deletions(-) diff --git a/filter/adapt.c b/filter/adapt.c index 13c090da..763675

[RFC PATCH 10/20] show symbol flags in dump filter all

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- filter/filter.c | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/filter/filter.c b/filter/filter.c index 2e3ae8ba..3e9660f8 100644 --- a/filter/filter.c +++ b/filter/filter.c @@ -486,13 +486,17 @@ void filters_dump_all(void) WALK_LIST(sym, config->symbol

[PATCH] use net_*_match consistently

2019-12-30 Thread Asbjørn Sloth Tønnesen
--- lib/net.h | 9 + nest/rt-table.c | 2 +- proto/mrt/mrt.c | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/net.h b/lib/net.h index 0cd5f735..102cbfb0 100644 --- a/lib/net.h +++ b/lib/net.h @@ -38,6 +38,7 @@ #define NB_IP (NB_IP4 | NB_IP6) #d

Re: Bgu repport OSPF IPv6 Bird with wireguard

2019-12-30 Thread Ondrej Zajicek
On Sun, Dec 29, 2019 at 11:16:14PM -0400, alpha_one_x86 wrote: > Hi, > > OSPF IPv6 of bird is buggy over wireguard. > > Work over OpenVPN. > > Work OSPF IPv4. > > *Only in IPv6, the OSPF interface is not detected.* Hi It looks like the 'backup' interface does not have link-local address, whic