From 86cc2519541d4367fe3ab7c4bd27bab4cbc2a8ab Mon Sep 17 00:00:00 2001 From: mbonino <42541934+mbonino@users.noreply.github.com> Date: Tue, 29 Mar 2022 09:53:53 +0200 Subject: [PATCH] Add systemd-networkd peer syntax (#92) Systemd-networkd config file uses ``[WireGuardPeer]`` rather than ``[Peer]``. --- src/wireguard_config.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wireguard_config.rs b/src/wireguard_config.rs index 15f5c54..52b2298 100644 --- a/src/wireguard_config.rs +++ b/src/wireguard_config.rs @@ -124,7 +124,7 @@ pub(crate) fn peer_entry_hashmap_try_from( cur_block = None; } - if line == "[Peer]" { + if line == "[Peer]" || line == "[WireGuardPeer]" { // start a new block cur_block = Some(Vec::new()); }