]> git.ipfire.org Git - thirdparty/bird.git/log
thirdparty/bird.git
21 months agoMerge commit 'de70474fed139f9acb4ed3f8e925d12de4edcdd0' into thread-next
Maria Matejka [Tue, 31 Oct 2023 08:58:42 +0000 (09:58 +0100)] 
Merge commit 'de70474fed139f9acb4ed3f8e925d12de4edcdd0' into thread-next

21 months agoFilter: adding explicit route type
Maria Matejka [Sun, 29 Oct 2023 18:53:09 +0000 (19:53 +0100)] 
Filter: adding explicit route type

This is a split-commit of the neighboring aggregator branch
with a bit improved lvalue handling, to have easier merge into v3.

21 months agoRenamed nest/rt.h back to nest/route.h
Maria Matejka [Sun, 29 Oct 2023 15:25:01 +0000 (16:25 +0100)] 
Renamed nest/rt.h back to nest/route.h

Some [redacted] (yes, myself) had a really bad idea
to rename nest/route.h to nest/rt.h while refactoring
some data structures out of it.

This led to unnecessarily complex problems with
merging updates from v2. Reverting this change
to make my life a bit easier.

At least it needed only one find-sed command:

    find -name '*.[chlY]' -type f -exec sed -i 's#nest/rt.h#nest/route.h#' '{}' +

21 months agoMerge commit '0a729b50' into thread-next
Maria Matejka [Sun, 29 Oct 2023 14:42:46 +0000 (15:42 +0100)] 
Merge commit '0a729b50' into thread-next

This merge was particularly difficult. I finally resorted to delete the
symbol scope active flag altogether and replace its usage by other
means.

Also I had to update custom route attribute registration to fit
both the scope updates in v2 and the data model in v3.

21 months agoMerge commit 'bb8e2824' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:56:06 +0000 (00:56 +0200)] 
Merge commit 'bb8e2824' into thread-next

21 months agoMerge commit '9ffea830' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:51:34 +0000 (00:51 +0200)] 
Merge commit '9ffea830' into thread-next

21 months agoMerge commit 'a3dc2645' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:50:38 +0000 (00:50 +0200)] 
Merge commit 'a3dc2645' into thread-next

21 months agoMerge commit 'cc1099a0' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:14:52 +0000 (00:14 +0200)] 
Merge commit 'cc1099a0' into thread-next

Updated f_implicit_roa_check() to use type methods and moved to filter/f-util.c

21 months agoMerge commit 'c0231b09' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:02:04 +0000 (00:02 +0200)] 
Merge commit 'c0231b09' into thread-next

21 months agoMerge commit 'fdd39c81' into thread-next
Maria Matejka [Sat, 28 Oct 2023 22:00:07 +0000 (00:00 +0200)] 
Merge commit 'fdd39c81' into thread-next

21 months agoMerge commit 'fc9d471b' into thread-next
Maria Matejka [Sat, 28 Oct 2023 21:42:21 +0000 (23:42 +0200)] 
Merge commit 'fc9d471b' into thread-next

Conflicts:
conf/cf-lex.l
conf/conf.h
filter/config.Y
filter/data.c
filter/data.h

21 months agoMerge commit '6b95353e' into thread-next
Maria Matejka [Fri, 27 Oct 2023 16:30:37 +0000 (18:30 +0200)] 
Merge commit '6b95353e' into thread-next

21 months agoMerge commit '51f2e7af' into thread-next
Maria Matejka [Fri, 27 Oct 2023 16:29:31 +0000 (18:29 +0200)] 
Merge commit '51f2e7af' into thread-next

Conflicts:
conf/cf-lex.l
conf/conf.h
conf/confbase.Y
filter/config.Y
nest/config.Y
nest/proto.c
nest/rt-table.c
proto/bgp/bgp.c
sysdep/unix/main.c

21 months agoMerge commit '5951dfbd' into thread-next
Maria Matejka [Fri, 27 Oct 2023 13:56:06 +0000 (15:56 +0200)] 
Merge commit '5951dfbd' into thread-next

21 months agoMerge commit '58efa944' into thread-next
Maria Matejka [Wed, 25 Oct 2023 12:41:11 +0000 (14:41 +0200)] 
Merge commit '58efa944' into thread-next

