From e83beb70bd14923cece5b35411606ade6fb8fbee Mon Sep 17 00:00:00 2001 From: Pavel Ĺ orejs Date: Fri, 6 Oct 2023 04:31:19 +0200 Subject: 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. --- sysdep/unix/krt.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'sysdep/unix/krt.h') diff --git a/sysdep/unix/krt.h b/sysdep/unix/krt.h index 18a206e6..e25f0b12 100644 --- a/sysdep/unix/krt.h +++ b/sysdep/unix/krt.h @@ -27,6 +27,10 @@ struct kif_proto; #define KRT_REF_SEEN 0x1 /* Seen in table */ #define KRT_REF_BEST 0x2 /* Best in table */ +#define KRT_LEARN_NONE 0 /* Do not learn */ +#define KRT_LEARN_ALIEN 1 /* Learn KRT_SRC_ALIEN routes */ +#define KRT_LEARN_ALL 2 /* Learn both KRT_SRC_ALIEN and KRT_SRC_KERNEL routes */ + /* Whenever we recognize our own routes, we allow learing of foreign routes */ #ifdef CONFIG_SELF_CONSCIOUS -- cgit v1.2.3