| Branch: | Revision:

iof-bird-daemon / sysdep / unix / krt.c @ 62e64905

History | View | Annotate | Download (27 KB)

# Date Author Comment
62e64905 02/20/2017 01:26 AM Ondrej Zajicek (work)

Several minor fixes

d14f8c3c 12/22/2016 08:38 PM Jan Moskyto Matejka

Netlink: MPLS routes in kernel

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.

4e276a89 12/22/2016 12:01 PM Jan Moskyto Matejka

Merged multipath and single-path data structures.

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...

8860e991 11/08/2016 06:27 PM Ondrej Zajicek (work)

Merge branch 'master' into int-new

cc5b93f7 11/08/2016 04:04 PM Ondrej Zajicek (work)

Merge tag 'v1.6.2' into int-new

3e236955 11/01/2016 01:52 PM Jan Moskyto Matejka

Build: switch on -Wextra, get rid of most of the warnings

There are several unresolved -Wmissing-field-initializers on older
versions of GCC than 5.1, all of them false positive.

a290da25 09/15/2016 01:57 PM Pavel Tvrdik

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,...

0c6dfe52 05/10/2016 12:30 PM Jan Moskyto Matejka

Merge branch 'int-new' into int-new-merged

92912f06 05/10/2016 12:21 PM Jan Moskyto Matejka

Merge remote-tracking branch 'origin/rte-update' into int-new

7152e5ef 05/10/2016 12:07 PM Jan Moskyto Matejka

Build system reworked to one global Makefile with includes and no nesting

Also removed the lib-dir merging with sysdep. Updated #include's

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

Moved into root dir...

2003a184 04/08/2016 11:09 AM Jan Moskyto Matejka

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.

7a7ac656 04/08/2016 10:28 AM Jan Moskyto Matejka

Merge branch 'master' into int-new-channels

4bdf1881 04/07/2016 08:08 AM Jan Moskyto Matejka

Channelize: rt_notify arg conversion table -> channel

e86cfd41 04/06/2016 09:46 AM Ondrej Zajicek (work)

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...

f4a60a9b 02/01/2016 09:28 AM Ondrej Zajicek (work)

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.

600998fc 12/21/2015 07:28 PM Ondrej Zajicek (work)

Modify FIB_WALK() and FIB_ITERATE() to work with new FIB code

Returned user data pointers have offset relative to fib_node.

0bf95f99 12/21/2015 04:17 PM Ondrej Zajicek (work)

Follow-up work on integration

Contains some patches from Jan Moskyto Matejka

29a64162 12/20/2015 03:58 PM Ondrej Zajicek (work)

KRT: Integration of IPv4/IPv6 in sysdep/linux

04ae8dda 11/25/2015 01:24 PM Ondrej Zajicek (work)

Merge branch 'master' into int-new

1e4891e4 11/23/2015 10:13 AM Ondrej Zajicek (work)

Nest: Fix bug in device proto

If an interface address notification is received during device protocol
shutdown/restart, BIRD crashed.

Thanks to Wei Huang for the bugreport.

9ddbfbdd 11/11/2015 10:40 AM Jan Moskyto Matejka

Netlink: Allow more than 256 routing tables.

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.

fe9f1a6d 11/05/2015 11:48 AM Ondrej Zajicek (work)

Initial commit on integrated BIRD

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....

8d9eef17 06/08/2015 12:24 AM Ondrej Zajicek

BGP multipath support

Kernel option 'merge paths' allows to merge routes exported to kernel
protocol (currently BGP and static routes) to multipath routes.

78a2cc28 06/08/2015 12:24 AM Ondrej Zajicek

KRT: Fixes some minor bugs in kernel protocol

9fdf9d29 05/12/2015 02:42 PM Ondrej Zajicek

KRT: Add support for plenty of kernel route metrics

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,...

7069fc9e 04/25/2015 07:41 PM Ondrej Zajicek

KRT: Fixes route reload

Did not really worked

c5ff44a7 04/25/2015 06:43 PM Ondrej Zajicek

KRT: Fixes learning of preferred kernel routes.

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...

9aed29e6 03/29/2015 04:29 PM Ondrej Zajicek

BGP: Enhanced route refresh (RFC 7313) support

Also hook feed_done is renamed to feed_end.

