From 15b6c25c80c8044bd6a92983b65f1875add834ad Mon Sep 17 00:00:00 2001 From: Felix Huettner Date: Mon, 10 Mar 2025 14:40:33 +0100 Subject: [PATCH] rtnetlink: Add forward declaration of RTPROT_OVN. RTPROT_OVN has been merged to the net-next tree of the kernel just now [1]. Until it is available on all systems we need to forward declare it. As we are already on it we also add support for it in test-lib-route-table. [1]: https://web.git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=6002850fdfe0b4343136670a9895b6ba4ee3285b Signed-off-by: Felix Huettner Signed-off-by: Ilya Maximets --- tests/test-lib-route-table.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/test-lib-route-table.c b/tests/test-lib-route-table.c index 61d97e06f..4d4fbe0d3 100644 --- a/tests/test-lib-route-table.c +++ b/tests/test-lib-route-table.c @@ -27,6 +27,12 @@ #include "packets.h" #include "route-table.h" +/* The following definition should be available in Linux 6.15 and might be + * missing if we have older headers. */ +#ifndef RTPROT_OVN +#define RTPROT_OVN 84 +#endif + static char * rt_prot_name(unsigned char p) { @@ -39,6 +45,7 @@ rt_prot_name(unsigned char p) p == RTPROT_STATIC ? "RTPROT_STATIC" : p == RTPROT_RA ? "RTPROT_RA" : p == RTPROT_DHCP ? "RTPROT_DHCP" : + p == RTPROT_OVN ? "RTPROT_OVN" : p == RTPROT_BGP ? "RTPROT_BGP" : "UNKNOWN"; }