Re: [PATCH proxmox-ve-rs 02/16] frr: add support for extcommunity lists

Hannes Laimer
2026-04-16T15:55:05Z

On 2026-04-14 18:33, Stefan Hanreich wrote:
> Extended Communities are used for encoding Route Targets in the EVPN
> AF, among other things. FRR provides a mechanism to match based on
> them via the extcommunity lists. Implement support for creating them,
> so they can be used by the SDN stack for matching extended communities
> in route maps. Initially, this will be used to filter outgoing routes
> in EVPN controllers, but in the future it is planned to expose
> creating extcommunity lists via our API / UI as well.
>
> Signed-off-by: Stefan Hanreich <s.hanreich@proxmox.com>
> ---

[..]

> +impl std::fmt::Display for ExtendedCommunityMatch {
> + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
> + let mode = self
> + .mode
> + .as_ref()
> + .map(|mode| format!(" {mode}"))
> + .unwrap_or_else(|| String::new());

nit: could use `.unwrap_or_default()`

> +
> + write!(f, "{}{mode}", self.name)
> + }
> +}

[..]