diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2015-02-21 21:08:23 +0100 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2015-02-21 21:08:23 +0100 |
commit | 2bbc308321894e0fd301766e8d7d78a4ec119053 (patch) | |
tree | cd3b8bab72022801655ad6b420ace93267b29f07 /proto/pipe/pipe.c | |
parent | 374917adccb955fbb2796955166fabe46a09e096 (diff) |
Store protocol config size inside protocol structure
Make proto_config_new() use this info instead of supplied size.
Thanks to Alexander V. Chernikov for the patch.
Diffstat (limited to 'proto/pipe/pipe.c')
-rw-r--r-- | proto/pipe/pipe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index d6ef153a..6ef80322 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -247,7 +247,7 @@ pipe_reconfigure(struct proto *P, struct proto_config *new) if ((P->proto_state != PS_UP) || (proto_reconfig_type == RECONFIG_SOFT)) return 1; - + if ((new->preference != old->preference) || ! filter_same(new->in_filter, old->in_filter) || ! filter_same(new->out_filter, old->out_filter)) @@ -298,7 +298,7 @@ pipe_show_stats(struct pipe_proto *p) * (imp/exp), while stats s2 have switched 'polarity'. */ - cli_msg(-1006, " Routes: %u imported, %u exported", + cli_msg(-1006, " Routes: %u imported, %u exported", s1->imp_routes, s2->imp_routes); cli_msg(-1006, " Route change stats: received rejected filtered ignored accepted"); cli_msg(-1006, " Import updates: %10u %10u %10u %10u %10u", @@ -340,6 +340,7 @@ struct protocol proto_pipe = { .template = "pipe%d", .multitable = 1, .preference = DEF_PREF_PIPE, + .config_size = sizeof(struct pipe_config), .postconfig = pipe_postconfig, .init = pipe_init, .start = pipe_start, |