From adabef8e86c26889fc3c68a7276e981fa80ce3ed Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 27 Jan 2021 11:29:17 +0100 Subject: [PATCH] wireguard: fix configuring larger number of allowed-ips on WireGuard link https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/640 Fixes: a5c894c35f56 ('platform: create wireguard netdev interface') (cherry picked from commit a67c312d5d0234136594f88d07ae73bb5bd2d55f) --- src/platform/nm-linux-platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/platform/nm-linux-platform.c b/src/platform/nm-linux-platform.c index cb9315d98f..8842334a95 100644 --- a/src/platform/nm-linux-platform.c +++ b/src/platform/nm-linux-platform.c @@ -2786,7 +2786,7 @@ toobig_allowedips: if (nest_curr_allowed_ip) nla_nest_cancel(msg, nest_curr_allowed_ip); if (nest_allowed_ips) - nla_nest_cancel(msg, nest_allowed_ips); + _nla_nest_end(msg, nest_allowed_ips); _nla_nest_end(msg, nest_curr_peer); _nla_nest_end(msg, nest_peers); goto send;