Some minor fixes.
This commit is contained in:
parent
d9b77cc281
commit
d494df63ac
4 changed files with 9 additions and 9 deletions
|
@ -60,7 +60,7 @@ ipv4_class_mask(u32 a)
|
||||||
|
|
||||||
if (a < 0x80000000)
|
if (a < 0x80000000)
|
||||||
m = 0xff000000;
|
m = 0xff000000;
|
||||||
if (a < 0xc0000000)
|
else if (a < 0xc0000000)
|
||||||
m = 0xffff0000;
|
m = 0xffff0000;
|
||||||
else
|
else
|
||||||
m = 0xffffff00;
|
m = 0xffffff00;
|
||||||
|
|
|
@ -1781,14 +1781,14 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
|
||||||
d->net_counter++;
|
d->net_counter++;
|
||||||
for(e=n->routes; e; e=e->next)
|
for(e=n->routes; e; e=e->next)
|
||||||
{
|
{
|
||||||
struct ea_list *tmpa, *old_tmpa;
|
struct ea_list *tmpa;
|
||||||
struct proto *p0 = e->attrs->proto;
|
struct proto *p0 = e->attrs->proto;
|
||||||
struct proto *p1 = d->export_protocol;
|
struct proto *p1 = d->export_protocol;
|
||||||
struct proto *p2 = d->show_protocol;
|
struct proto *p2 = d->show_protocol;
|
||||||
d->rt_counter++;
|
d->rt_counter++;
|
||||||
ee = e;
|
ee = e;
|
||||||
rte_update_lock(); /* We use the update buffer for filtering */
|
rte_update_lock(); /* We use the update buffer for filtering */
|
||||||
old_tmpa = tmpa = p0->make_tmp_attrs ? p0->make_tmp_attrs(e, rte_update_pool) : NULL;
|
tmpa = p0->make_tmp_attrs ? p0->make_tmp_attrs(e, rte_update_pool) : NULL;
|
||||||
ok = (d->filter == FILTER_ACCEPT || f_run(d->filter, &e, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) <= F_ACCEPT);
|
ok = (d->filter == FILTER_ACCEPT || f_run(d->filter, &e, &tmpa, rte_update_pool, FF_FORCE_TMPATTR) <= F_ACCEPT);
|
||||||
if (p2 && p2 != p0) ok = 0;
|
if (p2 && p2 != p0) ok = 0;
|
||||||
if (ok && d->export_mode)
|
if (ok && d->export_mode)
|
||||||
|
|
|
@ -1145,16 +1145,16 @@ show_lsa_sum_net(struct top_hash_entry *he)
|
||||||
static inline void
|
static inline void
|
||||||
show_lsa_sum_rt(struct top_hash_entry *he)
|
show_lsa_sum_rt(struct top_hash_entry *he)
|
||||||
{
|
{
|
||||||
u32 dst_rid, options;
|
u32 dst_rid;
|
||||||
|
|
||||||
#ifdef OSPFv2
|
#ifdef OSPFv2
|
||||||
struct ospf_lsa_sum *ls = he->lsa_body;
|
struct ospf_lsa_sum *ls = he->lsa_body;
|
||||||
dst_rid = he->lsa.id;
|
dst_rid = he->lsa.id;
|
||||||
options = 0;
|
// options = 0;
|
||||||
#else /* OSPFv3 */
|
#else /* OSPFv3 */
|
||||||
struct ospf_lsa_sum_rt *ls = he->lsa_body;
|
struct ospf_lsa_sum_rt *ls = he->lsa_body;
|
||||||
dst_rid = ls->drid;
|
dst_rid = ls->drid;
|
||||||
options = ls->options & OPTIONS_MASK;
|
// options = ls->options & OPTIONS_MASK;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
cli_msg(-1016, "\t\txrouter %R metric %u", dst_rid, ls->metric);
|
cli_msg(-1016, "\t\txrouter %R metric %u", dst_rid, ls->metric);
|
||||||
|
|
|
@ -798,7 +798,7 @@ originate_sum_net_lsa(struct ospf_area *oa, struct fib_node *fn, int metric)
|
||||||
|
|
||||||
body = originate_sum_net_lsa_body(po, &lsa.length, fn, metric);
|
body = originate_sum_net_lsa_body(po, &lsa.length, fn, metric);
|
||||||
lsasum_calculate(&lsa, body);
|
lsasum_calculate(&lsa, body);
|
||||||
en = lsa_install_new(po, &lsa, dom, body);
|
lsa_install_new(po, &lsa, dom, body);
|
||||||
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ originate_sum_rt_lsa(struct ospf_area *oa, struct fib_node *fn, int metric, u32
|
||||||
|
|
||||||
body = originate_sum_rt_lsa_body(po, &lsa.length, lsa.id, metric, options);
|
body = originate_sum_rt_lsa_body(po, &lsa.length, lsa.id, metric, options);
|
||||||
lsasum_calculate(&lsa, body);
|
lsasum_calculate(&lsa, body);
|
||||||
en = lsa_install_new(po, &lsa, dom, body);
|
lsa_install_new(po, &lsa, dom, body);
|
||||||
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1117,7 +1117,7 @@ originate_ext_lsa(struct ospf_area *oa, struct fib_node *fn, int src,
|
||||||
if (src)
|
if (src)
|
||||||
fn->x1 = src;
|
fn->x1 = src;
|
||||||
|
|
||||||
en = lsa_install_new(po, &lsa, dom, body);
|
lsa_install_new(po, &lsa, dom, body);
|
||||||
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
ospf_lsupd_flood(po, NULL, NULL, &lsa, dom, 1);
|
||||||
|
|
||||||
if (po->ebit == 0)
|
if (po->ebit == 0)
|
||||||
|
|
Loading…
Reference in a new issue