Nest: Maintain separate IPv4, IPv6 and LLv6 preferred addresses
Also redesign preferred address selection and update protocols to useappropriate preferred address.
Based on a previous work by Jan Maria Matejka.
Implement onlink flag for nexthops
Add proper support for per-nexthop onlink flag in routes to handle nexthop addresses that are not covered by interface IP ranges. Supported bykernel and static protocols.
Thanks to Vincent Bernat for the idea.
Minor cleanups and fixes
Linpool: default allocation size
Adding also our copy of struct rtvia.
Include local lwtunnel.h unless found in system
Netlink: Change default kernel metric to 32
This avoids collisions with non-BIRD routes in kernel tables.
Netlink: Better handling of an error case
Netlink: Fix device route delete
Netlink: Fix bug in RTA_PRIORITY handling
Merge branch 'int-new' into nexthop-merged
Several minor fixes
Merge branch 'master' into int-new
Netlink: MPLS routes in kernel
Anyway, Bird is now capable to insert both MPLS routes and MPLS encaproutes into kernel.
It was (among others) needed to define platform-specific AF_MPLS to 28as this constant has been assigned in the linux kernel.
No support for BSD now, it may be added in the future.
Removing (struct rta)->cast. Never used.
Merged multipath and single-path data structures.
Dropped struct mpnh and mpnh_*()Now struct nexthop exists, nexthop_*(), and also included struct nexthopinto struct rta.
Also converted RTD_DEVICE and RTD_ROUTER to RTD_UNICAST. If it is neededto distinguish between these two cases, RTD_DEVICE is equivalent to...
Netlink: fix occasional netlink hangs on busy machines
Merge tag 'v1.6.2' into int-new
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....
Merge remote-tracking branch 'origin/master' into int-new
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 <firstname.lastname@example.org>
Merge branch 'int-new' into int-new-merged
Portability: Fixed C extension error generated by CLang.
sysdep/linux/netlink.c:921:10: error: fields must have a constant size:'variable length array in structure' extension will never be supported char buf[128 + KRT_METRICS_MAX*8 + nh_bufsize(a->nexthops)];...
Build system reworked to one global Makefile with includes and no nesting
Also removed the lib-dir merging with sysdep. Updated #include'saccordingly.
Fixed make doc on recent Debian together with moving generated doc intoobjdir.
Moved Makefile.in into root dir...
Merge branch 'master' into int-new-channels
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...
Channels - explicit links between protocols and tables
The patch adds support for channels, structures connecting protocols andtables and handling most interactions between them. The documentation ismissing yet.
Explicit ip4_addr / ip6_addr printf support
Netlink: Removed forgotten if-stub (caused strange errors)
Follow-up work on integration
Contains some patches from Jan Moskyto Matejka
KRT: Integration of IPv4/IPv6 in sysdep/linux
Removed BITS_PER_IP_ADDRESS, MAX_PREFIX_LENGTH, BIRD_AF
Explicit setting of AF_INET(6|) in IP socket creation. BFD set to listenon v6, without setting the V6ONLY flag to catch both v4 and v6 traffic.
Squashing and minor changes by Ondrej Santiago Zajicek
Netlink and BSD: Integrating IPv4 and IPv6
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.
Initial commit on integrated BIRD
New data types net_addr and variants (in lib/net.h) describingnetwork addresses (prefix/pxlen). Modifications of FIB structuresto handle these data types and changing everything to use thesedata types instead of prefix/pxlen pairs where possible....
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.