Renamed attr->attrs to attr->eattrs.
This commit is contained in:
parent
6dc7a0cb39
commit
2727bb7c5b
5 changed files with 15 additions and 15 deletions
|
@ -208,7 +208,7 @@ typedef struct rta {
|
||||||
ip_addr gw; /* Next hop */
|
ip_addr gw; /* Next hop */
|
||||||
ip_addr from; /* Advertising router */
|
ip_addr from; /* Advertising router */
|
||||||
struct iface *iface; /* Outgoing interface */
|
struct iface *iface; /* Outgoing interface */
|
||||||
struct ea_list *attrs; /* Extended Attribute chain */
|
struct ea_list *eattrs; /* Extended Attribute chain */
|
||||||
} rta;
|
} rta;
|
||||||
|
|
||||||
#define RTS_DUMMY 0 /* Dummy route to be removed soon */
|
#define RTS_DUMMY 0 /* Dummy route to be removed soon */
|
||||||
|
@ -305,7 +305,7 @@ void rta__free(rta *r);
|
||||||
static inline void rta_free(rta *r) { if (r && !--r->uc) rta__free(r); }
|
static inline void rta_free(rta *r) { if (r && !--r->uc) rta__free(r); }
|
||||||
void rta_dump(rta *);
|
void rta_dump(rta *);
|
||||||
void rta_dump_all(void);
|
void rta_dump_all(void);
|
||||||
static inline eattr * rta_find(rta *a, unsigned ea) { return ea_find(a->attrs, ea); }
|
static inline eattr * rta_find(rta *a, unsigned ea) { return ea_find(a->eattrs, ea); }
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Default protocol preferences
|
* Default protocol preferences
|
||||||
|
|
|
@ -275,7 +275,7 @@ rta_same(rta *x, rta *y)
|
||||||
ipa_equal(x->gw, y->gw) &&
|
ipa_equal(x->gw, y->gw) &&
|
||||||
ipa_equal(x->from, y->from) &&
|
ipa_equal(x->from, y->from) &&
|
||||||
x->iface == y->iface &&
|
x->iface == y->iface &&
|
||||||
ea_same(x->attrs, y->attrs));
|
ea_same(x->eattrs, y->eattrs));
|
||||||
}
|
}
|
||||||
|
|
||||||
static rta *
|
static rta *
|
||||||
|
@ -285,7 +285,7 @@ rta_copy(rta *o)
|
||||||
|
|
||||||
memcpy(r, o, sizeof(rta));
|
memcpy(r, o, sizeof(rta));
|
||||||
r->uc = 1;
|
r->uc = 1;
|
||||||
r->attrs = ea_list_copy(o->attrs);
|
r->eattrs = ea_list_copy(o->eattrs);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -295,15 +295,15 @@ rta_lookup(rta *o)
|
||||||
rta *r;
|
rta *r;
|
||||||
|
|
||||||
ASSERT(!(o->aflags & RTAF_CACHED));
|
ASSERT(!(o->aflags & RTAF_CACHED));
|
||||||
if (o->attrs)
|
if (o->eattrs)
|
||||||
{
|
{
|
||||||
if (o->attrs->next) /* Multiple ea_list's, need to merge them */
|
if (o->eattrs->next) /* Multiple ea_list's, need to merge them */
|
||||||
{
|
{
|
||||||
ea_list *ml = alloca(ea_scan(o->attrs));
|
ea_list *ml = alloca(ea_scan(o->eattrs));
|
||||||
ea_merge(o->attrs, ml);
|
ea_merge(o->eattrs, ml);
|
||||||
o->attrs = ml;
|
o->eattrs = ml;
|
||||||
}
|
}
|
||||||
ea_sort(o->attrs);
|
ea_sort(o->eattrs);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(r=first_rta; r; r=r->next)
|
for(r=first_rta; r; r=r->next)
|
||||||
|
@ -347,10 +347,10 @@ rta_dump(rta *a)
|
||||||
debug(" ->%I", a->gw);
|
debug(" ->%I", a->gw);
|
||||||
if (a->dest == RTD_DEVICE || a->dest == RTD_ROUTER)
|
if (a->dest == RTD_DEVICE || a->dest == RTD_ROUTER)
|
||||||
debug(" [%s]", a->iface ? a->iface->name : "???" );
|
debug(" [%s]", a->iface ? a->iface->name : "???" );
|
||||||
if (a->attrs)
|
if (a->eattrs)
|
||||||
{
|
{
|
||||||
debug(" EA: ");
|
debug(" EA: ");
|
||||||
ea_dump(a->attrs);
|
ea_dump(a->eattrs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ dev_ifa_notify(struct proto *p, unsigned c, struct ifa *ad)
|
||||||
A.cast = RTC_UNICAST;
|
A.cast = RTC_UNICAST;
|
||||||
A.dest = RTD_DEVICE;
|
A.dest = RTD_DEVICE;
|
||||||
A.iface = ad->iface;
|
A.iface = ad->iface;
|
||||||
A.attrs = NULL;
|
A.eattrs = NULL;
|
||||||
a = rta_lookup(&A);
|
a = rta_lookup(&A);
|
||||||
if (ad->flags & IF_UNNUMBERED)
|
if (ad->flags & IF_UNNUMBERED)
|
||||||
n = net_get(p->table, ad->opposite, ad->pxlen);
|
n = net_get(p->table, ad->opposite, ad->pxlen);
|
||||||
|
|
|
@ -95,7 +95,7 @@ krt_parse_entry(byte *ent, struct krt_proto *p)
|
||||||
a.flags = a.aflags = 0;
|
a.flags = a.aflags = 0;
|
||||||
a.from = IPA_NONE;
|
a.from = IPA_NONE;
|
||||||
a.iface = NULL;
|
a.iface = NULL;
|
||||||
a.attrs = NULL;
|
a.eattrs = NULL;
|
||||||
|
|
||||||
if (flags & RTF_GATEWAY)
|
if (flags & RTF_GATEWAY)
|
||||||
{
|
{
|
||||||
|
|
|
@ -642,7 +642,7 @@ nl_parse_route(struct nlmsghdr *h, int scan)
|
||||||
ra.from = IPA_NONE;
|
ra.from = IPA_NONE;
|
||||||
ra.gw = IPA_NONE;
|
ra.gw = IPA_NONE;
|
||||||
ra.iface = NULL;
|
ra.iface = NULL;
|
||||||
ra.attrs = NULL;
|
ra.eattrs = NULL;
|
||||||
|
|
||||||
switch (i->rtm_type)
|
switch (i->rtm_type)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue