summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-05-30 17:18:03 +0200
committerMaria Matejka <mq@ucw.cz>2022-05-30 17:18:03 +0200
commit1a92ee9d4df265018c0344064019f53bc3afce3a (patch)
tree3eb67d0604086b399618bc525a83ce83deac9eb0 /nest/rt-attr.c
parent674587d9c84ed70151abc56003c371668079ae31 (diff)
parent337c04c45e1472d6d9b531a3c55f1f2d30ebf308 (diff)
Merge commit '337c04c45e1472d6d9b531a3c55f1f2d30ebf308' into haugesund
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 6bb27623..e5d87b53 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -65,6 +65,11 @@ struct ea_class ea_gen_igp_metric = {
.type = T_INT,
};
+struct ea_class ea_gen_preference = {
+ .name = "preference",
+ .type = T_INT,
+};
+
const char * const rta_src_names[RTS_MAX] = {
[RTS_STATIC] = "static",
[RTS_INHERIT] = "inherit",
@@ -1228,7 +1233,6 @@ rta_hash(rta *a)
BMIX(source);
BMIX(scope);
BMIX(dest);
- MIX(pref);
#undef MIX
return mem_hash_value(&h) ^ nexthop_hash(&(a->nh)) ^ ea_hash(a->eattrs);
@@ -1389,8 +1393,8 @@ rta_dump(rta *a)
"RTS_OSPF_EXT2", "RTS_BGP", "RTS_PIPE", "RTS_BABEL" };
static char *rtd[] = { "", " DEV", " HOLE", " UNREACH", " PROHIBIT" };
- debug("pref=%d uc=%d %s %s%s h=%04x",
- a->pref, a->uc, rts[a->source], ip_scope_text(a->scope),
+ debug("uc=%d %s %s%s h=%04x",
+ a->uc, rts[a->source], ip_scope_text(a->scope),
rtd[a->dest], a->hash_key);
if (!a->cached)
debug(" !CACHED");
@@ -1469,6 +1473,7 @@ rta_init(void)
rte_src_init();
ea_class_init();
+ ea_register_init(&ea_gen_preference);
ea_register_init(&ea_gen_igp_metric);
}