Build: switch on -Wextra, get rid of most of the warnings
There are several unresolved -Wmissing-field-initializers on olderversions of GCC than 5.1, all of them false positive.
Kernel socket missing err_hook fix
Thanks to Tim Weippert for bugreport.
KRT: Add krt_scope attribute
Add a new route attribute, krt_scope, to expose the Linux kernel routescope. Constants from /etc/iproute2/rt_scopes (prefixed by "ips_") areexpected to be used with the attribute. Both import and export aresupported.
Also, the patch fixes device route export to the kernel, by setting link...
KRT: Add kernel metric protocol option
Kernel routes with different metrics do not clash with each other,therefore using dedicated metric value is a reliable way to avoidoverwriting routes from other sources (e.g. kernel device routes).
Although kernel route metric could already be set as a route attribute by...
KRT: Support for IPv6 ECMP
Linux represents IPv6 ECMP routes as a sequence of unipath routes withthe same prefix. We have to translate between our representation (oneroute with multipath next hop) and the Linux representation in bothdirections.
Proper learning of alien IPv6 ECMP routes still not supported....
Netlink: Fix build with older headers missing IFA_FLAGS
Netlink: Ignore tentative addresses
Ignore tentative IPv6 addresses and wait until finish of DuplicateAddress Detection (We got notification when an address is no longertentative) to avoid problems when protocols try to use interfaceswith tentative link-local addresses....
netlink: update struct msghdr
The netlink code assumes an order for the members of struct msghdr.This breaks recvmsg and sendmsg with musl libc on mips64. Fix this byusing designated initializers instead.
Signed-off-by: Stijn Tintel <email@example.com>
KRT: Fix route learn scan when route changed
When a kernel route changed, function krt_learn_scan() noticed that andreplaced the route in internal kernel FIB, but after that, functionkrt_learn_prune() failed to propagate the new route to the nest, because...
Netlink: attribute validation before parsing
Wanted netlink attributes are defined in a table, specifyingtheir size and neediness. Removing the long conditions that did thevalidation before.
Also parsing IPv4 and IPv6 versions regardless on the IPV6 macro.
Nest: Fix bug in device proto
If an interface address notification is received during device protocolshutdown/restart, BIRD crashed.
Thanks to Wei Huang for the bugreport.
Fix compiling with --enable-debug option
Netlink: Allow more than 256 routing tables.
Since 2.6.19, the netlink API defines RTA_TABLE routing attribute toallow 32-bit routing table IDs. Using this attribute to index routingtables at Linux, instead of 8-bit rtm_table field.
Netlink: Fixes uninitialized variable
Thanks to Pavel Tvrdik for the bugfix
KRT: Fixes some minor bugs in kernel protocol
unsigned [int] -> uint
Fix in the last commit
KRT: Add support for plenty of kernel route metrics
Linux kernel route metrics (RTA_METRICS netlink route attribute) arerepresented 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,...
Understand IFF_MULTICAST flag on ifaces in Linux
Unfortunately, some interfaces support multicast but do not havethis flag set, so we use it only as a positive hint.
Thanks to Clint Armstrong for noticing the problem.
Use AF_UNSPEC for RTM_GETLINK
This value is specified in documentation.
Implements token bucket filter for rate limiting.
IPv4/IPv6 integrated socket code.
Fixes longstanding issue with interfaces staying in IF_TMP_DOWN.
Thanks to Pierluigi Rolando and others for the bugreport.
Merge branch 'master' into add-path
Removes workaround related to import of kernel device routes.
Thanks to Benjamin Cama for notification.
filter/filter.c nest/proto.c nest/rt-table.c proto/bgp/bgp.h proto/bgp/config.Y
Fixes missing unregister of kernel table handling code.
And some minor fixes.
Thanks to Sergey Popovich for the patch.
Makes krt.c much more readable.
Fixes problems with routing table scans on some platforms.
Negative bit shifts are definitely undefined oprations.
Implements ADD-PATH extension for BGP.
Allows to send and receive multiple routes for one network by one BGPsession. Also contains necessary core changes to support this (routingtables accepting several routes for one network from one protocol).It needs some more cleanup before merging to the master branch.
Some minor fixes.
Cleanup in sysdep KRT code, part 4.
Adding some files that was accidentally removed(instead of moved) in cleanup part 2.