summaryrefslogtreecommitdiff
path: root/proto/bgp/attrs.c
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:44:31 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2023-11-25 23:44:31 +0100
commit1f37906b6ee33a8c7d0ff1b7ada5eb0dcb005072 (patch)
tree1fa785bfb77db3f1dc94fce8425ecb88649b7972 /proto/bgp/attrs.c
parent9a54c5affeb836b64a1952d0ef75fd88301ae899 (diff)
parent57aa077227d1f2440dc1b2bb6cbbebd418a6b898 (diff)
Merge commit '57aa0772' into wireguard-next-tmp7-1
Diffstat (limited to 'proto/bgp/attrs.c')
-rw-r--r--proto/bgp/attrs.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/proto/bgp/attrs.c b/proto/bgp/attrs.c
index dc764331..c6d5312c 100644
--- a/proto/bgp/attrs.c
+++ b/proto/bgp/attrs.c
@@ -1195,6 +1195,12 @@ bgp_attr_known(uint code)
return (code < ARRAY_SIZE(bgp_attr_table)) && bgp_attr_table[code].name;
}
+const char *
+bgp_attr_name(uint code)
+{
+ return (code < ARRAY_SIZE(bgp_attr_table)) ? bgp_attr_table[code].name : NULL;
+}
+
void bgp_fix_attr_flags(ea_list *attrs)
{
for (u8 i = 0; i < attrs->count; i++)