2bbc3083 02/21/2015 08:08 PM Ondrej Zajicek

Store protocol config size inside protocol structure

Make proto_config_new() use this info instead of supplied size.

Thanks to Alexander V. Chernikov for the patch.

4a591d4b 02/21/2015 06:31 PM Pavel Tvrdik

Replacing GNU old-style field designator extension

1123e707 10/02/2014 10:52 AM Ondrej Zajicek

Implements token bucket filter for rate limiting.

252c7e4d 10/02/2014 10:52 AM Ondrej Zajicek

Refresh kernel protocol when interface disappears.

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.

0c791f87 03/20/2014 01:07 PM Ondrej Zajicek

BGP graceful restart support.

Also significant core protocol state changes needed for that,
global graceful restart recovery state and kernel proto support
for recovery.

283c7dfa 11/25/2013 05:42 PM Ondrej Zajicek

Merge branch 'master' into add-path

e237b28a 11/25/2013 12:21 AM Ondrej Zajicek

Changes primary addr selection on BSD to respect SIOCGIFADDR ioctl() result.

Thanks to Alexander V. Chernikov for the original patch.

736e143f 11/23/2013 10:50 AM Ondrej Zajicek

Merge branch 'master' into add-path


f8cc7396 10/15/2013 08:57 AM Ondrej Zajicek

Forces KRT rescan on syncer startup with multi syncer config.

Thanks to Sergey Popovich for the patch.

2a0130f9 09/10/2013 11:01 AM Ondrej Zajicek

Fixes a bug in kernel extended attribute processing.

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.

c6964c30 07/04/2013 04:02 PM Ondrej Zajicek

Makes krt.c much more readable.

a92cf57d 12/26/2012 11:40 AM Ondrej Zajicek

Implements undo command and optional timeout for configuration

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...

cf98be7b 11/10/2012 01:26 PM Ondrej Zajicek

Allows rejected routes to be kept and examined.

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'.

0343d066 08/29/2012 10:42 AM Ondrej Zajicek

Fixes a bug in primary IP selection.

094d2bdb 08/14/2012 02:46 PM Ondrej Zajicek

Implements ADD-PATH extension for BGP.

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.

e14bd380 05/03/2012 12:04 PM Ondrej Zajicek

Fixes flushing of device routes.

7a2c48da 04/30/2012 08:34 PM Ondrej Zajicek

Cleanup in sysdep KRT code, part 3.

Just one more renaming, old krt_set_notify() to krt_replace_rte().

f1aceff5 04/30/2012 08:25 PM Ondrej Zajicek

Cleanup in sysdep KRT code, part 2.

Remove support for historic Linux kernels,
merge krt-iface, krt-set and krt-scan stub headers.

396dfa90 04/30/2012 01:31 PM Ondrej Zajicek

Cleanup in sysdep KRT code, part 1.

OS-dependent functions renamed to be more consistent,
prepared to merge krt-set and krt-scan headers.

Name changes:

struct krt_if_params -> struct kif_params
struct krt_if_status -> struct kif_status
struct krt_set/scan_params -> struct krt_params...

bf2abe2f 03/30/2012 09:04 AM Ondrej Zajicek

Merge branch 'soon'


c9df01d3 03/25/2012 05:44 PM Ondrej Zajicek

Fixes several minor bugs in kernel syncer.

9ba2798c 03/23/2012 04:22 PM Ondrej Zajicek

Adds krt_metric linux route attribute.

72aed1a0 03/22/2012 11:26 PM Ondrej Zajicek

Adds krt_source route attribute.

Thanks Jeremie Dimino for the original patch.

46c1a583 02/03/2012 10:50 AM Ondrej Zajicek

Fixes a bug causing crash during soft reconfiguration of export to kernel proto.

39c028e9 01/24/2012 10:31 AM Ondrej Zajicek

Assign default protocol preference via proto_config_new().

The patch from Alexander V. Chernikov.

09686693 01/23/2012 02:15 AM Ondrej Zajicek

Implements handling of BSD iface arrival/departure notifications.

Thanks to Alexander V. Chernikov for original patch.

a7f23f58 11/06/2011 11:31 PM Ondrej Zajicek

Implements protocol templates.

