diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-09 14:36:11 +0100 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2018-01-09 14:36:11 +0100 |
commit | 94f9be80c3686284942ba73670780d27730da997 (patch) | |
tree | 154a869ba620639a112b6d61f528bf28c87313ba | |
parent | 8f8671bcde738890d312ab91336f101465b3eeac (diff) |
Nest: Fix filter reconfiguration
Function filter_same() must be called with arguments in proper order,
otherwise it breaks the new filter, causing crash during route
processing.
-rw-r--r-- | nest/proto.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/nest/proto.c b/nest/proto.c index d7650517..e103fec6 100644 --- a/nest/proto.c +++ b/nest/proto.c @@ -513,8 +513,9 @@ channel_reconfigure(struct channel *c, struct channel_config *cf) if ((c->table != cf->table->table) || (cf->ra_mode && (c->ra_mode != cf->ra_mode))) return 0; - int import_changed = !filter_same(c->in_filter, cf->in_filter); - int export_changed = !filter_same(c->out_filter, cf->out_filter); + /* Note that filter_same() requires arguments in (new, old) order */ + int import_changed = !filter_same(cf->in_filter, c->in_filter); + int export_changed = !filter_same(cf->out_filter, c->out_filter); if (c->preference != cf->preference) import_changed = 1; |