aboutsummaryrefslogtreecommitdiff
path: root/src/config.rs
diff options
context:
space:
mode:
authorHristo Venev <hristo@venev.name>2020-02-04 23:52:59 +0100
committerHristo Venev <hristo@venev.name>2020-02-04 23:52:59 +0100
commitca4eddd56712a5b7984395601b63dd79e7a8abd6 (patch)
tree1d37d54a6cc8ade714c6a246b6ea952dc5ffec1c /src/config.rs
parent3744b8d130788f8b56d8eb6763586e89eb9a0647 (diff)
Add source.allow_road_warriors option.
Diffstat (limited to 'src/config.rs')
-rw-r--r--src/config.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/config.rs b/src/config.rs
index 3eb0dd4..a1dff3e 100644
--- a/src/config.rs
+++ b/src/config.rs
@@ -17,6 +17,8 @@ pub struct Source {
pub ipv6: Ipv6Set,
#[serde(default)]
pub required: bool,
+ #[serde(default = "default_allow_road_warriors")]
+ pub allow_road_warriors: bool,
}
#[derive(serde_derive::Deserialize)]
@@ -133,6 +135,11 @@ impl From<ConfigRepr> for Config {
}
#[inline]
+const fn default_allow_road_warriors() -> bool {
+ true
+}
+
+#[inline]
const fn default_min_keepalive() -> u32 {
10
}