bird/nest
Jan Maria Matejka e8bc64e308 Filter: make bgpmask literals real constructors
The bgpmask literals can include expressions. This is OK but they have
to be interpreted as soon as the code is run, not in the time the code
is used as value.

This led to strange behavior like rewriting bgpmasks when they shan't
be rewritten:

	function mask_generator(int as)
	{
		return [= * as * =];
	}

	function another()
	bgpmask m1;
	bgpmask m2;
	{
		m1 = mask_generator(10);
		m2 = mask_generator(20);
		if (m1 == m2) {
			print("strange"); # this would happen
		}
	}

Moreover, sending this to CLI would cause stack overflow and knock down the
whole BIRD, as soon as there is at least one route to execute the given
filter on.

	show route filter bgpmask mmm; bgppath ppp; { ppp = +empty+; mmm = [= (ppp ~ mmm) =]; print(mmm); accept; }

The magic match operator (~) inside the bgpmask literal would try to
resolve mmm, which points to the same bgpmask so it would resolve
itself, call the magic match operator and vice versa.

After this patch, the bgpmask literal will get resolved as soon as it's
assigned to mmm and it also will return a type error as bool is not
convertible to ASN in BIRD.
2018-03-14 11:34:29 +01:00
..
a-path.c Filter: make bgpmask literals real constructors 2018-03-14 11:34:29 +01:00
a-set.c BGP: Cluster list item should be prepended 2016-11-15 16:24:39 +01:00
attrs.h BGP: Cluster list item should be prepended 2016-11-15 16:24:39 +01:00
bfd.h Build: switch on -Wextra, get rid of most of the warnings 2016-11-01 14:52:54 +01:00
bird.h Converted shutdown to a kind of reconfiguration, it's no more handled 2000-01-16 17:40:26 +00:00
cli.c CLI: Fix bug in symbol handling introduced in previous patches 2017-05-31 14:11:40 +02:00
cli.h unsigned [int] -> uint 2015-06-08 02:24:08 +02:00
cmds.c Conf: Replace keyword and symbol hash table with generic hash table. 2017-05-25 23:30:39 +02:00
cmds.h Implements eval command and minor CLI cleanups. 2013-07-25 13:15:32 +02:00
config.Y Minor cleanups 2017-12-14 22:15:01 +01:00
Doc Documented sockets, events and timers. 2000-06-05 12:19:12 +00:00
iface.c Basic VRF support 2017-09-06 17:38:48 +02:00
iface.h Basic VRF support 2017-09-06 17:38:48 +02:00
locks.c Nest: VRF support for neighbor cache and olock code 2017-09-12 15:49:36 +02:00
locks.h Nest: VRF support for neighbor cache and olock code 2017-09-12 15:49:36 +02:00
Makefile Route Origin Authorization basics. 2012-03-18 17:32:30 +01:00
mrtdump.h NEWS, version and documentation update. 2010-01-06 16:57:20 +01:00
neighbor.c Nest: VRF support for neighbor cache and olock code 2017-09-12 15:49:36 +02:00
password.c RIP: Use message authentication interface 2016-11-02 17:53:22 +01:00
password.h RIP: Use message authentication interface 2016-11-02 17:53:22 +01:00
proto-hooks.c Prog Doc: Complete several missing parameters 2016-05-12 15:49:44 +02:00
proto.c BGP: Shutdown communication (RFC 8203) 2017-09-19 19:57:52 +02:00
proto.sgml Fixes for the programmer's manual. 2000-06-08 12:37:21 +00:00
protocol.h BGP: Shutdown communication (RFC 8203) 2017-09-19 19:57:52 +02:00
route.h RAdv: Support for more specific routes (RFC 4191) 2017-10-04 16:27:02 +02:00
rt-attr.c Build: switch on -Wextra, get rid of most of the warnings 2016-11-01 14:52:54 +01:00
rt-dev.c Direct: Implement check link for direct protocol 2016-04-08 15:11:21 +02:00
rt-dev.h Direct: Implement check link for direct protocol 2016-04-08 15:11:21 +02:00
rt-fib.c Docs: FIB iteration macros 2017-09-19 12:59:41 +02:00
rt-roa.c ROA: Fix reconfiguration 2018-01-03 14:12:00 +01:00
rt-table.c Filter: Allow silent filter execution 2018-01-16 16:20:01 +01:00