From e83beb70bd14923cece5b35411606ade6fb8fbee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pavel=20=C5=A0orejs?= Date: Fri, 6 Oct 2023 04:31:19 +0200 Subject: [PATCH] KRT: Allow to learn routes with RTPROT_KERNEL The Kernel protocol, even with the option 'learn' enabled, ignores direct routes created by the OS kernel (on Linux these are routes with rtm_protocol == RTPROT_KERNEL). Implement optional behavior where both OS kernel and third-party routes are learned, it can be enabled by 'learn all' option. Minor changes by committer. --- doc/bird.sgml | 11 ++++++----- sysdep/linux/netlink.c | 2 +- sysdep/unix/krt.Y | 8 +++++++- sysdep/unix/krt.c | 13 ++++++++++--- sysdep/unix/krt.h | 4 ++++ 5 files changed, 28 insertions(+), 10 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index 5e795450..d5bc8d57 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -3764,9 +3764,8 @@ on the Note that routes created by OS kernel itself, namely direct routes -representing IP subnets of associated interfaces, are not imported even with - to -generate these direct routes. +representing IP subnets of associated interfaces, are imported only with +If your OS supports only a single routing table, you can configure only one instance of the Kernel protocol. If it supports multiple tables (in order to @@ -3797,10 +3796,12 @@ channels. Time in seconds between two consecutive scans of the kernel routing table. -