From cd103bfdb9abdb85bc81a158032f0c3fd81712ff Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Sat, 7 Aug 2021 18:46:08 +0100 Subject: [PATCH] config: Apply per_client and global attrs Now everything has an attribute which implyies (well, ought to appply) an SKL setting. Signed-off-by: Ian Jackson --- src/config.rs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/config.rs b/src/config.rs index c45098f..557602e 100644 --- a/src/config.rs +++ b/src/config.rs @@ -11,7 +11,7 @@ use configparser::ini::Ini; // xxx ignores empty sections, fix or replace pub struct InstanceConfig { // Exceptional settings #[special(special_link, SKL::None)] pub link: LinkName, - pub secret: Secret, + #[per_client] pub secret: Secret, #[special(special_ipif, SKL::PerClient)] pub ipif: String, // Capped settings: @@ -20,17 +20,17 @@ pub struct InstanceConfig { #[limited] pub http_timeout: Duration, #[limited] pub target_requests_outstanding: u32, - // Ordinary settings: - pub addrs: Vec, - pub vnetwork: Vec, - pub vaddr: IpAddr, - pub vrelay: IpAddr, - pub port: u16, - pub mtu: u32, + // Ordinary settings, used by both, not client-specifi: + #[global] pub addrs: Vec, + #[global] pub vnetwork: Vec, + #[global] pub vaddr: IpAddr, + #[global] pub vrelay: IpAddr, + #[global] pub port: u16, + #[global] pub mtu: u32, // Ordinary settings, used by server only: - #[server] pub max_clock_skew: Duration, - #[server] pub ifname_server: String, + #[server] #[per_client] pub max_clock_skew: Duration, + #[server] #[global] pub ifname_server: String, // Ordinary settings, used by client only: #[client] pub http_timeout_grace: Duration, -- 2.30.2