From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id C5D0B1FF140 for ; Fri, 27 Mar 2026 01:50:03 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 914301F0CC; Fri, 27 Mar 2026 01:50:24 +0100 (CET) Message-ID: <06cc8c1f-03e3-4e6f-8bbc-69874ea6c953@proxmox.com> Date: Fri, 27 Mar 2026 01:50:16 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH proxmox-ve-rs v7 08/21] frr: add bgp support with templates and serialization To: Gabriel Goller , pve-devel@lists.proxmox.com References: <20260323134934.243110-1-g.goller@proxmox.com> <20260323134934.243110-9-g.goller@proxmox.com> Content-Language: en-US From: Thomas Lamprecht In-Reply-To: <20260323134934.243110-9-g.goller@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1774572567035 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.011 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 RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 5EVCOHULTYGNLDPAE46HKDPZPANG2KSX X-Message-ID-Hash: 5EVCOHULTYGNLDPAE46HKDPZPANG2KSX X-MailFrom: t.lamprecht@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Am 23.03.26 um 14:50 schrieb Gabriel Goller: > +++ b/proxmox-frr-templates/templates/bgpd.jinja > +{% for ip_route in vrf.ip_routes %} > +{% if ip_route.vrf %} > + {{ "ipv6" if ip_route.is_ipv6 else "ip" }} route ... > +{% else %} > + {{ "ipv6" if ip_route.is_ipv6 else "ip" }} route ... > +{% endfor %} > +{% endif %} the endfor and endif statements are swapped here - the for-loop is closed while the if-block is still open. This is a Jinja nesting error that should fail at template parse time, at least that's what I'd expect. Ah, it's fixed in 09/21 but should be squashed into this patch. > +++ b/proxmox-frr/src/ser/bgp.rs > +pub struct NeighborGroup { > + pub ebgp_multihop: Option, eBGP multihop can't be negative (FRR accepts 1-255), so probably should be an Option? > +pub struct L2vpnEvpnAF { > + pub autort_as: Option, Similar here, ASNs are unsigned, so Option. > +pub struct NeighborGroup { > + pub local_as: Option, This field exists but bgp_router.jinja never renders `neighbor X local-as Y`. If intentionally unsupported for now, either just drop it or add some (TODO) comment providing rationale. > +++ b/proxmox-frr-templates/templates/frr.conf.jinja > +{% include "bgpd.jinja" %} > {% include "isisd.jinja" %} > +{% include "prefix_lists.jinja" %} > {% for line in custom_frr_config %} > {{ line }} > {% endfor %} > {% include "fabricd.jinja" %} > {% include "ospfd.jinja" %} > {% include "access_lists.jinja" %} > {% include "route_maps.jinja" %} > +{% include "ip_routes.jinja" %} > {% include "protocol_routemaps.jinja" %} Nit: prefix_lists ends up "separated" from the includes of access_lists and route_maps by custom_frr_config + fabricd + ospfd. Since route-maps reference prefix/access lists, grouping all filter objects together would be more conventional and might be maybe slightly friendlier to frr-reload.py's incremental processing.