Conflicts:
conf/cf-lex.l
conf/conf.h
conf/confbase.Y
conf/gen_keywords.m4
conf/gen_parser.m4
filter/config.Y
nest/config.Y
proto/bgp/config.Y
proto/static/config.Y

Keywords and attributes are split to separate namespaces, to avoid
collisions between regular keyword use and attribute overlay.

21 months agoMerge commit 'a5a6de58' into thread-next
Maria Matejka [Tue, 24 Oct 2023 08:39:52 +0000 (10:39 +0200)] 
Merge commit 'a5a6de58' into thread-next

Conflicts:
      filter/config.Y
      filter/data.h
      filter/data.c

21 months agoMerge commit '86598183' into thread-next
Maria Matejka [Tue, 24 Oct 2023 07:34:43 +0000 (09:34 +0200)] 
Merge commit '86598183' into thread-next

21 months agoMerge commit 'aa70e14c' into thread-next
Maria Matejka [Tue, 24 Oct 2023 07:34:06 +0000 (09:34 +0200)] 
Merge commit 'aa70e14c' into thread-next

21 months agoMerge commit 'f5140d10' into thread-next
Maria Matejka [Fri, 13 Oct 2023 13:18:07 +0000 (15:18 +0200)] 
Merge commit 'f5140d10' into thread-next

Smashed as "ours" as local changes are completely incompatible.
Relevant fixes will be merged from later commits if possible.

21 months agoMerge commit 'cce48c6c' into thread-next
Maria Matejka [Fri, 13 Oct 2023 12:02:21 +0000 (14:02 +0200)] 
Merge commit 'cce48c6c' into thread-next

21 months agoMerge commit '32427c9c' into thread-next
Maria Matejka [Fri, 13 Oct 2023 11:49:09 +0000 (13:49 +0200)] 
Merge commit '32427c9c' into thread-next

21 months agoMerge commit 'f411a19b' into thread-next
Maria Matejka [Fri, 13 Oct 2023 11:46:04 +0000 (13:46 +0200)] 
Merge commit 'f411a19b' into thread-next

21 months agoCI: Temporarily disabling test-ibgp-loop-big as it tends to hang
Maria Matejka [Fri, 13 Oct 2023 11:38:15 +0000 (13:38 +0200)] 
CI: Temporarily disabling test-ibgp-loop-big as it tends to hang

21 months agoMerge commit '0dbcc927' into thread-next
Maria Matejka [Fri, 13 Oct 2023 11:36:47 +0000 (13:36 +0200)] 
Merge commit '0dbcc927' into thread-next

21 months agoMerge commit 'fc354788' into thread-next
Maria Matejka [Fri, 13 Oct 2023 09:32:53 +0000 (11:32 +0200)] 
Merge commit 'fc354788' into thread-next

21 months agoRIP: actually remove the interface structures on shutdown
Maria Matejka [Fri, 13 Oct 2023 09:23:21 +0000 (11:23 +0200)] 
RIP: actually remove the interface structures on shutdown

This avoids a spurious route update fail when protocol shutdown collides
with an incoming RIP packet.

21 months agoMerge commit 'e3c0eca9' into thread-next
Maria Matejka [Fri, 13 Oct 2023 09:04:39 +0000 (11:04 +0200)] 
Merge commit 'e3c0eca9' into thread-next

21 months agoProtocol: better granularity of pool management
Maria Matejka [Fri, 13 Oct 2023 08:22:09 +0000 (10:22 +0200)] 
Protocol: better granularity of pool management

There are now 3 different pools with specific lifetime. All of these are
available since protocol start, anyway they get freed in different
moments.

First, pool_up gets freed immediately after announcing PS_STOP, to e.g.
stop all timers and events regularly updating the routing table when the
imports are already flushing.

Then, pool_inloop gets freed just before the protocol loop is finally
stopped, after all channels, imports and exports and other hooks are
cleaned up.

And finally, the pool itself is freed the last. Unless you explicitly
need the early free, use this pool.

21 months agoMerge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next
Maria Matejka [Thu, 12 Oct 2023 12:12:33 +0000 (14:12 +0200)] 
Merge commit '5121101136cb80151a9361c63dc4822afeb44eef' into thread-next

