summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Mares <mj@ucw.cz>2000-01-16 17:49:32 +0000
committerMartin Mares <mj@ucw.cz>2000-01-16 17:49:32 +0000
commit30a6108cccac93048440113211df2eed1fb541b1 (patch)
tree9adf2f46ed0e805d900cbcd2530acbb2bcd109cd
parentbf8558bc9cab35f31bccd6a55e51f121370765c4 (diff)
Added filter_same() for comparision of two filters.
Pavel, please implement this as soon as possible.
-rw-r--r--TODO3
-rw-r--r--filter/filter.c7
-rw-r--r--filter/filter.h1
-rw-r--r--nest/proto.c4
4 files changed, 10 insertions, 5 deletions
diff --git a/TODO b/TODO
index e932761a..b998bc24 100644
--- a/TODO
+++ b/TODO
@@ -25,8 +25,6 @@ Core
- config: executable config files
- config: when parsing prefix, check zero bits
-- config: reconfiguration
-- config: reconfiguration of filters
- config: useless rules when protocols disabled
- config: remove protocol startup priority hacks?
- config: better datetime format
@@ -54,7 +52,6 @@ show <name> # show everything you know about symbol <name>
Roadmap
~~~~~~~
-- Dynamic reconfiguration
- Allocators and data structures
- Client
- Remaining bits of IPv6 support (radvd)
diff --git a/filter/filter.c b/filter/filter.c
index 84e039b7..558ee61e 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -444,3 +444,10 @@ filters_postconfig(void)
printf( "done\n" );
}
}
+
+int
+filter_same(struct filter *new, struct filter *old)
+{
+ /* FIXME: This has to be defined! */
+ return new == old;
+}
diff --git a/filter/filter.h b/filter/filter.h
index 79d14da4..2fe66539 100644
--- a/filter/filter.h
+++ b/filter/filter.h
@@ -67,6 +67,7 @@ struct rte;
int f_run(struct filter *filter, struct rte **rte, struct ea_list **tmp_attrs, struct linpool *tmp_pool);
char *filter_name(struct filter *filter);
+int filter_same(struct filter *new, struct filter *old);
int val_compare(struct f_val v1, struct f_val v2);
void val_print(struct f_val v);
diff --git a/nest/proto.c b/nest/proto.c
index 36829bfd..84b9cd82 100644
--- a/nest/proto.c
+++ b/nest/proto.c
@@ -228,8 +228,8 @@ protos_commit(struct config *new, struct config *old, int force_reconfig)
&& nc->preference == oc->preference
&& nc->disabled == oc->disabled
&& nc->table->table == oc->table->table
- && nc->in_filter == oc->in_filter
- && nc->out_filter == oc->out_filter
+ && filter_same(nc->in_filter, oc->in_filter)
+ && filter_same(nc->out_filter, oc->out_filter)
&& p->proto_state != PS_DOWN)
{
/* Generic attributes match, try converting them and then ask the protocol */