summaryrefslogtreecommitdiff
path: root/nest/rt-attr.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2020-04-10 17:08:29 +0200
committerMaria Matejka <mq@ucw.cz>2021-10-13 19:09:04 +0200
commit5cff1d5f022755df61af6fc21cc4f2e5d384404e (patch)
treed98b4b352a47257fe3943dcb050ff73c5c14aecf /nest/rt-attr.c
parenteb937358c087eaeb6f209660cc7ecfe6d6eff739 (diff)
Route: moved rte_src pointer from rta to rte
It is an auxiliary key in the routing table, not a route attribute.
Diffstat (limited to 'nest/rt-attr.c')
-rw-r--r--nest/rt-attr.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/nest/rt-attr.c b/nest/rt-attr.c
index 4198b552..4057bf37 100644
--- a/nest/rt-attr.c
+++ b/nest/rt-attr.c
@@ -1105,7 +1105,6 @@ rta_hash(rta *a)
mem_hash_init(&h);
#define MIX(f) mem_hash_mix(&h, &(a->f), sizeof(a->f));
#define BMIX(f) mem_hash_mix_num(&h, a->f);
- MIX(src);
MIX(hostentry);
MIX(from);
MIX(igp_metric);
@@ -1121,8 +1120,7 @@ rta_hash(rta *a)
static inline int
rta_same(rta *x, rta *y)
{
- return (x->src == y->src &&
- x->source == y->source &&
+ return (x->source == y->source &&
x->scope == y->scope &&
x->dest == y->dest &&
x->igp_metric == y->igp_metric &&
@@ -1212,7 +1210,6 @@ rta_lookup(rta *o)
r = rta_copy(o);
r->hash_key = h;
r->cached = 1;
- rt_lock_source(r->src);
rt_lock_hostentry(r->hostentry);
rta_insert(r);
@@ -1231,7 +1228,6 @@ rta__free(rta *a)
if (a->next)
a->next->pprev = a->pprev;
rt_unlock_hostentry(a->hostentry);
- rt_unlock_source(a->src);
if (a->nh.next)
nexthop_free(a->nh.next);
ea_free(a->eattrs);
@@ -1270,8 +1266,8 @@ rta_dump(rta *a)
"RTS_OSPF_EXT2", "RTS_BGP", "RTS_PIPE", "RTS_BABEL" };
static char *rtd[] = { "", " DEV", " HOLE", " UNREACH", " PROHIBIT" };
- debug("p=%s pref=%d uc=%d %s %s%s h=%04x",
- a->src->proto->name, a->pref, a->uc, rts[a->source], ip_scope_text(a->scope),
+ debug("pref=%d uc=%d %s %s%s h=%04x",
+ a->pref, a->uc, rts[a->source], ip_scope_text(a->scope),
rtd[a->dest], a->hash_key);
if (!a->cached)
debug(" !CACHED");