From 011bb969490b09a15a4033697873574af4b6d5ff Mon Sep 17 00:00:00 2001 From: Nikolay Aleksandrov Date: Wed, 22 Mar 2023 11:16:09 +0200 Subject: [PATCH] linux_defaults: add default rt protocol to use for fib rules and routes Define a default rt protocol (unix.RTPROT_KERNEL at the moment) that will be used for our fib rules and routes. Signed-off-by: Nikolay Aleksandrov --- pkg/datapath/linux/linux_defaults/linux_defaults.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/datapath/linux/linux_defaults/linux_defaults.go b/pkg/datapath/linux/linux_defaults/linux_defaults.go index f97de6f192b47..1258fc3f7c8b8 100644 --- a/pkg/datapath/linux/linux_defaults/linux_defaults.go +++ b/pkg/datapath/linux/linux_defaults/linux_defaults.go @@ -5,6 +5,8 @@ package linux_defaults import ( "time" + + "golang.org/x/sys/unix" ) // Linux specific constants used in Linux datapath @@ -64,6 +66,9 @@ const ( // IPSecProtocolID IP protocol ID for IPSec defined in RFC4303 RouteProtocolIPSec = 50 + // RTProto is the default protocol we install our fib rules and routes with + RTProto = unix.RTPROT_KERNEL + // RulePriorityWireguard is the priority of the rule used for routing packets to Wireguard device for encryption RulePriorityWireguard = 1