Commit graph

633 commits

Author SHA1 Message Date
Ondrej Zajicek (work) cc5b93f72d Merge tag 'v1.6.2' into int-new 2016-11-08 17:04:29 +01:00
Pavel Tvrdik a290da25a1 rt-table: Fix kernel protocol export filter memory bug
Kernel protocol calls rt_export_merged(), which used @rte_update_pool for
temporary allocations, supposing it is called from other functions from
rt-table.c that handles locking and flushing of the linpool. Therefore,
linpool was not flushed properly and memory leaked.

Add linpool argument to rt_export_merged() and use @krt_filter_lp when
called from kernel protocol.

Thanks to Justin Cattle and Alexander Frolkin for the bugreport.

(Commit squashed and updated by Ondrej Zajicek)
2016-09-15 15:57:51 +02:00
Ondrej Zajicek (work) 84cac51a51 Nest: Keep multipath next hops sorted 2016-09-14 11:53:54 +02:00
Pavel Tvrdik d107ef78df Whitespace fixes 2016-08-16 13:02:32 +02:00
Ondrej Zajicek (work) 12640c1499 Babel: Documentation updates
This updates the documentation to correctly mention Babel when protocols
are listed, and adds examples and route attribute documentation to the
Babel section of the docs.

Signed-off-by: Toke Høiland-Jørgensen <toke@toke.dk>
2016-07-19 12:16:51 +02:00
Ondrej Filip 6887f409f0 Prepare for longer interface names - clean up of the code. 2016-07-17 14:54:52 +02:00
Ondrej Filip a0fe1944d1 Add AS# ranges to bgpmask. 2016-06-08 16:22:44 +02:00
Jan Moskyto Matejka 5af7b59660 Merge branch 'int-new' of gitlab.labs.nic.cz:labs/bird into int-new 2016-05-13 13:48:04 +02:00
Jan Moskyto Matejka d39d41fbda Hash: Fix of previous commit 2016-05-13 13:46:46 +02:00
Ondrej Zajicek (work) 659f80f262 Make int-new compilable again 2016-05-12 21:47:29 +02:00
Ondrej Zajicek (work) 776d6b2c05 Merge remote-tracking branch 'origin/int-new' into int-new 2016-05-12 18:11:12 +02:00
Ondrej Zajicek (work) af678af0d5 Merge remote-tracking branch 'origin/master' into int-new 2016-05-12 18:03:23 +02:00
Jan Moskyto Matejka 54ac0becee Hash: fixed rta hashing wrt. structure padding 2016-05-12 16:16:25 +02:00
Ondrej Zajicek (work) 286e2011d2 Miscellaneous minor fixes 2016-05-12 16:04:47 +02:00
Pavel Tvrdik 8e433d6a52 Prog Doc: Complete several missing parameters 2016-05-12 15:49:44 +02:00
Jan Moskyto Matejka 0c6dfe5236 Merge branch 'int-new' into int-new-merged 2016-05-10 14:30:49 +02:00
Jan Moskyto Matejka 92912f063a Merge remote-tracking branch 'origin/rte-update' into int-new 2016-05-10 14:21:15 +02:00
Jan Moskyto Matejka 7152e5efbb Build system reworked to one global Makefile with includes and no nesting
Also removed the lib-dir merging with sysdep. Updated #include's
accordingly.

Fixed make doc on recent Debian together with moving generated doc into
objdir.

Moved Makefile.in into root dir

Retired all.o and birdlib.a
Linking the final binaries directly from all the .o files.
2016-05-10 14:07:34 +02:00
Ondrej Zajicek (work) 937e75d8f1 Add the Babel routing protocol (RFC 6126)
This patch implements the IPv6 subset of the Babel routing protocol.
Based on the patch from Toke Hoiland-Jorgensen, with some heavy
modifications and bugfixes.

Thanks to Toke Hoiland-Jorgensen for the original patch.
2016-04-28 18:01:40 +02:00
Ondrej Zajicek (work) e90dd656cc Direct: Implement check link for direct protocol
When enabled, direct protocol generates routes only if the underlying
link state is up.
2016-04-08 15:11:21 +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 7a7ac65682 Merge branch 'master' into int-new-channels 2016-04-08 12:28:33 +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
Ondrej Zajicek (work) 06edbb67ed Nest: Reset export route counter during graceful restart
Counter exp_routes is increased during initial route feed after GR
recovery, so it has to start with zero, otherwise BIRD will end with
double value in exp_routes.
2016-04-07 01:10:24 +02:00
Ondrej Zajicek (work) e86cfd41d9 KRT: Fix route learn scan when route changed
When a kernel route changed, function krt_learn_scan() noticed that and
replaced the route in internal kernel FIB, but after that, function
krt_learn_prune() failed to propagate the new route to the nest, because
it confused the new route with the (removed) old best route and decided
that the best route did not changed.

Wow, the original code (and the bug) is almost 17 years old.
2016-04-06 11:46:25 +02:00
Pavel Tvrdík 79a4f74a65 BGP: Add documentaion for extended messages 2016-03-17 18:40:54 +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
Ondrej Zajicek (work) 9c9cc35c02 Filter: Implement last_nonaggregated operator on bgp_path 2016-02-16 17:33:58 +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
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
Jan Moskyto Matejka 3f35816136 BSD: Explicitly dropping routes with mismatched AF's. 2016-01-21 14:55:33 +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 f9d729ab68 NET ROAx: add max_pxlen, fix format 2016-01-14 14:31:55 +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
Ondrej Zajicek (work) 74c838a870 Move ID allocator to a separate file and use it also in OSPF 2015-12-29 15:42:12 +01:00
Ondrej Zajicek (work) 04632fd77f Follow-up work on integration 2015-12-24 15:56:04 +01:00
Ondrej Zajicek (work) 600998fcb1 Modify FIB_WALK() and FIB_ITERATE() to work with new FIB code
Returned user data pointers have offset relative to fib_node.
2015-12-21 20:28:44 +01:00
Ondrej Zajicek (work) 0bf95f99e6 Follow-up work on integration
Contains some patches from Jan Moskyto Matejka
2015-12-21 17:17:21 +01:00
Ondrej Zajicek (work) 23c212e7f1 Follow-up work on integration 2015-12-21 03:33:18 +01:00
Ondrej Zajicek (work) 0f7d5b1a88 Nest: Reimplement fib_route() and add some consts 2015-12-20 18:16:48 +01:00
Jan Moskyto Matejka 7fd4143ead Integrated address print lengths
Minor changes by Ondrej Santiago Zajicek
2015-12-20 13:47:39 +01:00