21 months agoChannel: using a separate pool for export data
Maria Matejka [Thu, 12 Oct 2023 08:07:57 +0000 (10:07 +0200)] 
Channel: using a separate pool for export data

21 months agoMerge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD
Maria Matejka [Thu, 12 Oct 2023 09:38:16 +0000 (11:38 +0200)] 
Merge commit 'e2f08c382a2adbbbd94c5cd7d996ce9175e0fb9c' into HEAD

21 months agoMerge commit '4972590e' into thread-next
Maria Matejka [Thu, 12 Oct 2023 07:29:51 +0000 (09:29 +0200)] 
Merge commit '4972590e' into thread-next

21 months agoBGP/BMP: fixed build with no bmp at all
Maria Matejka [Thu, 12 Oct 2023 08:57:55 +0000 (10:57 +0200)] 
BGP/BMP: fixed build with no bmp at all

21 months agoBGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)
Maria Matejka [Thu, 12 Oct 2023 07:29:09 +0000 (09:29 +0200)] 
BGP: dropped bgp_fix_attr_flags() (useless remnant from previous versions)

21 months agoMerge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:26:41 +0000 (22:26 +0200)] 
Merge commit 'b20b6a9ad204f2648ed3d62720435bb21dfb947c' into thread-next

21 months agoBGP/BMP: Moved temporary allocation checks to the freeing functions
Maria Matejka [Wed, 11 Oct 2023 20:23:34 +0000 (22:23 +0200)] 
BGP/BMP: Moved temporary allocation checks to the freeing functions

