summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>1999-12-16 13:59:09 +0100
committerMartin Mares <mj@ucw.cz>1999-12-16 13:59:09 +0100
commitccdc33975648647270bf33511ec5bbab4d634634 (patch)
tree8a4b59de3c689c05dffa45f087058c1ec31aca18
parent6aea8905c4f0c2b0da6061b445894496e473145d (diff)
downloadbird-ccdc33975648647270bf33511ec5bbab4d634634.tar
bird-ccdc33975648647270bf33511ec5bbab4d634634.zip
Avoid touching F_MODIFY, it no longer exists.
-rw-r--r--nest/rt-table.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c
index dc13ea7..401c5f8 100644
--- a/nest/rt-table.c
+++ b/nest/rt-table.c
@@ -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;