diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2012-04-24 23:39:57 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2012-04-24 23:39:57 +0200 |
commit | d9b77cc28115e5c1ef64c69722c9d1fd1392dcd1 (patch) | |
tree | 5dae59203a8455874fdcdabc0b74ff69d9e67f6e /proto/pipe | |
parent | 3589546af4baa4d349409a318f8c9658dd11b3cc (diff) |
Implements generalized export limits.
And also fixes some minor bugs in limits.
Diffstat (limited to 'proto/pipe')
-rw-r--r-- | proto/pipe/config.Y | 1 | ||||
-rw-r--r-- | proto/pipe/pipe.c | 6 | ||||
-rw-r--r-- | proto/pipe/pipe.h | 1 |
3 files changed, 3 insertions, 5 deletions
diff --git a/proto/pipe/config.Y b/proto/pipe/config.Y index 4fb2b499..40637558 100644 --- a/proto/pipe/config.Y +++ b/proto/pipe/config.Y @@ -36,7 +36,6 @@ pipe_proto: cf_error("Routing table name expected"); PIPE_CFG->peer = $4->def; } - | pipe_proto EXPORT LIMIT limit_spec ';' { PIPE_CFG->out_limit = $4; } | pipe_proto MODE OPAQUE ';' { PIPE_CFG->mode = PIPE_OPAQUE; } | pipe_proto MODE TRANSPARENT ';' { PIPE_CFG->mode = PIPE_TRANSPARENT; } ; diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 41bac474..6099d284 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -170,7 +170,7 @@ pipe_start(struct proto *P) p->peer_ahook = proto_add_announce_hook(P, p->peer_table, &p->peer_stats); p->peer_ahook->out_filter = cf->c.in_filter; - p->peer_ahook->in_limit = cf->out_limit; + p->peer_ahook->in_limit = cf->c.out_limit; proto_reset_limit(p->peer_ahook->in_limit); return PS_UP; @@ -225,7 +225,7 @@ pipe_reconfigure(struct proto *P, struct proto_config *new) if (p->peer_ahook) { p->peer_ahook->out_filter = new->in_filter; - p->peer_ahook->in_limit = nc->out_limit; + p->peer_ahook->in_limit = new->out_limit; } if ((P->proto_state != PS_UP) || (proto_reconfig_type == RECONFIG_SOFT)) @@ -311,7 +311,7 @@ pipe_show_proto_info(struct proto *P) cli_msg(-1006, " Output filter: %s", filter_name(cf->c.out_filter)); proto_show_limit(cf->c.in_limit, "Import limit:"); - proto_show_limit(cf->out_limit, "Export limit:"); + proto_show_limit(cf->c.out_limit, "Export limit:"); if (P->proto_state != PS_DOWN) pipe_show_stats(p); diff --git a/proto/pipe/pipe.h b/proto/pipe/pipe.h index e777fb41..50b31698 100644 --- a/proto/pipe/pipe.h +++ b/proto/pipe/pipe.h @@ -15,7 +15,6 @@ struct pipe_config { struct proto_config c; struct rtable_config *peer; /* Table we're connected to */ - struct proto_limit *out_limit; /* Export route limit */ int mode; /* PIPE_OPAQUE or PIPE_TRANSPARENT */ }; |