Based on the patch from Alexander V. Chernikov.
Extended to support almost all protocols.
Uses 'protocol bgp NAME from TEMPLATE { ... }' syntax.

71ca7716 04/13/2011 10:32 AM Ondrej Zajicek

Adds support for several Linux kernel route attributes.

f038f0a6 07/12/2010 07:39 PM Ondrej Zajicek

Fixes missing check in reconfiguration.

c429d4a4 04/04/2010 01:41 PM Ondrej Zajicek

Restrict export of device routes to the kernel protocol.

In usual configuration, such export is already restricted
with the aid of the direct protocol but there are some
races that can circumvent it. This makes it harder to
break kernel device routes. Also adds an option to...

53434e44 02/27/2010 03:00 PM Ondrej Zajicek

Better flushing of interfaces.

When device protocol goes down, interfaces should be flushed
asynchronously (in the same way like routes from protocols are flushed),
when protocol goes to DOWN/HUNGRY.

This fixes the problem with static routes staying in kernel routing...

ff2857b0 02/26/2010 09:55 AM Ondrej Zajicek

Many changes in (mainly) kernel syncers.

- BSD kernel syncer is now self-conscious and can learn alien routes
- important bugfix in BSD kernel syncer (crash after protocol restart)
- many minor changes and bugfixes in kernel syncers and neighbor cache
- direct protocol does not generate host and link local routes...

dca75fd7 02/13/2010 11:26 AM Ondrej Zajicek

Removes phantom protocol from the pipe design.

It seems that by adding one pipe-specific exception to route
announcement code and by adding one argument to rt_notify() callback i
could completely eliminate the need for the phantom protocol instance
and therefore make the code more straightforward. It will also fix some...

f98e2915 06/01/2009 12:07 PM Ondrej Zajicek

The pipe cleanup.

23ac9e9a 05/31/2009 01:24 PM Ondrej Zajicek

Changes pipes to transfer all routes between routing table, not just optimal routes.

874b8685 05/29/2009 08:49 PM Ondrej Zajicek

Implements primary address selection base on 'primary' option.

1bc4b2cc 05/04/2009 03:49 PM Ondrej Filip

Syntax error fix for systems without CONFIG_SELF_CONSCIOUS (KRT_ALLOW_LEARN)

3d574679 03/20/2009 11:58 AM Ondrej Zajicek

Fix bugs related to kernel table synchronization.

KRF_INSTALLED flag was not cleared during reconfiguration
that lead to not removing routes during reconfigure when
export rules changed.

We also should not try to remove routes we didi not installed,
on Linux this leads to warnings (as kernel checks route source...

cb530392 02/26/2009 01:23 PM Ondrej Zajicek

Rate limit for most abundant log messages

35f983f8 11/21/2008 05:17 PM Ondrej Zajicek

Fixes segfault with multiple routing tables.

1567edea 10/26/2008 10:09 PM Ondrej Zajicek

Bugfix for routing table breaking bug.

Here is a patch fixing a bug that causes breakage of a local routing
table during shutdown of Bird. The problem was caused by shutdown
of 'device' protocol before shutdown of 'kernel' protocol. When
'device' protocol went down, the route (with local network prefix)...

b7e9c74c 06/07/2004 04:51 PM Ondrej Filip

Used parameter can be marked as unused. :-) Thanx MJ.

19d9e303 06/07/2004 09:52 AM Ondrej Filip

Marked unused parameters as unused.

6578a604 06/05/2004 09:11 AM Martin Mares

Marked unused parameters in sysdep code as such.

c197d44e 08/13/2003 10:07 PM Martin Mares

This probably IS the memory leak we're looking for. Alien routes weren't
correctly disposed of.

7d875e09 11/13/2002 08:47 AM Martin Mares

Added missing includes.

725270cb 06/08/2000 12:37 PM Martin Mares

Fixes for the programmer's manual.

58f7d004 06/07/2000 01:25 PM Martin Mares

Fixes to the progdoc.

2e9b2421 06/07/2000 12:29 PM Martin Mares

Spelling fixes to progdoc.

73275d85 06/05/2000 12:49 PM Martin Mares

Documented all the sysdeps (only briefly, I admit).

Except for Filters, RIP and OSPF, the progdocs are complete.

f990fc61 05/16/2000 01:36 PM Martin Mares

