Skip to content

Commit c32c778

Browse files
committed
feat: add kernel scan-time parameter
Closes: #176
1 parent bedd46c commit c32c778

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pkg/config/config.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ type Kernel struct {
272272
Export bool `yaml:"export" description:"Export routes to kernel routing table" default:"true"`
273273
RejectConnected bool `yaml:"reject-connected" description:"Don't export connected routes (RTS_DEVICE) to kernel?'" default:"false"`
274274
Table int `yaml:"table" description:"Kernel table"`
275+
ScanTime int `yaml:"scan-time" description:"Time in seconds between scans of the kernel routing table" default:"10"`
275276

276277
SRDStandardCommunities []string `yaml:"-" description:"-"`
277278
SRDLargeCommunities []string `yaml:"-" description:"-"`

pkg/embed/templates/global.tmpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ protocol device {};
6363
protocol direct { ipv4; ipv6; }
6464

6565
protocol kernel {
66-
scan time 10;
66+
scan time {{ .Kernel.ScanTime }};
6767
{{ if .Kernel.Learn }}learn;{{ end }}
6868
{{ if .Kernel.Table }}kernel table {{ .Kernel.Table }};{{ end }}
6969
ipv4 {
@@ -105,7 +105,7 @@ protocol kernel {
105105
}
106106

107107
protocol kernel {
108-
scan time 10;
108+
scan time {{ .Kernel.ScanTime }};
109109
{{ if .Kernel.Learn }}learn;{{ end }}
110110
{{ if .Kernel.Table }}kernel table {{ .Kernel.Table }};{{ end }}
111111
ipv6 {

0 commit comments

Comments
 (0)