From 57aa077227d1f2440dc1b2bb6cbbebd418a6b898 Mon Sep 17 00:00:00 2001 From: Ondrej Zajicek Date: Thu, 5 Oct 2023 21:29:04 +0200 Subject: BGP: Improve custom BGP attributes - Implement EA_GET for custom BGP attributes - Forbid EA_SET on existing opaque attributes - Forbid redefining existing attributes - Document possible compatibility problems --- doc/bird.sgml | 12 ++++++++---- filter/f-inst.c | 11 ++++++++++- proto/bgp/attrs.c | 6 ++++++ proto/bgp/bgp.h | 1 + proto/bgp/config.Y | 11 +++++++---- 5 files changed, 32 insertions(+), 9 deletions(-) diff --git a/doc/bird.sgml b/doc/bird.sgml index a023473f..5e795450 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -3561,10 +3561,14 @@ some of them (marked with ` is configured it set automatically. -

For attributes unknown by BIRD, the user can assign a name (on top level) -to an attribute by its number. This defined name can be used then to both set -(by a bytestring literal, transitive) or unset the given attribute even though -BIRD knows nothing about it: +

For attributes unknown by BIRD, the user can assign a name (on top level) to +an attribute by its number. This defined name can be used then to get, set (as a +bytestring, transitive) or unset the given attribute even though BIRD knows +nothing about it. + +

Note that it is not possible to define an attribute with the same number +as one known by BIRD, therefore use of this statement carries a risk of +incompatibility with future BIRD versions.