0
0
mirror of https://gitlab.nic.cz/labs/bird.git synced 2025-01-18 06:51:54 +00:00

Merge commit 'v2.13.1-186-g761649e6' into thread-next

This commit is contained in:
Maria Matejka 2024-01-28 14:38:43 +01:00
commit 4628a117d9
3 changed files with 15 additions and 4 deletions

View File

@ -3591,10 +3591,14 @@ some of them (marked with `<tt/O/') are optional.
name="local role"> is configured it set automatically. name="local role"> is configured it set automatically.
</descrip> </descrip>
<p>For attributes unknown by BIRD, the user can assign a name (on top level) <p>For attributes unknown by BIRD, the user can assign a name (on top level) to
to an attribute by its number. This defined name can be used then to both set an attribute by its number. This defined name can be used then to get, set (as a
(by a bytestring literal, transitive) or unset the given attribute even though bytestring, transitive) or unset the given attribute even though BIRD knows
BIRD knows nothing about it: nothing about it.
<p>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.
<tt><label id="bgp-attribute-custom">attribute bgp <m/number/ bytestring <m/name/;</tt> <tt><label id="bgp-attribute-custom">attribute bgp <m/number/ bytestring <m/name/;</tt>

View File

@ -893,6 +893,12 @@
ARG_ANY(1); ARG_ANY(1);
DYNAMIC_ATTR; DYNAMIC_ATTR;
ARG_TYPE(1, da->type); ARG_TYPE(1, da->type);
FID_NEW_BODY;
if (da->type == T_OPAQUE)
cf_error("Setting opaque attribute is not allowed");
FID_INTERPRET_BODY;
{ {
struct eattr *a; struct eattr *a;

View File

@ -615,6 +615,7 @@ void bgp_unset_attr(ea_list **to, uint code);
int bgp_encode_mp_reach_mrt(struct bgp_write_state *s, eattr *a, byte *buf, uint size); int bgp_encode_mp_reach_mrt(struct bgp_write_state *s, eattr *a, byte *buf, uint size);
const char * bgp_attr_name(uint code);
int bgp_encode_attrs(struct bgp_write_state *s, ea_list *attrs, byte *buf, byte *end); int bgp_encode_attrs(struct bgp_write_state *s, ea_list *attrs, byte *buf, byte *end);
ea_list * bgp_decode_attrs(struct bgp_parse_state *s, byte *data, uint len); ea_list * bgp_decode_attrs(struct bgp_parse_state *s, byte *data, uint len);
void bgp_finish_attrs(struct bgp_parse_state *s, ea_list **to); void bgp_finish_attrs(struct bgp_parse_state *s, ea_list **to);