summaryrefslogtreecommitdiff
path: root/sysdep/unix/krt.c
AgeCommit message (Collapse)Author
2017-12-07Timers: Replace old timers with microsecond timersOndrej Zajicek (work)
The old timer interface is still kept, but implemented by new timers. The plan is to switch from the old inteface to the new interface, then clean it up.
2017-12-07Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addressesOndrej Zajicek (work)
Also redesign preferred address selection and update protocols to use appropriate preferred address. Based on a previous work by Jan Maria Matejka.
2017-05-16Linpool: default allocation sizeJan Moskyto Matejka
2017-04-29Minor fixesOndrej Zajicek (work)
2017-02-20Several minor fixesOndrej Zajicek (work)
2016-12-22Netlink: MPLS routes in kernelJan Moskyto Matejka
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-12-22Merged multipath and single-path data structures.Jan Moskyto Matejka
Dropped struct mpnh and mpnh_*() Now struct nexthop exists, nexthop_*(), and also included struct nexthop into struct rta. Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is needed to distinguish between these two cases, RTD_DEVICE is equivalent to IPA_ZERO(a->nh.gw), RTD_ROUTER is then IPA_NONZERO(a->nh.gw). From now on, we also explicitely want C99 compatible compiler. We assume that this 20-year norm should be known almost everywhere.
2016-11-08Merge branch 'master' into int-newOndrej Zajicek (work)
2016-11-08Merge tag 'v1.6.2' into int-newOndrej Zajicek (work)
2016-11-01Build: switch on -Wextra, get rid of most of the warningsJan Moskyto Matejka
There are several unresolved -Wmissing-field-initializers on older versions of GCC than 5.1, all of them false positive.
2016-09-15rt-table: Fix kernel protocol export filter memory bugPavel Tvrdik
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-05-10Merge branch 'int-new' into int-new-mergedJan Moskyto Matejka
2016-05-10Merge remote-tracking branch 'origin/rte-update' into int-newJan Moskyto Matejka
2016-05-10Build system reworked to one global Makefile with includes and no nestingJan Moskyto Matejka
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-04-08Route update: move table lookup from protocols into rte_update2().Jan Moskyto Matejka
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-08Merge branch 'master' into int-new-channelsJan Moskyto Matejka
2016-04-07Channelize: rt_notify arg conversion table -> channelJan Moskyto Matejka
2016-04-06KRT: Fix route learn scan when route changedOndrej Zajicek (work)
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-02-01Channels - explicit links between protocols and tablesOndrej Zajicek (work)
The patch adds support for channels, structures connecting protocols and tables and handling most interactions between them. The documentation is missing yet.
2015-12-21Modify FIB_WALK() and FIB_ITERATE() to work with new FIB codeOndrej Zajicek (work)
Returned user data pointers have offset relative to fib_node.
2015-12-21Follow-up work on integrationOndrej Zajicek (work)
Contains some patches from Jan Moskyto Matejka
2015-12-20KRT: Integration of IPv4/IPv6 in sysdep/linuxOndrej Zajicek (work)
2015-11-25Merge branch 'master' into int-newOndrej Zajicek (work)
2015-11-23Nest: Fix bug in device protoOndrej Zajicek (work)
If an interface address notification is received during device protocol shutdown/restart, BIRD crashed. Thanks to Wei Huang for the bugreport.
2015-11-11Netlink: Allow more than 256 routing tables.Jan Moskyto Matejka
Since 2.6.19, the netlink API defines RTA_TABLE routing attribute to allow 32-bit routing table IDs. Using this attribute to index routing tables at Linux, instead of 8-bit rtm_table field.
2015-11-05Initial commit on integrated BIRDOndrej Zajicek (work)
New data types net_addr and variants (in lib/net.h) describing network addresses (prefix/pxlen). Modifications of FIB structures to handle these data types and changing everything to use these data types instead of prefix/pxlen pairs where possible. The commit is WiP, some protocols are not yet updated (BGP, Kernel), and the code contains some temporary scaffolding. Comments are welcome.
2015-06-08BGP multipath supportOndrej Zajicek
Kernel option 'merge paths' allows to merge routes exported to kernel protocol (currently BGP and static routes) to multipath routes.
2015-06-08KRT: Fixes some minor bugs in kernel protocolOndrej Zajicek
2015-05-12KRT: Add support for plenty of kernel route metricsOndrej Zajicek
Linux kernel route metrics (RTA_METRICS netlink route attribute) are represented and accessible as new route attributes: krt_mtu, krt_window, krt_rtt, krt_rttvar, krt_sstresh, krt_cwnd, krt_advmss, krt_reordering, krt_hoplimit, krt_initcwnd, krt_rto_min, krt_initrwnd, krt_quickack, krt_lock_mtu, krt_lock_window, krt_lock_rtt, krt_lock_rttvar, krt_lock_sstresh, krt_lock_cwnd, krt_lock_advmss, krt_lock_reordering, krt_lock_hoplimit, krt_lock_rto_min, krt_feature_ecn, krt_feature_allfrag
2015-04-25KRT: Fixes route reloadOndrej Zajicek
Did not really worked
2015-04-25KRT: Fixes learning of preferred kernel routes.Ondrej Zajicek
When a new route was imported from kernel and chosen as preferred, then the old best route was propagated as a withdraw to the kernel protocol. Under some circumstances such withdraw propagated to the BSD kernel could remove the new alien route and thus reverting the import.
2015-03-29BGP: Enhanced route refresh (RFC 7313) supportOndrej Zajicek
Also hook feed_done is renamed to feed_end.
2015-02-21Store protocol config size inside protocol structureOndrej Zajicek
Make proto_config_new() use this info instead of supplied size. Thanks to Alexander V. Chernikov for the patch.
2015-02-21Replacing GNU old-style field designator extensionPavel Tvrdik
2014-10-02Implements token bucket filter for rate limiting.Ondrej Zajicek
2014-10-02Refresh kernel protocol when interface disappears.Ondrej Zajicek
When an interface goes down, (Linux) kernel removes routes pointing to that ifacem but does not send withdraws for them. We rescan the kernel table to ensure synchronization. Thanks to Alexander Demenshin for the bugreport.
2014-03-20BGP graceful restart support.Ondrej Zajicek
Also significant core protocol state changes needed for that, global graceful restart recovery state and kernel proto support for recovery.
2013-11-25Merge branch 'master' into add-pathOndrej Zajicek
2013-11-25Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.Ondrej Zajicek
Thanks to Alexander V. Chernikov for the original patch.
2013-11-23Merge branch 'master' into add-pathOndrej Zajicek
Conflicts: filter/filter.c nest/proto.c nest/rt-table.c proto/bgp/bgp.h proto/bgp/config.Y
2013-10-15Forces KRT rescan on syncer startup with multi syncer config.Ondrej Zajicek
Thanks to Sergey Popovich for the patch.
2013-09-10Fixes a bug in kernel extended attribute processing.Ondrej Zajicek
The bug caused that krt_prefsrc attribute was not processed when a route received from a kernel protocol was exported to another kernel protocol. Thanks to Sergey Popovich for a bugreport.
2013-07-04Makes krt.c much more readable.Ondrej Zajicek
2012-12-26Implements undo command and optional timeout for configurationOndrej Zajicek
Several new configure command variants: configure undo - undo last reconfiguration configure timeout - configure with scheduled undo if not confirmed in timeout configure confirm - confirm last configuration configure check - just parse and validate config file
2012-11-10Allows rejected routes to be kept and examined.Ondrej Zajicek
When 'import keep rejected' protocol option is activated, routes rejected by the import filter are kept in the routing table, but they are hidden and not propagated to other protocols. It is possible to examine them using 'show route rejected'.
2012-08-29Fixes a bug in primary IP selection.Ondrej Zajicek
2012-08-14Implements ADD-PATH extension for BGP.Ondrej Zajicek
Allows to send and receive multiple routes for one network by one BGP session. Also contains necessary core changes to support this (routing tables accepting several routes for one network from one protocol). It needs some more cleanup before merging to the master branch.
2012-05-03Fixes flushing of device routes.Ondrej Zajicek
2012-04-30Cleanup in sysdep KRT code, part 3.Ondrej Zajicek
Just one more renaming, old krt_set_notify() to krt_replace_rte().
2012-04-30Cleanup in sysdep KRT code, part 2.Ondrej Zajicek
Remove support for historic Linux kernels, merge krt-iface, krt-set and krt-scan stub headers.