From nobody Mon Feb 9 13:35:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=gmail.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1543376355443415.84983739925076; Tue, 27 Nov 2018 19:39:15 -0800 (PST) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 627C8811DA; Wed, 28 Nov 2018 03:39:13 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 300785C1B2; Wed, 28 Nov 2018 03:39:13 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id D7BA941FB9; Wed, 28 Nov 2018 03:39:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id wAS3dAU0025508 for ; Tue, 27 Nov 2018 22:39:10 -0500 Received: by smtp.corp.redhat.com (Postfix) id 1182D1054FAE; Wed, 28 Nov 2018 03:39:10 +0000 (UTC) Received: from mx1.redhat.com (ext-mx17.extmail.prod.ext.phx2.redhat.com [10.5.110.46]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 07ED51019624 for ; Wed, 28 Nov 2018 03:39:08 +0000 (UTC) Received: from mail-qt1-f194.google.com (mail-qt1-f194.google.com [209.85.160.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2807B3082DDC for ; Wed, 28 Nov 2018 03:39:07 +0000 (UTC) Received: by mail-qt1-f194.google.com with SMTP id e5so24414506qtr.12 for ; Tue, 27 Nov 2018 19:39:07 -0800 (PST) Received: from localhost.localdomain ([2804:431:b704:2a6e:f5c0:e531:dcb0:2cf6]) by smtp.gmail.com with ESMTPSA id p75sm3354137qki.90.2018.11.27.19.39.04 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 27 Nov 2018 19:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=fhbL8frDPYSFG1pwlaxPhfl/uQwqjU2/n07h1j5+Ur8=; b=toB6AKIGq26t5rI3xgrerGQb5k17SLHntLfwrrGXiNcOJ9kuXL2CffdUM2VMaBqT6o jM5OSb2y8b4Hqv7NnllOU6Uf8DUC//0wpHuu7VtWMKTvugDrTyETPSeMFtG8D8KTzou2 M0JMOZ+hElEEcsKKfRpcDNqV7ZsnuoyVWatJA7QbJsubj/1qkE44pyf8Fch53lZf/sZv T9bNFFf0RZBJhsXCS4NugOacn0YRqYYqPkOY+ecdoXFH2zoyCpr0TOUQbFQxpVyaq/vT 7WQgx98oRLMUolPgOD8judjQqJ3y3aSIEoCPV8pS8CkF9jq15WmNW6FuJvMLs57novtm 86Zw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=fhbL8frDPYSFG1pwlaxPhfl/uQwqjU2/n07h1j5+Ur8=; b=tMjbmKKqLu6Z/viiIZB9Ajoerq1D4ePnAmD8sC8uDaBITRhSrA3G8JCEW+sYyyB9PA 4BsxNOsYcSnr5twMmxCRdfi9l+LgFlen+cljSs3gcZQC7SnXskxkRz97uZI3sAKa3Hu1 XYgPv5QuMfqvI6tcrHayvTw3EUBK9JNtWiGZBsOlYuImIoy+djfldwV+upttYtIAQ7QJ hD6MrVR3yq8fe4Du60rkzoNAXwfpGfLFiqNVJfMrRwd+GNRso3gTYHLWLHmOeSdluBh0 qbZ4wB1KflM/XwfA9Um9FJ80ywxzlm/xYo9M/Drua3PI8tyIuFU7ZvyO5xqCBR2LtOe9 s3oA== X-Gm-Message-State: AA+aEWbBM9NbB938G1cmiG2FxDd+Q84vbPXh9hfxenFxQ2jZPR5snBHp YthHIfZBsUJDYZpjvD9Sy4cNJTCw X-Google-Smtp-Source: AFSGD/XOQDT0skYAFFDSy+fIdiS0ZUnmz/5frGuMtAxtfrD/P5/LPVbwxDdp6eCC9NTWYqvd+giOKQ== X-Received: by 2002:a0c:9359:: with SMTP id e25mr33744987qve.203.1543376346167; Tue, 27 Nov 2018 19:39:06 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Wed, 28 Nov 2018 11:38:56 +0800 Message-Id: <20181128033857.30303-2-jcfaracco@gmail.com> In-Reply-To: <20181128033857.30303-1-jcfaracco@gmail.com> References: <20181128033857.30303-1-jcfaracco@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 28 Nov 2018 03:39:07 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Wed, 28 Nov 2018 03:39:07 +0000 (UTC) for IP:'209.85.160.194' DOMAIN:'mail-qt1-f194.google.com' HELO:'mail-qt1-f194.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.108 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_PASS) 209.85.160.194 mail-qt1-f194.google.com 209.85.160.194 mail-qt1-f194.google.com X-Scanned-By: MIMEDefang 2.84 on 10.5.110.46 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 1/2] lxc: Initializing IPv6 and IPv4 gateway to overwrite old settings. X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Wed, 28 Nov 2018 03:39:14 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This commit fixes a bug when you have multiple network settings defined. Basically, if you set an IPv6 or IPv4 gateway, it carries on next network settings. It is happening because the data is not being initialized when a new network type is defined. So, the old data still persists into the pointer. Signed-off-by: Julio Faracco --- src/lxc/lxc_native.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 9f6d4b3de8..246623d4a1 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -583,6 +583,9 @@ lxcNetworkWalkCallback(const char *name, virConfValuePt= r value, void *data) parseData->ips =3D NULL; parseData->nips =3D 0; =20 + parseData->gateway_ipv4 =3D NULL; + parseData->gateway_ipv6 =3D NULL; + /* Keep the new value */ parseData->type =3D value->str; } --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list