wgcfg: add benchmark for FromUAPI

Adds a benchmark for FromUAPI in wgcfg.
It appears that it's not actually that slow, the main allocations are from the scanner and new
config.
Updates #1912.

Signed-off-by: julianknodt <julianknodt@gmail.com>
This commit is contained in:
julianknodt
2021-07-12 19:48:32 -07:00
committed by Julian Knodt
parent 5b845631ce
commit 664edbe566
2 changed files with 45 additions and 1 deletions

View File

@@ -175,7 +175,7 @@ func (cfg *Config) handlePeerLine(peer *Peer, key, value string, valueBytes []by
if value != "1" {
return fmt.Errorf("invalid protocol version: %v", value)
}
case "preshared_key", "last_handshake_time_sec", "last_handshake_time_nsec", "tx_bytes", "rx_bytes":
case "replace_allowed_ips", "preshared_key", "last_handshake_time_sec", "last_handshake_time_nsec", "tx_bytes", "rx_bytes":
// ignore
default:
return fmt.Errorf("unexpected IpcGetOperation key: %v", key)