From 8ebac84bc8d51e2404ce6d6dc5e35fb261830596 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 20 Apr 2022 13:56:04 +0200 Subject: Moved advertising router info (FROM attribute) to eattrs --- nest/rt-attr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'nest/rt-attr.c') diff --git a/nest/rt-attr.c b/nest/rt-attr.c index e5d87b53..87f54b0d 100644 --- a/nest/rt-attr.c +++ b/nest/rt-attr.c @@ -70,6 +70,11 @@ struct ea_class ea_gen_preference = { .type = T_INT, }; +struct ea_class ea_gen_from = { + .name = "from", + .type = T_IP, +}; + const char * const rta_src_names[RTS_MAX] = { [RTS_STATIC] = "static", [RTS_INHERIT] = "inherit", @@ -1229,7 +1234,6 @@ rta_hash(rta *a) #define MIX(f) mem_hash_mix(&h, &(a->f), sizeof(a->f)); #define BMIX(f) mem_hash_mix_num(&h, a->f); MIX(hostentry); - MIX(from); BMIX(source); BMIX(scope); BMIX(dest); @@ -1244,7 +1248,6 @@ rta_same(rta *x, rta *y) return (x->source == y->source && x->scope == y->scope && x->dest == y->dest && - ipa_equal(x->from, y->from) && x->hostentry == y->hostentry && nexthop_same(&(x->nh), &(y->nh)) && ea_same(x->eattrs, y->eattrs)); @@ -1398,7 +1401,6 @@ rta_dump(rta *a) rtd[a->dest], a->hash_key); if (!a->cached) debug(" !CACHED"); - debug(" <-%I", a->from); if (a->dest == RTD_UNICAST) for (struct nexthop *nh = &(a->nh); nh; nh = nh->next) { @@ -1475,6 +1477,7 @@ rta_init(void) ea_register_init(&ea_gen_preference); ea_register_init(&ea_gen_igp_metric); + ea_register_init(&ea_gen_from); } /* -- cgit v1.2.3 From 702c04fbef222e802ca4dfac645dc75ede522db6 Mon Sep 17 00:00:00 2001 From: Maria Matejka Date: Wed, 4 May 2022 12:41:54 +0200 Subject: Removing the route scope attribute. Use custom attributes instead. The route scope attribute was used for simple user route marking. As there is a better tool for this (custom attributes), the old and limited way can be dropped. --- doc/bird.sgml | 8 -------- filter/config.Y | 1 - filter/data.h | 1 - filter/f-inst.c | 5 ----- filter/test.conf2 | 6 ------ lib/route.h | 1 - nest/rt-attr.c | 8 +++----- nest/rt-dev.c | 1 - proto/babel/babel.c | 2 -- proto/bgp/packets.c | 1 - proto/ospf/rt.c | 1 - proto/perf/perf.c | 1 - proto/rip/rip.c | 1 - proto/rpki/rpki.c | 1 - proto/static/static.c | 1 - sysdep/bsd/krt-sock.c | 1 - sysdep/linux/netlink.c | 1 - 17 files changed, 3 insertions(+), 38 deletions(-) (limited to 'nest/rt-attr.c') diff --git a/doc/bird.sgml b/doc/bird.sgml index a71624aa..aa058b37 100644 --- a/doc/bird.sgml +++ b/doc/bird.sgml @@ -1723,14 +1723,6 @@ Common route attributes are: primary key of the routing table. Read-only. (See the .) -