21 months agoMerge branch 'mq-bmp-to-merge-to-v3' into thread-next
Maria Matejka [Wed, 11 Oct 2023 20:06:18 +0000 (22:06 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into thread-next

21 months agoMerge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next
Maria Matejka [Wed, 11 Oct 2023 12:16:39 +0000 (14:16 +0200)] 
Merge commit '2d988f71a5c3caf3b56426a45d4d234c4fd4fce7' into thread-next

21 months agoMerge commit '6e908775' into thread-next
Maria Matejka [Wed, 11 Oct 2023 11:28:30 +0000 (13:28 +0200)] 
Merge commit '6e908775' into thread-next

21 months agoMerge branch 'mq-bmp-to-merge-to-v3' into HEAD
Maria Matejka [Tue, 10 Oct 2023 13:04:26 +0000 (15:04 +0200)] 
Merge branch 'mq-bmp-to-merge-to-v3' into HEAD

21 months agoNest: Use generic rte_announce() also for import tables
Ondrej Zajicek [Mon, 21 Aug 2023 02:17:21 +0000 (04:17 +0200)] 
Nest: Use generic rte_announce() also for import tables

Remove special rte_announce_in(), so we can use generic rte_announce()
for bot feed and notifications.

21 months agoConf: Improve handling of keywords
Ondrej Zajicek [Thu, 27 Apr 2023 16:20:49 +0000 (18:20 +0200)] 
Conf: Improve handling of keywords

For whatever reason, parser allocated a symbol for every parsed keyword
in each scope. That wasted time and memory. The effect is worsened with
recent changes allowing local scopes, so keywords often promote soft
scopes (with no symbols) to real scopes.

Do not allocate a symbol for a keyword. Take care of keywords that could
be promoted to symbols (kw_sym) and do it explicitly.

21 months agoConf: Fix symbol lookup
Ondrej Zajicek [Thu, 27 Apr 2023 15:09:00 +0000 (17:09 +0200)] 
Conf: Fix symbol lookup

The symbol table used just symbol name as a key, and used a trick with
active flag to find symbols in active scopes with one hash table lookup.

The disadvantage is that it can degenerate to O(n) for negative queries
in situations where are many symbols with the same name in different
scopes.

Thanks to Yanko Kaneti for the bugreport.

22 months agoChannel: Refeeding by an auxiliary request if needed.
Maria Matejka [Fri, 29 Sep 2023 14:24:50 +0000 (16:24 +0200)] 
Channel: Refeeding by an auxiliary request if needed.

If the protocol supports route refresh on export, we keep the stop-start
method of route refeed. This applies for BGP with ERR or with export
table on, for OSPF, Babel, RIP or Pipe.

For BGP without ERR or for future selective ROA reloads, we're adding an
auxiliary export request, doing the refeed while the main export request
is running, somehow resembling the original method of BIRD 2 refeed.

There is also a refeed request queue to keep track of different refeed
requests.

22 months agoBabel: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:47:25 +0000 (16:47 +0200)] 
Babel: Properly handle route refeed

22 months agoRIP: Properly handle route refeed
Maria Matejka [Wed, 27 Sep 2023 14:29:44 +0000 (16:29 +0200)] 
RIP: Properly handle route refeed

22 months agoBabel: Remove interfaces on shutdown
Maria Matejka [Mon, 25 Sep 2023 07:31:18 +0000 (09:31 +0200)] 
Babel: Remove interfaces on shutdown

This avoids calling interface timer between Babel going
PS_DOWN and finally cleaning up the resource pool.

22 months agoKernel: refeed routes and delete them from kernel before actual shutdown
Maria Matejka [Sun, 24 Sep 2023 20:20:27 +0000 (22:20 +0200)] 
Kernel: refeed routes and delete them from kernel before actual shutdown

22 months agoProtocols have now assigned startup phases
Maria Matejka [Sun, 24 Sep 2023 21:22:43 +0000 (23:22 +0200)] 
Protocols have now assigned startup phases

For now, there are 4 phases: Necessary (device), Connector (kernel, pipe), Generator (static, rpki) and Regular.
Started and reconfigured are from Necessary to Regular, shutdown backwards.

This way, kernel can flush routes before actually being shutdown.

22 months agoIface: trace log messages cleanup
Maria Matejka [Sun, 24 Sep 2023 20:20:01 +0000 (22:20 +0200)] 
Iface: trace log messages cleanup

22 months agoTable: Added some journal and export tracing
Maria Matejka [Sun, 24 Sep 2023 10:15:26 +0000 (12:15 +0200)] 
Table: Added some journal and export tracing

22 months agoTable: Fixed feed race condition
Maria Matejka [Sun, 24 Sep 2023 09:47:24 +0000 (11:47 +0200)] 
Table: Fixed feed race condition

The problem happened like this:

1. Single route for the given net in table
2. A feed is started
3. The route is deleted (from another thread)
4. The feed finds an empty net, exports nothing, ignores journal (here is bug)
5. The route is added
6. The export transitions from FEEDING to READY
7. While processing the journal, the route deletion and addition combines into noop.

This way routes mysteriously disappeared in specific cases of link instability.

Problem fixed by explicitly marking the empty-net journal entries as processed in step 4.

22 months agoExport: More strict export state checking on change
Maria Matejka [Tue, 15 Aug 2023 10:31:28 +0000 (12:31 +0200)] 
Export: More strict export state checking on change

22 months agoProperly consted routes inside table
Maria Matejka [Mon, 3 Jul 2023 18:38:24 +0000 (20:38 +0200)] 
Properly consted routes inside table

22 months agoFilter iterator accepts lines instead of filter
Maria Matejka [Sun, 2 Jul 2023 13:10:39 +0000 (15:10 +0200)] 
Filter iterator accepts lines instead of filter

22 months agoRenamed channel class pointers
Vojtech Vilimek [Thu, 14 Sep 2023 13:21:53 +0000 (15:21 +0200)] 
Renamed channel class pointers

The channel class pointers were strangely named , not .

22 months agoLogging: fixed size logfiles behaving as mmapped ringbuffers
Maria Matejka [Thu, 24 Aug 2023 15:00:54 +0000 (17:00 +0200)] 
Logging: fixed size logfiles behaving as mmapped ringbuffers

This variant of logging avoids calling write() for every log line,
allowing for waitless logging. This makes heavy logging less heavy
and more useful for race condition debugging.

22 months agoLogging limit enforcement moved into the rfile structure
Maria Matejka [Thu, 24 Aug 2023 13:38:44 +0000 (15:38 +0200)] 
Logging limit enforcement moved into the rfile structure

22 months agoLogging now doesn't lock with each message
Maria Matejka [Mon, 21 Aug 2023 16:44:10 +0000 (18:44 +0200)] 
Logging now doesn't lock with each message

The original logging routines were locking a common mutex. This led to
massive underperformance and unwanted serialization when heavily logging
due to lock contention. Now the logging is lockless, though still
serializing on write() syscalls to the same filedescriptor.

This change also brings in a persistent logging channel structures and
thus avoids writing into active configuration data structures during
regular run.

22 months agoThreads: added a generic method to run in all threads
Maria Matejka [Mon, 21 Aug 2023 18:56:19 +0000 (20:56 +0200)] 
Threads: added a generic method to run in all threads

22 months agoLogging: Abolished stdio in favor of write() to make the logging faster.
Maria Matejka [Wed, 16 Aug 2023 13:05:36 +0000 (15:05 +0200)] 
Logging: Abolished stdio in favor of write() to make the logging faster.

22 months agoSimple testing of reconfiguration to a slightly different one
Maria Matejka [Fri, 23 Jun 2023 07:05:48 +0000 (09:05 +0200)] 
Simple testing of reconfiguration to a slightly different one

22 months agoBGP: Setting and unsetting unknown attributes kk-bgp-unknown-attributes
katerina.kubecova [Tue, 19 Sep 2023 09:11:24 +0000 (11:11 +0200)] 
BGP: Setting and unsetting unknown attributes

All these must be declared as bytestring. Allows operators to delete
unwanted attributes breaking the Internet:

    https://blog.benjojo.co.uk/post/bgp-path-attributes-grave-error-handling

22 months agoAttributes declared in config can be bytestrings
katerina.kubecova [Mon, 18 Sep 2023 12:07:59 +0000 (14:07 +0200)] 
Attributes declared in config can be bytestrings

22 months agoFilter: Function unset() accepts attributes declared in config
katerina.kubecova [Wed, 20 Sep 2023 07:50:22 +0000 (09:50 +0200)] 
Filter: Function unset() accepts attributes declared in config

22 months agoStructures bytestring and adata merged into adata.
katerina.kubecova [Mon, 18 Sep 2023 12:43:58 +0000 (14:43 +0200)] 
Structures bytestring and adata merged into adata.

22 months agoConf: Move definition of struct keyword to conf.h
Ondrej Zajicek [Thu, 14 Sep 2023 15:24:09 +0000 (17:24 +0200)] 
Conf: Move definition of struct keyword to conf.h

22 months agoCLI: Dropping the mechanism of echoing log messages
Maria Matejka [Tue, 15 Aug 2023 15:05:58 +0000 (17:05 +0200)] 
CLI: Dropping the mechanism of echoing log messages

This is better done by running tail -f on a logfile.

22 months agoBGP: When debug { routes } is set, updates considered as loop are logged
Maria Matejka [Thu, 14 Sep 2023 12:44:35 +0000 (14:44 +0200)] 
BGP: When debug { routes } is set, updates considered as loop are logged

22 months agoEnhanced tracing of route refresh state
Maria Matejka [Thu, 14 Sep 2023 12:40:33 +0000 (14:40 +0200)] 
Enhanced tracing of route refresh state

22 months agoFilter: Use common initializer for undefined variables and eattrs. mq-func-types
Ondrej Zajicek [Wed, 13 Sep 2023 04:21:26 +0000 (06:21 +0200)] 
Filter: Use common initializer for undefined variables and eattrs.

Undefined paths and clists should use typed f_val with empty adata
instead of just void f_val. Use common initializer to handle both
variables and eattrs.

22 months agoFilter: Minor updates to methods
Ondrej Zajicek [Tue, 12 Sep 2023 16:44:20 +0000 (18:44 +0200)] 
Filter: Minor updates to methods

Remove warning when function-like syntax is used for calling
add/remove/... methods.

Fix argument offset in error messages for function-like syntax.

22 months agoFilter: Split clist add/delete operations to multiple methods
Ondrej Zajicek [Tue, 25 Jul 2023 17:33:51 +0000 (19:33 +0200)] 
Filter: Split clist add/delete operations to multiple methods

22 months agoFilter: Implement constant promotion for multiple dispatch methods
Ondrej Zajicek [Tue, 25 Jul 2023 15:43:52 +0000 (17:43 +0200)] 
Filter: Implement constant promotion for multiple dispatch methods

22 months agoFilter: Print proper error response in multiple method dispatch
Ondrej Zajicek [Wed, 12 Jul 2023 18:11:34 +0000 (20:11 +0200)] 
Filter: Print proper error response in multiple method dispatch

When no matching method is found, print an error response containing
position and type of infringing argument and a set of expected types.

22 months agoFilter: Move argument list reversal from function_call to var_list
Ondrej Zajicek [Wed, 12 Jul 2023 18:01:03 +0000 (20:01 +0200)] 
Filter: Move argument list reversal from function_call to var_list

List of arguments for function calls is constructed in reverse and then
reverted. This was done in function_call grammar rule. Do the reverse
directly in var_list grammar rule. This fixes reverse order of arguments
in method calls.

22 months agoFilter: Implement multiple dispatch for methods
Ondrej Zajicek [Mon, 3 Jul 2023 15:00:58 +0000 (17:00 +0200)] 
Filter: Implement multiple dispatch for methods

 - Extend method descriptors with type signature
 - Daisy chain method descriptors for the same symbol
 - Dispatch methods for same symbol based on type signature
 - Split add/delete/filter operations to multiple methods
 - Replace ad-hoc dispatch of old-style syntax with scope-based dispatch
 - Also change method->arg_num to count initial arg

It still needs some improvements, like better handling of untyped
expressions and better error reporting when no dispatch can be done.

The multiple dispatch could also be extended to dispatch regular
function-like expressions in a uniform way.

22 months agoFilter: Better syntax for function return types
Ondrej Zajicek [Tue, 4 Jul 2023 17:07:30 +0000 (19:07 +0200)] 
Filter: Better syntax for function return types

The C-style syntax does not really fit into rest of our syntax.

22 months agoFilter: Make f_method_call_*() usage symmetric
Ondrej Zajicek [Tue, 27 Jun 2023 23:21:23 +0000 (01:21 +0200)] 
Filter: Make f_method_call_*() usage symmetric

22 months agoFilter: Convert more methods to use METHOD_R()
Ondrej Zajicek [Tue, 27 Jun 2023 19:38:05 +0000 (21:38 +0200)] 
Filter: Convert more methods to use METHOD_R()

22 months agoFilter: Remove number of args from METHOD_R()
Ondrej Zajicek [Tue, 27 Jun 2023 19:16:11 +0000 (21:16 +0200)] 
Filter: Remove number of args from METHOD_R()

Macro METHOD_R() is used for simplest methods, there is no place to
define argument types, so let's force it to be 0.

22 months agoConf: Remove toksym from symbol_known
Ondrej Zajicek [Tue, 27 Jun 2023 12:49:28 +0000 (14:49 +0200)] 
Conf: Remove toksym from symbol_known

No need to have toksym in symbol_known, as defined symbols are preferred
(by scope) to keywords anyway. Adding it just creates grammar conflicts.

22 months agoFilter: Print instructions take only one value (simplification)
Maria Matejka [Mon, 19 Jun 2023 15:24:30 +0000 (17:24 +0200)] 
Filter: Print instructions take only one value (simplification)

22 months agoFilter: Shortened method declarations
Maria Matejka [Mon, 19 Jun 2023 13:49:51 +0000 (15:49 +0200)] 
Filter: Shortened method declarations

22 months agoFilter: The for loop uses the method system for type dispatch
Maria Matejka [Sun, 18 Jun 2023 20:50:45 +0000 (22:50 +0200)] 
Filter: The for loop uses the method system for type dispatch

22 months agoRemoving unused terminals from filter config
Maria Matejka [Sat, 17 Jun 2023 11:05:23 +0000 (13:05 +0200)] 
Removing unused terminals from filter config

22 months agoFilter: Methods rework
Maria Matejka [Fri, 16 Jun 2023 15:35:37 +0000 (17:35 +0200)] 
Filter: Methods rework

Methods can now be called as x.m(y), as long as x can have its type
inferred in config time. If used as a command, it modifies the object,
if used as a value, it keeps the original object intact.

Also functions add(x,y), delete(x,y), filter(x,y) and prepend(x,y) now
spit a warning and are considered deprecated.

It's also possible to call a method on a constant, see filter/test.conf
for examples like bgp_path = +empty+.prepend(1).

Inside instruction definitions (filter/f-inst.c), a METHOD_CONSTRUCTOR()
call is added, which registers the instruction as a method for the type
of its first argument. Each type has its own method symbol table and
filter parser switches between them based on the inferred type of the
object calling the method.

Also FI_CLIST_(ADD|DELETE|FILTER) instructions have been split to allow
for this method dispatch. With type inference, it's now possible.

22 months agoUninitialized filter variables of path/[el]?clist types are now explicitly empty
Maria Matejka [Sat, 17 Jun 2023 08:16:28 +0000 (10:16 +0200)] 
Uninitialized filter variables of path/[el]?clist types are now explicitly empty

22 months agoConf: config warnings show the file position
Maria Matejka [Fri, 16 Jun 2023 20:11:03 +0000 (22:11 +0200)] 
Conf: config warnings show the file position

22 months agoFilter: functions can and should have typed return values
Maria Matejka [Thu, 15 Jun 2023 11:25:40 +0000 (13:25 +0200)] 
Filter: functions can and should have typed return values

22 months agoFilter/Conf: Method names have their own keyword hash
Maria Matejka [Tue, 13 Jun 2023 07:39:29 +0000 (09:39 +0200)] 
Filter/Conf: Method names have their own keyword hash

To allow for future dynamic method definition, parsing method names is
done via a dedicated keyword hash/scope.

22 months agoConf: Allowing conf scope to be explicitly read only
Maria Matejka [Tue, 13 Jun 2023 09:09:41 +0000 (11:09 +0200)] 
Conf: Allowing conf scope to be explicitly read only

22 months agoConf: Symbol manipulation gets its context explicitly
Maria Matejka [Tue, 13 Jun 2023 08:51:03 +0000 (10:51 +0200)] 
Conf: Symbol manipulation gets its context explicitly

22 months agoFilter: any lvalue can get its methods called
Maria Matejka [Mon, 12 Jun 2023 09:37:50 +0000 (11:37 +0200)] 
Filter: any lvalue can get its methods called

22 months agoFilter: split out dot-notation methods to separate targets
Maria Matejka [Mon, 12 Jun 2023 09:20:49 +0000 (11:20 +0200)] 
Filter: split out dot-notation methods to separate targets

This is just a preparationary refactoring to allow type-based method
tables.

22 months agoConf: Keywords have their default symbols
Maria Matejka [Fri, 9 Jun 2023 10:49:19 +0000 (12:49 +0200)] 
Conf: Keywords have their default symbols

This avoids unnecessary collapsed soft scopes caused by keyword symbol multiallocation.

22 months agoConf: Symbol hashes for all scopes
Maria Matejka [Mon, 2 May 2022 18:29:03 +0000 (20:29 +0200)] 
Conf: Symbol hashes for all scopes

This is a backport cherry-pick of commits
  165156beeb2926472bbceca3c103aacc3f81a8cc
  cce974e8ea992d0e6d2f649eca7880b436d91d71

from the v3.0 branch as we need symbol hashes directly inside their
scopes for more general usage than before.

22 months agoDropping empty-type const f_vals, they were copied anyway
Maria Matejka [Fri, 9 Jun 2023 09:02:05 +0000 (11:02 +0200)] 
Dropping empty-type const f_vals, they were copied anyway

22 months agoConf: Adding dummy thread-number setting for easier sharing of configuration between...
Maria Matejka [Fri, 9 Jun 2023 11:49:17 +0000 (13:49 +0200)] 
Conf: Adding dummy thread-number setting for easier sharing of configuration between v2 and v3

23 months agoBFD: Improve handling of AdminDown
Ondrej Zajicek [Tue, 29 Aug 2023 16:23:29 +0000 (18:23 +0200)] 
BFD: Improve handling of AdminDown

According to RFC 5882, system should not interpret the local or remote
session state transition to AdminDown as failure. We followed that for
the local session state but not for the remote session state (which
just triggered a transition of the local state to Down). The patch
fixes that.

We do not properly generate AdminDown on our side, so the patch is
relevant just for interoperability with other systems.

Thanks to Sunnat Samadov for the bugreport.