network/wireguard: fixes sending wireguard peer settings
authorYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 28 Jan 2019 08:42:35 +0000 (09:42 +0100)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Mon, 28 Jan 2019 09:09:57 +0000 (10:09 +0100)
This fixes a bug introduced by e1f717d4a02e15ae11a191dd4962b2f4d117678d.

Fixes #11579.

src/network/netdev/wireguard.c

index 1efd886..dd239f7 100644 (file)
@@ -109,7 +109,7 @@ static int wireguard_set_peer_one(NetDev *netdev, sd_netlink_message *message, c
         if (r < 0)
                 goto cancel;
 
-        if (!start) {
+        if (!*mask_start) {
                 r = sd_netlink_message_append_data(message, WGPEER_A_PRESHARED_KEY, &peer->preshared_key, WG_KEY_LEN);
                 if (r < 0)
                         goto cancel;