all: generalize vpn client info

VPN clients often have empty MAC address, because they come from virtual
network interface. However, there's other setup/devices also create
virtual interface, but is not VPN.

Changing source of those clients to empty to prevent confustion in
clients list command output.
This commit is contained in:
Cuong Manh Le
2023-10-03 16:51:09 +00:00
committed by Cuong Manh Le
parent 8ddbf881b3
commit 6e28517454
3 changed files with 18 additions and 15 deletions

View File

@@ -626,6 +626,9 @@ NOTE: Uninstalling will set DNS to values provided by DHCP.`,
map2Slice := func(m map[string]struct{}) []string {
s := make([]string, 0, len(m))
for k := range m {
if k == "" { // skip empty source from output.
continue
}
s = append(s, k)
}
sort.Strings(s)