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 5B6921FF163 for ; Thu, 10 Oct 2024 17:57:33 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 1A5091E013; Thu, 10 Oct 2024 17:56:56 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Thu, 10 Oct 2024 17:56:24 +0200 Message-Id: <20241010155637.255451-13-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241010155637.255451-1-s.hanreich@proxmox.com> References: <20241010155637.255451-1-s.hanreich@proxmox.com> MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.262 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 v2 12/25] 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 LS0KIHByb3htb3gtdmUtY29uZmlnL3NyYy9saWIucnMgICAgIHwgICA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bVN0cildCitwdWIg c3RydWN0IFN1Ym5ldE5hbWUoWm9uZU5hbWUsIENpZHIpOworCitpbXBsIFN1Ym5ldE5hbWUgewor ICAgIHB1YiBmbiBuZXcoem9uZTogWm9uZU5hbWUsIGNpZHI6IENpZHIpIC0+IFNlbGYgeworICAg ICAgICBTdWJuZXROYW1lKHpvbmUsIGNpZHIpCisgICAgfQorCisgICAgcHViIGZuIHpvbmUoJnNl bGYpIC0+ICZab25lTmFtZSB7CisgICAgICAgICZzZWxmLjAKKyAgICB9CisKKyAgICBwdWIgZm4g Y2lkcigmc2VsZikgLT4gJkNpZHIgeworICAgICAgICAmc2VsZi4xCisgICAgfQorfQorCitpbXBs IEZyb21TdHIgZm9yIFN1Ym5ldE5hbWUgeworICAgIHR5cGUgRXJyID0gU2RuTmFtZUVycm9yOwor CisgICAgZm4gZnJvbV9zdHIoczogJnN0cikgLT4gUmVzdWx0PFNlbGYsIFNlbGY6OkVycj4gewor ICAgICAgICBpZiBsZXQgU29tZSgobmFtZSwgY2lkcl9wYXJ0KSkgPSBzLnNwbGl0X29uY2UoJy0n KSB7CisgICAgICAgICAgICBpZiBsZXQgU29tZSgoaXAsIG5ldG1hc2spKSA9IGNpZHJfcGFydC5z cGxpdF9vbmNlKCctJykgeworICAgICAgICAgICAgICAgIGxldCB6b25lX25hbWUgPSBab25lTmFt ZTo6ZnJvbV9zdHIobmFtZSk/OworCisgICAgICAgICAgICAgICAgbGV0IGNpZHI6IENpZHIgPSBm b3JtYXQhKCJ7aXB9L3tuZXRtYXNrfSIpCisgICAgICAgICAgICAgICAgICAgIC5wYXJzZSgpCisg ICAgICAgICAgICAgICAgICAgIC5tYXBfZXJyKHxffCBTZG5OYW1lRXJyb3I6OkludmFsaWRTdWJu ZXRDaWRyKT87CisKKyAgICAgICAgICAgICAgICByZXR1cm4gT2soU2VsZih6b25lX25hbWUsIGNp ZHIpKTsKKyAgICAgICAgICAgIH0KKyAgICAgICAgfQorCisgICAgICAgIEVycihTZG5OYW1lRXJy b3I6OkludmFsaWRTdWJuZXRGb3JtYXQpCisgICAgfQorfQorCisjW2NmZyh0ZXN0KV0KK21vZCB0 ZXN0cyB7CisgICAgdXNlIHN1cGVyOjoqOworCisgICAgI1t0ZXN0XQorICAgIGZuIHRlc3Rfem9u ZV9uYW1lKCkgeworICAgICAgICBab25lTmFtZTo6bmV3KCJ6b25lMCIudG9fc3RyaW5nKCkpLnVu d3JhcCgpOworCisgICAgICAgIGFzc2VydF9lcSEoWm9uZU5hbWU6Om5ldygiIi50b19zdHJpbmco KSksIEVycihTZG5OYW1lRXJyb3I6OkVtcHR5KSk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAg ICAgICAgICAgIFpvbmVOYW1lOjpuZXcoIjNxd2UiLnRvX3N0cmluZygpKSwKKyAgICAgICAgICAg IEVycihTZG5OYW1lRXJyb3I6OkludmFsaWRTeW1ib2xzKQorICAgICAgICApOworCisgICAgICAg IGFzc2VydF9lcSEoCisgICAgICAgICAgICBab25lTmFtZTo6bmV3KCJxd2Vxd2Vxd2UiLnRvX3N0 cmluZygpKSwKKyAgICAgICAgICAgIEVycihTZG5OYW1lRXJyb3I6OlRvb0xvbmcpCisgICAgICAg ICk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAgICAgICAgICAgIFpvbmVOYW1lOjpuZXcoInHD nyIudG9fc3RyaW5nKCkpLAorICAgICAgICAgICAgRXJyKFNkbk5hbWVFcnJvcjo6SW52YWxpZFN5 bWJvbHMpCisgICAgICAgICk7CisgICAgfQorCisgICAgI1t0ZXN0XQorICAgIGZuIHRlc3Rfdm5l dF9uYW1lKCkgeworICAgICAgICBWbmV0TmFtZTo6bmV3KCJ2bmV0MCIudG9fc3RyaW5nKCkpLnVu d3JhcCgpOworCisgICAgICAgIGFzc2VydF9lcSEoVm5ldE5hbWU6Om5ldygiIi50b19zdHJpbmco KSksIEVycihTZG5OYW1lRXJyb3I6OkVtcHR5KSk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAg ICAgICAgICAgIFZuZXROYW1lOjpuZXcoIjNxd2UiLnRvX3N0cmluZygpKSwKKyAgICAgICAgICAg IEVycihTZG5OYW1lRXJyb3I6OkludmFsaWRTeW1ib2xzKQorICAgICAgICApOworCisgICAgICAg IGFzc2VydF9lcSEoCisgICAgICAgICAgICBWbmV0TmFtZTo6bmV3KCJxd2Vxd2Vxd2UiLnRvX3N0 cmluZygpKSwKKyAgICAgICAgICAgIEVycihTZG5OYW1lRXJyb3I6OlRvb0xvbmcpCisgICAgICAg ICk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAgICAgICAgICAgIFZuZXROYW1lOjpuZXcoInHD nyIudG9fc3RyaW5nKCkpLAorICAgICAgICAgICAgRXJyKFNkbk5hbWVFcnJvcjo6SW52YWxpZFN5 bWJvbHMpCisgICAgICAgICk7CisgICAgfQorCisgICAgI1t0ZXN0XQorICAgIGZuIHRlc3Rfc3Vi bmV0X25hbWUoKSB7CisgICAgICAgIGFzc2VydF9lcSEoCisgICAgICAgICAgICAicXdlcXdlcXdl LTEwLjEwMS4wLjAtMTYiLnBhcnNlOjo8U3VibmV0TmFtZT4oKSwKKyAgICAgICAgICAgIEVycihT ZG5OYW1lRXJyb3I6OlRvb0xvbmcpLAorICAgICAgICApOworCisgICAgICAgIGFzc2VydF9lcSEo CisgICAgICAgICAgICAiem9uZTBfMTAuMTAxLjAuMC0xNiIucGFyc2U6OjxTdWJuZXROYW1lPigp LAorICAgICAgICAgICAgRXJyKFNkbk5hbWVFcnJvcjo6SW52YWxpZFN1Ym5ldEZvcm1hdCksCisg ICAgICAgICk7CisKKyAgICAgICAgYXNzZXJ0X2VxISgKKyAgICAgICAgICAgICJ6b25lMC0xMC4x MDEuMC4wXzE2Ii5wYXJzZTo6PFN1Ym5ldE5hbWU+KCksCisgICAgICAgICAgICBFcnIoU2RuTmFt ZUVycm9yOjpJbnZhbGlkU3VibmV0Rm9ybWF0KSwKKyAgICAgICAgKTsKKworICAgICAgICBhc3Nl cnRfZXEhKAorICAgICAgICAgICAgInpvbmUwLTEwLjEwMS4wLjAtMzMiLnBhcnNlOjo8U3VibmV0 TmFtZT4oKSwKKyAgICAgICAgICAgIEVycihTZG5OYW1lRXJyb3I6OkludmFsaWRTdWJuZXRDaWRy KSwKKyAgICAgICAgKTsKKworICAgICAgICBhc3NlcnRfZXEhKAorICAgICAgICAgICAgInpvbmUw LTEwLjEwMS4wLjAtMTYiLnBhcnNlOjo8U3VibmV0TmFtZT4oKS51bndyYXAoKSwKKyAgICAgICAg ICAgIFN1Ym5ldE5hbWU6Om5ldygKKyAgICAgICAgICAgICAgICBab25lTmFtZTo6bmV3KCJ6b25l MCIudG9fc3RyaW5nKCkpLnVud3JhcCgpLAorICAgICAgICAgICAgICAgIENpZHI6Om5ld192NChb MTAsIDEwMSwgMCwgMF0sIDE2KS51bndyYXAoKQorICAgICAgICAgICAgKQorICAgICAgICApCisg ICAgfQorfQotLSAKMi4zOS41CgoKX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f X19fX19fX19fX18KcHZlLWRldmVsIG1haWxpbmcgbGlzdApwdmUtZGV2ZWxAbGlzdHMucHJveG1v eC5jb20KaHR0cHM6Ly9saXN0cy5wcm94bW94LmNvbS9jZ2ktYmluL21haWxtYW4vbGlzdGluZm8v cHZlLWRldmVsCg==