When in persist mode, don't delete routes from kernel tables even if
they cease to exist in our routing tables due to protocols having shut down.

02bd064a 05/13/2000 11:02 AM Martin Mares

Adapted to new rt_notify semantics.

1151401e 05/08/2000 10:38 AM Martin Mares

Don't crash when reporting deleted routes.

Set preferences correctly.

93a786cb 05/04/2000 08:30 PM Martin Mares

Removed a lot of unused variables.

Please try compiling your code with --enable-warnings to see them. (The
unused parameter warnings are usually bogus, the unused variable ones
are very useful, but gcc is unable to control them separately.)

832fa033 03/12/2000 09:54 PM Martin Mares

Cleaned up debugging in kernel syncer. Netlink has still LOCAL_DEBUG
turned on, but after some testing I'll gag it.

b9626ec6 03/04/2000 10:21 PM Martin Mares

Garbage collector events and counters are now per table and one day
they can be made configurable if it turns out to be useful.

3ea1ba63 01/18/2000 11:01 AM Martin Mares

Killed protocol->priority. Protocol startup should be clean and hack-free now.
It seems everything still works (except for disable/enable/restart which hangs
sometimes, but it's another story).

aa8761de 01/18/2000 10:39 AM Martin Mares

Kernel route syncer now supports dynamic reconfiguration. Also it doesn't
depend on the startup counter hack now and uses a zero-time timer instead
to make itself scheduled after normal protocol startup.

d272fe22 01/17/2000 11:52 AM Martin Mares

Separated `official protocol names' used in status dumps from name templates
used for automatic generation of instance names.

protocol->name is the official name
protocol->template is the name template (usually "name%d"),
should be all lowercase.

Updated all protocols to define the templates, checked that their configuration...

f7fcb752 01/17/2000 11:17 AM Martin Mares

Reconfiguration for device protocol.

50fe90ed 01/16/2000 04:44 PM Martin Mares

First attempt on dynamic reconfiguration. There are still lots of bugs
and problems to solve, but the hardest part works.

0da472d7 12/08/1999 02:16 PM Martin Mares

Except for special protocols (nowadays only the kernel syncer), don't
export host and link scope routes.

7de45ba4 08/03/1999 07:33 PM Martin Mares

Kernel route syncer supports multiple tables.

The changes are just too extensive for lazy me to list them
there, but see the comment at the top of sysdep/unix/krt.c.
The code got a bit more ifdeffy than I'd like, though.

Also fixed a bunch of FIXME's and added a couple of others. :)

bb027be1 05/31/1999 06:55 PM Martin Mares

Added extra argument to rt_update hook which contains a pointer to the
temporary attribute list.

4f1a6d27 05/17/1999 08:16 PM Martin Mares

Kill remaining master_table relics in KRT code.

Make all protocols pass routing table to rte_update and rte_discard.

08e2d625 04/12/1999 06:01 PM Martin Mares

Removed TOS support. This simplifies many things a lot.

c10421d3 04/03/1999 01:05 PM Martin Mares

More changes to the kernel syncer.

o Now compatible with filtering.
o Learning of kernel routes supported only on CONFIG_SELF_CONSCIOUS
systems (on the others it's impossible to get it semantically correct).
o Learning now stores all of its routes in a separate fib and selects...

3f2a21fd 03/29/1999 08:14 PM Martin Mares

Don't try to delete interface routes on CONFIG_AUTO_ROUTES systems.

7e5f5ffd 03/26/1999 09:44 PM Martin Mares

Moved to a much more systematic way of configuring kernel protocols.

o  Nothing is configured automatically. You need to specify
the kernel syncer in config file in order to get it started.
o Syncing has been split to route syncer (protocol "Kernel") and...
111213f0 03/04/1999 07:00 PM Martin Mares

Fixed processing of !krt_capable() routes. Converted device route decisions
to the krt_capable mechanism as well.

e16155ae 03/04/1999 06:36 PM Martin Mares

KRT: Implemented asynchronous route / interface state notifications
(via Netlink). Tweaked kernel synchronization rules a bit. Discovered
locking bug in kernel Netlink :-)

Future plans: Hunt all the bugs and solve all the FIXME's.

53b7a298 03/03/1999 08:55 PM Martin Mares

Fix several things I broke today.