0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2024-10-18 09:58:43 +00:00
Commit Graph

2747 Commits

Author SHA1 Message Date
Jan Moskyto Matejka
9667c798fc L3VPN: using FIB's internal allocator of MPLS labels 2016-04-25 10:41:04 +02:00
Jan Moskyto Matejka
6adf16ca1b FIB: Added label allocation option
Why is this inside FIB and not at some layer before? Simply only this
layer knows whether fib_get() just returns an existing record or inserts
a new one.
2016-04-25 10:39:18 +02:00
Jan Moskyto Matejka
160239d523 ID Map allows max and min limits 2016-04-25 10:35:08 +02:00
Jan Moskyto Matejka
d04042f376 L3VPN: updated rte_update2() to net_addr * 2016-04-08 13:18:49 +02:00
Jan Moskyto Matejka
7822a7763a Merge branch 'rte-update' into mpls-new 2016-04-08 13:15:45 +02:00
Jan Moskyto Matejka
2003a18407 Route update: move table lookup from protocols into rte_update2().
Many protocols do almost the same when creating a rte_update request
before calling rte_update2(). This commit should simplify the protocol
side of the route-creation routine.
2016-04-08 13:09:06 +02:00
Jan Moskyto Matejka
e1b7c6177a L3VPN: new protocol 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
ec11f99243 MPLS: RTA_ENCAP parsing in netlink interface 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
45f01fb32e Netlink: MPLS routes in kernel, not fully working yet.
TODO:
- fix static to detect MPLS stack changes on reload
- fix MPLS_ENCAP parsing on route scan

Anyway, Bird is now capable to insert both MPLS routes and MPLS encap
routes into kernel.

It was (among others) needed to define platform-specific AF_MPLS to 28
as this constant has been assigned in the linux kernel.

No support for BSD now, it may be added in the future.
2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
21d358f074 MPLS tables, static protocol MPLS support 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
59ab6f0fcc MPLS: added net_addr_mpls variant of net_addr 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
7da48a2fc9 MPLS: Allowing MPLS stack route attribute and setup in static protocol 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
9efb0380a1 Support of MPLS stack in static protocol and route tables 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
312a70e2ef VPN address parser fix, better display of invalid values 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
ac10ab7e19 VPN4 and VPN6 literals
From now on, protocol static accepts VPN4 and VPN6 addressess.
With some concerns about VPN6 Route Distinguishers, I finally chose
to have the same format as for VPN4 (where it is defined by RFC 4364).
2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
12f27657dc ROA: fixed max_text_lengths 2016-04-07 10:08:43 +02:00
Jan Moskyto Matejka
4bdf1881dc Channelize: rt_notify arg conversion table -> channel 2016-04-07 10:08:23 +02:00
Jan Moskyto Matejka
0c8c8151fc Merge branch 'int-new-channels' of gitlab.labs.nic.cz:labs/bird into int-new-channels 2016-04-07 09:58:31 +02:00
Pavel Tvrdík
1a7daab126 cf_error(char *msg, ...) -> cf_error(const char *msg, ...) 2016-03-10 16:07:44 +01:00
Pavel Tvrdík
43fd8fae52 nest/proto fix local_debug mode 2016-03-10 16:07:44 +01:00
Pavel Tvrdík
062d18fdb1 Fix typo 2016-03-10 16:07:44 +01:00
Jan Moskyto Matejka
a815d62d59 Hash: typecast error fix 2016-02-19 16:33:07 +01:00
Jan Moskyto Matejka
9a74622ca1 Updated RTA hashes to 32-bit values.
... and reworked the hashes a bit. Also added mem_hash function
which just computes a hash of given memory block.
2016-02-10 13:26:07 +01:00
Pavel Tvrdík
1bb3ecb2a5 Fix closing flushed channel
Fix reading from freed memory.
  Free at: channel_set_state(c, CS_DOWN)
  Read at: WALK_LIST2_DELSAFE(c, n, x, tab->channels, table_node)

