1
0
mirror of https://gitlab.labs.nic.cz/labs/bird.git synced 2024-05-11 16:54:54 +00:00

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.
This commit is contained in:
Pavel Šorejs
2023-10-06 04:31:19 +02:00
committed by Ondrej Zajicek
parent 57aa077227
commit e83beb70bd
5 changed files with 28 additions and 10 deletions

View File

@@ -1598,7 +1598,7 @@ nl_parse_route(struct nl_parse_state *s, struct nlmsghdr *h)
case RTPROT_KERNEL:
krt_src = KRT_SRC_KERNEL;
return;
break;
case RTPROT_BIRD:
if (!s->scan)