From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 452AF1FF168 for ; Tue, 12 Nov 2024 13:27:12 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 53A0E1F4AF; Tue, 12 Nov 2024 13:26:17 +0100 (CET) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Tue, 12 Nov 2024 13:25:48 +0100 Message-Id: <20241112122602.88598-11-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241112122602.88598-1-s.hanreich@proxmox.com> References: <20241112122602.88598-1-s.hanreich@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.250 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Subject: [pve-devel] [PATCH proxmox-ve-rs v3 10/24] sdn: add name types X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" U2lnbmVkLW9mZi1ieTogU3RlZmFuIEhhbnJlaWNoIDxzLmhhbnJlaWNoQHByb3htb3guY29tPgot LS0KIHByb3htb3gtdmUtY29uZmlnL3NyYy9saWIucnMgICAgIHwgIC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gICAgICAgICAgICAucGFyc2UoKQorICAgICAgICAgICAgICAgICAgICAubWFwX2Vycih8 X3wgU2RuTmFtZUVycm9yOjpJbnZhbGlkU3VibmV0Q2lkcik/OworCisgICAgICAgICAgICAgICAg cmV0dXJuIE9rKFNlbGYoem9uZV9uYW1lLCBjaWRyKSk7CisgICAgICAgICAgICB9CisgICAgICAg IH0KKworICAgICAgICBFcnIoU2RuTmFtZUVycm9yOjpJbnZhbGlkU3VibmV0Rm9ybWF0KQorICAg IH0KK30KKworI1tjZmcodGVzdCldCittb2QgdGVzdHMgeworICAgIHVzZSBzdXBlcjo6KjsKKwor ICAgICNbdGVzdF0KKyAgICBmbiB0ZXN0X3pvbmVfbmFtZSgpIHsKKyAgICAgICAgWm9uZU5hbWU6 Om5ldygiem9uZTAiLnRvX3N0cmluZygpKS51bndyYXAoKTsKKworICAgICAgICBhc3NlcnRfZXEh KFpvbmVOYW1lOjpuZXcoIiIudG9fc3RyaW5nKCkpLCBFcnIoU2RuTmFtZUVycm9yOjpFbXB0eSkp OworCisgICAgICAgIGFzc2VydF9lcSEoCisgICAgICAgICAgICBab25lTmFtZTo6bmV3KCIzcXdl Ii50b19zdHJpbmcoKSksCisgICAgICAgICAgICBFcnIoU2RuTmFtZUVycm9yOjpJbnZhbGlkU3lt Ym9scykKKyAgICAgICAgKTsKKworICAgICAgICBhc3NlcnRfZXEhKAorICAgICAgICAgICAgWm9u ZU5hbWU6Om5ldygicXdlcXdlcXdlIi50b19zdHJpbmcoKSksCisgICAgICAgICAgICBFcnIoU2Ru TmFtZUVycm9yOjpUb29Mb25nKQorICAgICAgICApOworCisgICAgICAgIGFzc2VydF9lcSEoCisg ICAgICAgICAgICBab25lTmFtZTo6bmV3KCJxw58iLnRvX3N0cmluZygpKSwKKyAgICAgICAgICAg IEVycihTZG5OYW1lRXJyb3I6OkludmFsaWRTeW1ib2xzKQorICAgICAgICApOworICAgIH0KKwor ICAgICNbdGVzdF0KKyAgICBmbiB0ZXN0X3ZuZXRfbmFtZSgpIHsKKyAgICAgICAgVm5ldE5hbWU6 Om5ldygidm5ldDAiLnRvX3N0cmluZygpKS51bndyYXAoKTsKKworICAgICAgICBhc3NlcnRfZXEh KFZuZXROYW1lOjpuZXcoIiIudG9fc3RyaW5nKCkpLCBFcnIoU2RuTmFtZUVycm9yOjpFbXB0eSkp OworCisgICAgICAgIGFzc2VydF9lcSEoCisgICAgICAgICAgICBWbmV0TmFtZTo6bmV3KCIzcXdl Ii50b19zdHJpbmcoKSksCisgICAgICAgICAgICBFcnIoU2RuTmFtZUVycm9yOjpJbnZhbGlkU3lt Ym9scykKKyAgICAgICAgKTsKKworICAgICAgICBhc3NlcnRfZXEhKAorICAgICAgICAgICAgVm5l dE5hbWU6Om5ldygicXdlcXdlcXdlIi50b19zdHJpbmcoKSksCisgICAgICAgICAgICBFcnIoU2Ru TmFtZUVycm9yOjpUb29Mb25nKQorICAgICAgICApOworCisgICAgICAgIGFzc2VydF9lcSEoCisg ICAgICAgICAgICBWbmV0TmFtZTo6bmV3KCJxw58iLnRvX3N0cmluZygpKSwKKyAgICAgICAgICAg IEVycihTZG5OYW1lRXJyb3I6OkludmFsaWRTeW1ib2xzKQorICAgICAgICApOworICAgIH0KKwor ICAgICNbdGVzdF0KKyAgICBmbiB0ZXN0X3N1Ym5ldF9uYW1lKCkgeworICAgICAgICBhc3NlcnRf ZXEhKAorICAgICAgICAgICAgInF3ZXF3ZXF3ZS0xMC4xMDEuMC4wLTE2Ii5wYXJzZTo6PFN1Ym5l dE5hbWU+KCksCisgICAgICAgICAgICBFcnIoU2RuTmFtZUVycm9yOjpUb29Mb25nKSwKKyAgICAg ICAgKTsKKworICAgICAgICBhc3NlcnRfZXEhKAorICAgICAgICAgICAgInpvbmUwXzEwLjEwMS4w LjAtMTYiLnBhcnNlOjo8U3VibmV0TmFtZT4oKSwKKyAgICAgICAgICAgIEVycihTZG5OYW1lRXJy b3I6OkludmFsaWRTdWJuZXRGb3JtYXQpLAorICAgICAgICApOworCisgICAgICAgIGFzc2VydF9l cSEoCisgICAgICAgICAgICAiem9uZTAtMTAuMTAxLjAuMF8xNiIucGFyc2U6OjxTdWJuZXROYW1l PigpLAorICAgICAgICAgICAgRXJyKFNkbk5hbWVFcnJvcjo6SW52YWxpZFN1Ym5ldEZvcm1hdCks CisgICAgICAgICk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAgICAgICAgICAgICJ6b25lMC0x MC4xMDEuMC4wLTMzIi5wYXJzZTo6PFN1Ym5ldE5hbWU+KCksCisgICAgICAgICAgICBFcnIoU2Ru TmFtZUVycm9yOjpJbnZhbGlkU3VibmV0Q2lkciksCisgICAgICAgICk7CisKKyAgICAgICAgYXNz ZXJ0X2VxISgKKyAgICAgICAgICAgICJ6b25lMC0xMC4xMDEuMC4wLTE2Ii5wYXJzZTo6PFN1Ym5l dE5hbWU+KCkudW53cmFwKCksCisgICAgICAgICAgICBTdWJuZXROYW1lOjpuZXcoCisgICAgICAg ICAgICAgICAgWm9uZU5hbWU6Om5ldygiem9uZTAiLnRvX3N0cmluZygpKS51bndyYXAoKSwKKyAg ICAgICAgICAgICAgICBDaWRyOjpuZXdfdjQoWzEwLCAxMDEsIDAsIDBdLCAxNikudW53cmFwKCkK KyAgICAgICAgICAgICkKKyAgICAgICAgKQorICAgIH0KK30KLS0gCjIuMzkuNQoKCl9fX19fX19f X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCnB2ZS1kZXZlbCBtYWlsaW5n IGxpc3QKcHZlLWRldmVsQGxpc3RzLnByb3htb3guY29tCmh0dHBzOi8vbGlzdHMucHJveG1veC5j b20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3B2ZS1kZXZlbAo=