Bugfix for routing table breaking bug.
Here is a patch fixing a bug that causes breakage of a local routingtable during shutdown of Bird. The problem was caused by shutdownof 'device' protocol before shutdown of 'kernel' protocol. When'device' protocol went down, the route (with local network prefix)...
Previous change was mistake.
*BSD port added. (Tested on FreeBSD and NetBSD)
Include "lib/string.h" instead of <string.h>. It should give us bzero()and other non-portable functions on all systems.
Cleaned up debugging in kernel syncer. Netlink has still LOCAL_DEBUGturned on, but after some testing I'll gag it.
Kernel route syncer supports multiple tables.
The changes are just too extensive for lazy me to list themthere, 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. :)
Removed TOS support. This simplifies many things a lot.
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...
Argh, the fix was wrong.
Fixed processing of !krt_capable() routes. Converted device route decisionsto the krt_capable mechanism as well.
KRT: Implemented asynchronous route / interface state notifications(via Netlink). Tweaked kernel synchronization rules a bit. Discoveredlocking bug in kernel Netlink :-)
Future plans: Hunt all the bugs and solve all the FIXME's.
Rewrote the kernel syncer. The old layering was horrible.
The new kernel syncer is cleanly split between generic UNIX moduleand OS dependent submodules:
- krt.c (the generic part) - krt-iface (low-level functions for interface handling) - krt-scan (low-level functions for routing table scanning)...
When shutting down, remove all routes (except for RTS_INHERIT and RTS_DEVICEroutes) from kernel routing tables unless the "persist" switch is set.
Moved sanity check of protocol state during annoucements to rte_announce.
Synced kernel interface to new interface.
die() -> bug() where appropriate.
Hopefully finished kernel syncer (krt) rewrite:
o Interface syncing is now a part of krt and it can have configurable parameters. Actually, the only one is scan rate now :) o Kernel routing table syncing is now synchronized with interface syncing (we need the most recent version of the interface list...
Rewritten kernel syncer. Now uses the rta trickery I've introduced yesterdayand does things "the right way". Few things are still missing (deviceroutes etc.), I'll add them later in the evening.
Basic kernel routing table syncing implemented. Learning of routes installedby other programs or the kernel itself is not supported yet, but it's notneeded for development of other protocols.
Since almost every UNIX system requires different techniques for readingthe kernel routing table as opposed to modifying it which is approximatelythe same on non-netlink systems, I've split the kernel routing tableroutines to read and write parts. To be implemented later ;-)