diff options
author | Maria Matejka <mq@ucw.cz> | 2022-04-10 19:31:50 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-04 15:37:41 +0200 |
commit | c1194ab7edbb17cb7371ac38e6eab5ae3ae72163 (patch) | |
tree | 821c04b0900ddc33c6bd20c4ca93dd30aa8a23b4 /proto/bgp/attrs.c | |
parent | ef4313e1667a8745c8d8813ac78342ec7c035895 (diff) |
Protocols use EA_LITERAL_* to set attributes
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r-- | proto/bgp/attrs.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c index a7b6d0cd..4c67b161 100644 --- a/proto/bgp/attrs.c +++ b/proto/bgp/attrs.c @@ -94,13 +94,12 @@ void bgp_set_attr_u32(ea_list **to, uint code, uint flags, u32 val) void bgp_set_attr_ptr(ea_list **to, uint code, uint flags, const struct adata *ad) { ASSERT(bgp_attr_known(code)); - ASSERT_DIE(!(bgp_attr_table[code].type & EAF_EMBEDDED)); - ea_set_attr(to, EA_LITERAL_GENERIC( + ea_set_attr(to, EA_LITERAL_DIRECT_ADATA( EA_CODE(PROTOCOL_BGP, code), bgp_attr_table[code].type, flags & ~BAF_EXT_LEN, - .u.ad = ad + ad )); } @@ -109,7 +108,7 @@ bgp_set_attr_data(ea_list **to, uint code, uint flags, void *data, uint len) { ASSERT(bgp_attr_known(code)); - ea_set_attr(to, EA_LITERAL_ADATA( + ea_set_attr(to, EA_LITERAL_STORE_ADATA( EA_CODE(PROTOCOL_BGP, code), bgp_attr_table[code].type, flags & ~BAF_EXT_LEN, |