Avoid touching F_MODIFY, it no longer exists.
This commit is contained in:
parent
6aea8905c4
commit
ccdc339756
1 changed files with 6 additions and 5 deletions
|
@ -114,7 +114,7 @@ do_rte_announce(struct announce_hook *a, net *net, rte *new, rte *old, ea_list *
|
|||
if ((class & IADDR_SCOPE_MASK) < p->min_scope ||
|
||||
(ok = p->import_control ? p->import_control(p, &new, &tmpa, rte_update_pool) : 0) < 0 ||
|
||||
(!ok && (p->out_filter == FILTER_REJECT ||
|
||||
p->out_filter && f_run(p->out_filter, &new, &tmpa, rte_update_pool) > F_MODIFY)
|
||||
p->out_filter && f_run(p->out_filter, &new, &tmpa, rte_update_pool) > F_ACCEPT)
|
||||
)
|
||||
)
|
||||
new = NULL;
|
||||
|
@ -127,7 +127,7 @@ do_rte_announce(struct announce_hook *a, net *net, rte *new, rte *old, ea_list *
|
|||
else
|
||||
{
|
||||
ea_list *tmpb = p->make_tmp_attrs ? p->make_tmp_attrs(old, rte_update_pool) : NULL;
|
||||
if (f_run(p->out_filter, &old, &tmpb, rte_update_pool) > F_MODIFY)
|
||||
if (f_run(p->out_filter, &old, &tmpb, rte_update_pool) > F_ACCEPT)
|
||||
old = NULL;
|
||||
}
|
||||
}
|
||||
|
@ -323,10 +323,11 @@ rte_update(rtable *table, net *net, struct proto *p, rte *new)
|
|||
tmpa = p->make_tmp_attrs(new, rte_update_pool);
|
||||
if (p->in_filter)
|
||||
{
|
||||
ea_list *old_tmpa = tmpa;
|
||||
int fr = f_run(p->in_filter, &new, &tmpa, rte_update_pool);
|
||||
if (fr > F_MODIFY)
|
||||
if (fr > F_ACCEPT)
|
||||
goto drop;
|
||||
if (fr == F_MODIFY && p->store_tmp_attrs)
|
||||
if (tmpa != old_tmpa && p->store_tmp_attrs)
|
||||
p->store_tmp_attrs(new, tmpa);
|
||||
}
|
||||
if (!(new->attrs->aflags & RTAF_CACHED)) /* Need to copy attributes */
|
||||
|
@ -542,7 +543,7 @@ rt_show_net(struct cli *c, net *n, struct rt_show_data *d)
|
|||
struct ea_list *tmpa = NULL;
|
||||
ee = e;
|
||||
rte_update_lock(); /* We use the update buffer for filtering */
|
||||
if (d->filter == FILTER_ACCEPT || f_run(d->filter, &ee, &tmpa, rte_update_pool) <= F_MODIFY)
|
||||
if (d->filter == FILTER_ACCEPT || f_run(d->filter, &ee, &tmpa, rte_update_pool) <= F_ACCEPT)
|
||||
{
|
||||
rt_show_rte(c, ia, e, d);
|
||||
ia[0] = 0;
|
||||
|
|
Loading…
Reference in a new issue