==00:00:00:00.261 24718==
==00:00:09:31.755 24718== Invalid read of size 8
==00:00:09:31.755 24718==    at 0x4061BA: rt_prune_table (rt-table.c:1688)
==00:00:09:31.755 24718==    by 0x405D5E: rt_event (rt-table.c:1559)
==00:00:09:31.755 24718==    by 0x45D089: ev_run (event.c:85)
==00:00:09:31.755 24718==    by 0x45D158: ev_run_list (event.c:142)
==00:00:09:31.755 24718==    by 0x462814: io_loop (io.c:2412)
==00:00:09:31.755 24718==    by 0x468712: main (main.c:833)
==00:00:09:31.755 24718==  Address 0x5601538 is 136 bytes inside a block of size 304 free'd
==00:00:09:31.755 24718==    at 0x4C29D2A: free (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:09:31.755 24718==    by 0x46FF3E: rfree (resource.c:166)
==00:00:09:31.755 24718==    by 0x470309: mb_free (resource.c:415)
==00:00:09:31.755 24718==    by 0x406A6B: rt_unlock_table (rt-table.c:1921)
==00:00:09:31.755 24718==    by 0x40DAE3: channel_do_down (proto.c:297)
==00:00:09:31.755 24718==    by 0x40DD46: channel_set_state (proto.c:359)
==00:00:09:31.755 24718==    by 0x4061AD: rt_prune_table (rt-table.c:1692)
==00:00:09:31.755 24718==    by 0x405D5E: rt_event (rt-table.c:1559)
==00:00:09:31.755 24718==    by 0x45D089: ev_run (event.c:85)
==00:00:09:31.755 24718==    by 0x45D158: ev_run_list (event.c:142)
==00:00:09:31.755 24718==    by 0x462814: io_loop (io.c:2412)
==00:00:09:31.755 24718==    by 0x468712: main (main.c:833)
==00:00:09:31.755 24718==  Block was alloc'd at
==00:00:09:31.755 24718==    at 0x4C28C10: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==00:00:09:31.755 24718==    by 0x470FBC: bird_xmalloc (xmalloc.c:29)
==00:00:09:31.755 24718==    by 0x4701E6: mb_alloc (resource.c:339)
==00:00:09:31.755 24718==    by 0x406C29: rt_commit (rt-table.c:1977)
==00:00:09:31.755 24718==    by 0x45C36D: config_do_commit (conf.c:269)
==00:00:09:31.755 24718==    by 0x45C545: config_commit (conf.c:361)
==00:00:09:31.755 24718==    by 0x4686F9: main (main.c:822)
==00:00:09:31.755 24718==
2016-02-08 16:08:50 +01:00
Jan Moskyto Matejka
2a013bb3a0 Fixed sigsegv for missing proto->rt_notify hook
If rt_notify is NULL, the export must always stay DOWN.
2016-02-01 16:01:18 +01:00
Jan Moskyto Matejka
ade389b326 BSD: compilation error fix 2016-02-01 10:28:50 +01:00
Ondrej Zajicek (work)
f4a60a9bc4 Channels - explicit links between protocols and tables
The patch adds support for channels, structures connecting protocols and
tables and handling most interactions between them. The documentation is
missing yet.
2016-02-01 10:28:50 +01:00
Pavel Tvrdík
9f5782d969 Add 'GENERATE/ACCEPT FROM datetime TO datetime' to password options 2016-01-28 17:16:53 +01:00
Pavel Tvrdík
966ca6143b io.c: fix reads from uninitialized memory 2016-01-27 12:41:59 +01:00
Pavel Tvrdík
d82987d12e RIP: Fix DBG output 2016-01-27 12:41:32 +01:00
Jan Moskyto Matejka
74d9416763 RIPng: fixed misrejection of host routes 2016-01-25 10:29:06 +01:00
Jan Moskyto Matejka
2fad92144e BSD: fix no-return warning 2016-01-21 15:47:04 +01:00
Jan Moskyto Matejka
3f35816136 BSD: Explicitly dropping routes with mismatched AF's. 2016-01-21 14:55:33 +01:00
Jan Moskyto Matejka
0e965f6991 All the current pthread implementations are OK and working with us.
No more need to disable pthread for specific BSD's.
2016-01-21 14:55:33 +01:00
Pavel Tvrdík
7eb9e79648 Add condition for max_pxlen by ROA grammar 2016-01-21 10:37:08 +01:00
Pavel Tvrdík
a4caa1c0a3 Use net_addr pointer for net_addr_roaX
net_addr_roa6 is bigger than net_addr

Thanks to Ondrej Zajicek for notice
2016-01-21 10:37:08 +01:00
Pavel Tvrdík
259052199b Add forgotten semicolon 2016-01-20 16:46:58 +01:00
Pavel Tvrdík
650b418942 Delete old ROA code 2016-01-20 16:46:58 +01:00
Pavel Tvrdík
0264ccf6f4 Rewrite roa_check() for integrated BIRD
Thanks to Ondrej Zajicek for his support with writing this code.
2016-01-20 16:46:58 +01:00
Pavel Tvrdík
cb1bd816db Add ROA_* constants values to grammar of configuration
Add ROA_UNKNOWN, ROA_VALID and ROA_INVALID
2016-01-20 16:46:58 +01:00
Pavel Tvrdík
513ad0a85e Add ROA net_addr to grammar
Example:
  protocol static
  {
    route 10.110.0.0/16 max 16 as 1000 blackhole;
    route 10.120.0.0/16 max 24 as 1000 blackhole;
    route 10.130.0.0/16 max 24 as 2000 blackhole;
    route 10.130.128.0/18 max 24 as 3000 blackhole;
    ...
  }
2016-01-20 16:46:30 +01:00
Jan Moskyto Matejka
8109eb765f BSD integration fixes 2016-01-20 12:05:16 +01:00
Pavel Tvrdík
f9d729ab68 NET ROAx: add max_pxlen, fix format 2016-01-14 14:31:55 +01:00
Jan Moskyto Matejka
9a883adf95 Net address format: Do not print the -4 or -6 suffix in %I4 and %I6 2016-01-13 13:21:25 +01:00
Pavel Tvrdík
a820ae1074 NET ROAx more small changes
- Remove `u8 src` from net_add_roaX
- Add `u8 max_pxlen` to net_add_roaX
- Add some missing macro and functions for ROA
- Remove ASN from hash function for ROA

Thanks to Ondrej Santiago Zajicek
2016-01-12 11:41:10 +01:00
Pavel Tvrdík
93e807292c ROA change printf 'ASN: xxx' to 'ASxxx' 2016-01-12 11:40:50 +01:00
Jan Moskyto Matejka
6ffa8f5393 Hidden AF_INET* inside sysdep/ 2016-01-11 09:29:51 +01:00
Jan Moskyto Matejka
5b218c3d9b BFD: split of v4/v6 sockets 2016-01-11 09:29:51 +01:00
Pavel Tvrdík
b9f5692186 Fix check in net_route() in debug mode 2016-01-07 18:24:14 +01:00
Pavel Tvrdík
de9b87f558 Add NET ROA4/6 structures 2016-01-07 18:21:31 +01:00