You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add --ipvx-route-metric option for ha network (#629)
* Add `--ipvx-route-metric` option for ha network
Signed-off-by: David Rapan <david@rapan.cz>
* Extend NetworkArg to support Int
Signed-off-by: David Rapan <david@rapan.cz>
* Check IsInt first..
Signed-off-by: David Rapan <david@rapan.cz>
* Rewrite as switch to appease go-critic
Signed-off-by: David Rapan <david@rapan.cz>
---------
Signed-off-by: David Rapan <david@rapan.cz>
Copy file name to clipboardExpand all lines: cmd/network_update.go
+12-2Lines changed: 12 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -77,13 +77,15 @@ func init() {
77
77
networkUpdateCmd.Flags().String("ipv4-gateway", "", "The IPv4 gateway the interface should use")
78
78
networkUpdateCmd.Flags().String("ipv4-method", "", "Method on IPv4: static|auto|disabled")
79
79
networkUpdateCmd.Flags().StringArray("ipv4-nameserver", []string{}, "IPv4 address of upstream DNS servers. Use multiple times for multiple servers.")
80
+
networkUpdateCmd.Flags().Int("ipv4-route-metric", -1, "IPv4 route metric. Lower value has higher priority.")
80
81
81
82
networkUpdateCmd.Flags().StringArray("ipv6-address", []string{}, "IPv6 address for the interface in CIDR notation (e.g. 2001:db8:85a3::8a2e:370:7334/64)")
82
83
networkUpdateCmd.Flags().String("ipv6-gateway", "", "The IPv6 gateway the interface should use")
83
84
networkUpdateCmd.Flags().String("ipv6-method", "", "Method on IPv6: static|auto|disabled")
networkUpdateCmd.Flags().StringArray("ipv6-nameserver", []string{}, "IPv6 address for upstream DNS servers. Use multiple times for multiple servers.")
88
+
networkUpdateCmd.Flags().Int("ipv6-route-metric", -1, "IPv6 route metric. Lower value has higher priority. The kernel accepts zero (0) but coerces it to 1024 (user default).")
87
89
88
90
networkUpdateCmd.Flags().String("wifi-mode", "", "Wifi mode: infrastructure, adhoc, mesh or ap")
89
91
networkUpdateCmd.Flags().String("wifi-ssid", "", "SSID for wifi connection")
Copy file name to clipboardExpand all lines: cmd/network_vlan.go
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -74,13 +74,15 @@ func init() {
74
74
networkVlanCmd.Flags().String("ipv4-gateway", "", "The IPv4 gateway the interface should use")
75
75
networkVlanCmd.Flags().String("ipv4-method", "", "Method on IPv4: static|auto|disabled")
76
76
networkVlanCmd.Flags().StringArray("ipv4-nameserver", []string{}, "IPv4 address of upstream DNS servers. Use multiple times for multiple servers.")
77
+
networkVlanCmd.Flags().Int("ipv4-route-metric", -1, "IPv4 route metric. Lower value has higher priority.")
77
78
78
79
networkVlanCmd.Flags().StringArray("ipv6-address", []string{}, "IPv6 address for the interface in CIDR notation (e.g. 2001:db8:85a3::8a2e:370:7334/64)")
79
80
networkVlanCmd.Flags().String("ipv6-gateway", "", "The IPv6 gateway the interface should use")
80
81
networkVlanCmd.Flags().String("ipv6-method", "", "Method on IPv6: static|auto|disabled")
networkVlanCmd.Flags().StringArray("ipv6-nameserver", []string{}, "IPv6 address for upstream DNS servers. Use multiple times for multiple servers.")
85
+
networkVlanCmd.Flags().Int("ipv6-route-metric", -1, "IPv6 route metric. Lower value has higher priority. The kernel accepts zero (0) but coerces it to 1024 (user default).")
0 commit comments