chiark / gitweb /
config: ifnames in right sections
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 16:12:32 +0000 (17:12 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 7 Aug 2021 16:12:32 +0000 (17:12 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
docs/settings.rst
src/config.rs

index e4cef04d7341d0a4322116870cc9b42621ef6c84..1f4282bfe9084dafc8726b773c2ac80bec825924 100644 (file)
@@ -142,14 +142,6 @@ These are not looked up in the client-specific config sections.
   Must match exactly at each end - *this is not checked*.
   [``1500`` (bytes)]
 
-``ifname_server``
-  | Virtual interface name on the server.  [``shippo%d``]
-  | Any ``%d`` is interpolated (by the kernel).
-
-``ifname_client``
-  | Virtual interface name on the client.  [``hippo%d``]
-  | Any ``%d`` is interpolated (by the kernel).
-
   
 Ordinary settings, used by server only
 --------------------------------------
@@ -162,6 +154,10 @@ Ordinary settings, used by server only
   this period after the client leaves the first network.
   [``300`` (s)]
 
+``ifname_server``
+  | Virtual interface name on the server.  [``shippo%d``]
+  | Any ``%d`` is interpolated (by the kernel).
+
 
 Ordinary settings, used by client only
 --------------------------------------
@@ -194,3 +190,7 @@ Ordinary settings, used by client only
   end, space-separated.  Routes to those will be created on
   the client.  ``vrelay`` is included implicitly.
   [CIDR syntax, space separated; default: none]
+
+``ifname_client``
+  | Virtual interface name on the client.  [``hippo%d``]
+  | Any ``%d`` is interpolated (by the kernel).
index 16225b1a2314de093bfc42f424bca93bd9729f70..92fef75552a82d296e5b584b86f58c5b75fd2798 100644 (file)
@@ -27,11 +27,10 @@ pub struct InstanceConfig {
   pub vrelay:                       IpAddr,
   pub port:                         u16,
   pub mtu:                          u32,
-  pub ifname_server:                String,
-  pub ifname_client:                String,
 
   // Ordinary settings, used by server only:
   #[server]  pub max_clock_skew:               Duration,
+  #[server]  pub ifname_server:                String,
 
   // Ordinary settings, used by client only:
   #[client]  pub http_timeout_grace:           Duration,
@@ -41,6 +40,7 @@ pub struct InstanceConfig {
   #[client]  pub success_report_interval:      Duration,
   #[client]  pub url:                          Uri,
   #[client]  pub vroutes:                      Vec<IpNet>,
+  #[client]  pub ifname_client:                String,
 
   // Computed, rather than looked up.  Client only:
   #[computed]  pub effective_http_timeout:     Duration,