From nobody Mon Feb 9 04:14:03 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 1550516990138439.4656321743573; Mon, 18 Feb 2019 11:09:50 -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 49A9581DE0; Mon, 18 Feb 2019 19:09:48 +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 1889F17265; Mon, 18 Feb 2019 19:09:48 +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 C5CB34EA67; Mon, 18 Feb 2019 19:09:47 +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 x1IJ9SO2019041 for ; Mon, 18 Feb 2019 14:09:28 -0500 Received: by smtp.corp.redhat.com (Postfix) id DABB1102492D; Mon, 18 Feb 2019 19:09:28 +0000 (UTC) Received: from mx1.redhat.com (ext-mx04.extmail.prod.ext.phx2.redhat.com [10.5.110.28]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D10FB101962B for ; Mon, 18 Feb 2019 19:09:21 +0000 (UTC) Received: from mail-qk1-f195.google.com (mail-qk1-f195.google.com [209.85.222.195]) (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 B0F97107BD for ; Mon, 18 Feb 2019 19:09:20 +0000 (UTC) Received: by mail-qk1-f195.google.com with SMTP id v139so193044qkb.12 for ; Mon, 18 Feb 2019 11:09:20 -0800 (PST) Received: from localhost.localdomain ([177.95.254.156]) by smtp.gmail.com with ESMTPSA id s21sm9106768qki.94.2019.02.18.11.09.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Feb 2019 11:09:19 -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=VnF8l5BbW0dwH14R1ppCkRxqEPS+2yq/ZhCYfr5cp/A=; b=rpfwHuarKIrvjdfgrFHxwcVYYmGVuztm5LG6o0TqbfMtc2BvcGmIpH3zFsrFI+sjgP tcE4J8p3QZX2GvtKlQNUavu40HOzwDupy0J7q22tmzQmXHFrZFnd2zzPfPQAewGfifxF vNV1mGYALL/K30QX+w0IwWkK9Zwcn0AtKptf+xg9tTnVy05YXDqCGRpM7Ce3DywDoayk wM1lhOtGEIBfvlquDVPfKHpoRZhmdyLvnVpXzo4kctxi6e2IuDrGLMtMRRXFB9f4DUhp 5TC8HVmhW3u1ZGB0Or2nOI3jphw/O75Q17dEjvtS0FCAAA5d+CvfL4ZaGMSVjHZmBnsL +PHQ== 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=VnF8l5BbW0dwH14R1ppCkRxqEPS+2yq/ZhCYfr5cp/A=; b=sZ2sLC1A7JPv+AGMwDQ1v0hHqzAmMXVFbFY8WOOEJmLh9/HU9vT3nmee3Jsga0tmej RJnWueylLJP3yqxIC4NBAmN/97XJq6Cxl8Syh4BJFq1HAG7Nuj1NJc0sLyPxwhswegz5 ocaBeQisLPOh4G+zXWoVOdCI4AuVH+hIjj5keoyk9bJ3dl/vYwnZfX0BkcXjvlUzHo46 CNYZMBJnfKRxhEUFNHw6LGPHCxblMhmu3LICJL+PrkPHl2NbAR4+l1fPVxi71oB/nfu8 0bzr7QpDUsC2adpgfJotUEa4rHtrJQC0ZP2FhHEQLwo1uG3r1l6oDkNg+tP+BEKEbbDO kPFA== X-Gm-Message-State: AHQUAuaqC848ZNPW5mmp6t/mYJ84i88164VTW3k98JEdOd73YwOnbfdH tBrGipgqBXTC3GqHfChLLAxIKbM4 X-Google-Smtp-Source: AHgI3IY7uCJOfYGhbmvAWSMfCCLrdT9tQvOiEAsr6JfVUfU9w3E//f6GehdB8csS+Sl+5pPs3ahopg== X-Received: by 2002:a37:a42:: with SMTP id 63mr17810497qkk.269.1550516959773; Mon, 18 Feb 2019 11:09:19 -0800 (PST) From: Julio Faracco To: libvir-list@redhat.com Date: Mon, 18 Feb 2019 16:09:06 -0300 Message-Id: <20190218190910.22477-3-jcfaracco@gmail.com> In-Reply-To: <20190218190910.22477-1-jcfaracco@gmail.com> References: <20190218190910.22477-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.28]); Mon, 18 Feb 2019 19:09:20 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.28]); Mon, 18 Feb 2019 19:09:20 +0000 (UTC) for IP:'209.85.222.195' DOMAIN:'mail-qk1-f195.google.com' HELO:'mail-qk1-f195.google.com' FROM:'jcfaracco@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.111 (DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_PASS) 209.85.222.195 mail-qk1-f195.google.com 209.85.222.195 mail-qk1-f195.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.28 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH 2/6] lxc: Create a new method called lxcNetworkParseDataEntry(). 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.25]); Mon, 18 Feb 2019 19:09:48 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" This new method is responsible to verify is the settings correspond to network entry. Right now, it is only verifying "lxc.network.", but in the future, it can be used to verify "lxc.net.X." too. Any other case would be rejected. On the other hand, the idea here is working only with types. If we know that entry is part of network settings, after we just need to know which type is. It keeps the hanlder simple. Signed-off-by: Julio Faracco Reviewed-by: John Ferlan --- src/lxc/lxc_native.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/lxc/lxc_native.c b/src/lxc/lxc_native.c index 5bbbbf132c..c144f3c52e 100644 --- a/src/lxc/lxc_native.c +++ b/src/lxc/lxc_native.c @@ -648,6 +648,14 @@ lxcNetworkWalkCallback(const char *name, virConfValueP= tr value, void *data) return 0; } =20 +static int +lxcNetworkParseDataEntry(const char *name, virConfValuePtr value, lxcNetwo= rkParseData *parseData) +{ + const char *suffix =3D STRSKIP(name, "lxc.network."); + + return lxcNetworkParseDataSuffix(suffix, value, parseData); +} + static int lxcConvertNetworkSettings(virDomainDefPtr def, virConfPtr properties) { --=20 2.19.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list