diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2024-02-14 13:58:56 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2024-02-14 14:29:19 +0100 |
commit | 224a152c53f304881f8616a1c9255b467062a069 (patch) | |
tree | 406e92182f4f49730a65fa4dc667478fa6f30dc9 /nest | |
parent | 574d7eb241a60622b0573ab1460cb23d968ba1cc (diff) |
Filter: Add support for string route attribute
Diffstat (limited to 'nest')
-rw-r--r-- | nest/route.h | 3 | ||||
-rw-r--r-- | nest/rt-attr.c | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/nest/route.h b/nest/route.h index e6f6c64a..12e85006 100644 --- a/nest/route.h +++ b/nest/route.h @@ -554,7 +554,8 @@ const char *ea_custom_name(uint ea); #define EAF_TYPE_INT_SET 0x0a /* Set of u32's (e.g., a community list) */ #define EAF_TYPE_EC_SET 0x0e /* Set of pairs of u32's - ext. community list */ #define EAF_TYPE_LC_SET 0x12 /* Set of triplets of u32's - large community list */ -#define EAF_TYPE_IFACE 0x16 /* Interface pointer stored in adata */ +#define EAF_TYPE_IFACE 0x14 /* Interface pointer stored in adata */ +#define EAF_TYPE_STRING 0x16 /* Text string */ #define EAF_EMBEDDED 0x01 /* Data stored in eattr.u.data (part of type spec) */ #define EAF_VAR_LENGTH 0x02 /* Attribute length is variable (part of type spec) */ diff --git a/nest/rt-attr.c b/nest/rt-attr.c index af864bdf..c8ef8e08 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -1015,6 +1015,9 @@ ea_show(struct cli *c, const eattr *e) case EAF_TYPE_LC_SET: ea_show_lc_set(c, ad, pos, buf, end); return; + case EAF_TYPE_STRING: + bsnprintf(pos, end - pos, "%s", (const char *) ad->data); + break; default: bsprintf(pos, "<type %02x>", e->type); } |