diff options
author | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:39:32 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-05-30 15:39:32 +0200 |
commit | 3752654852f4962465154257348000d6de1c2dae (patch) | |
tree | 7fcafdf3cb47131408e85f674577ad2a10fef18d /nest | |
parent | 032201378faa52e2d7a15ea265426e133d9becca (diff) | |
parent | 80272d4b64a38ee6f04a1c4e8566cac3a2293176 (diff) |
Merge commit '80272d4b64a38ee6f04a1c4e8566cac3a2293176' into haugesund
Diffstat (limited to 'nest')
-rw-r--r-- | nest/route.h | 10 | ||||
-rw-r--r-- | nest/rt-attr.c | 10 |
2 files changed, 11 insertions, 9 deletions
diff --git a/nest/route.h b/nest/route.h index d703d681..65cacdec 100644 --- a/nest/route.h +++ b/nest/route.h @@ -698,13 +698,15 @@ const char *ea_custom_name(uint ea); #define EAF_TYPE_IP_ADDRESS 0x04 /* IP address */ #define EAF_TYPE_ROUTER_ID 0x05 /* Router ID (IPv4 address) */ #define EAF_TYPE_AS_PATH 0x06 /* BGP AS path (encoding per RFC 1771:4.3) */ -#define EAF_TYPE_BITFIELD 0x09 /* 32-bit embedded bitfield */ #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_LC_SET 0x08 /* Set of triplets of u32's - large community list */ +#define EAF_TYPE_IFACE 0x0c /* Interface pointer stored in adata */ +#define EAF_TYPE_BGP_ORIGIN 0x11 /* BGP Origin enum */ +#define EAF_TYPE_RA_PREFERENCE 0x13 /* RA Preference enum */ + #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) */ + /* Otherwise, attribute data is adata */ typedef struct adata { uint length; /* Length of data */ diff --git a/nest/rt-attr.c b/nest/rt-attr.c index 22b45db9..25548dca 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -948,7 +948,7 @@ ea_show(struct cli *c, const eattr *e) if (e->undef) bsprintf(pos, "undefined"); else - switch (e->type & EAF_TYPE_MASK) + switch (e->type) { case EAF_TYPE_INT: bsprintf(pos, "%u", e->u.data); @@ -965,9 +965,6 @@ ea_show(struct cli *c, const eattr *e) case EAF_TYPE_AS_PATH: as_path_format(ad, pos, end - pos); break; - case EAF_TYPE_BITFIELD: - bsprintf(pos, "%08x", e->u.data); - break; case EAF_TYPE_INT_SET: ea_show_int_set(c, ad, 1, pos, buf, end); return; @@ -1011,7 +1008,10 @@ ea_dump(ea_list *e) { eattr *a = &e->attrs[i]; debug(" %02x:%02x.%02x", EA_PROTO(a->id), EA_ID(a->id), a->flags); - debug("=%c", "?iO?I?P???S?????" [a->type & EAF_TYPE_MASK]); + debug("=%c", + "?iO?IRP???S??pE?" + "??L???N?????????" + "?o???r??????????" [a->type]); if (a->originated) debug("o"); if (a->type & EAF_EMBEDDED) |