diff options
author | Maria Matejka <mq@ucw.cz> | 2022-09-29 09:58:27 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-09-29 09:59:32 +0200 |
commit | 61c127c021ac34eba25d3245ccf8f9eb9dd352f5 (patch) | |
tree | 92108ea957c157ea1f8cbc8089cebb953dcad6d4 /proto/pipe/pipe.c | |
parent | 9be7aa9b450f22cec9c97143d0cb7650f4fd7cc9 (diff) | |
parent | 9efaf6bafea1c69629e59c6504980fb2986287fe (diff) |
Merge commit '9efaf6ba' into tmp-bad-learn
Also fixed forgotten best route selection among alien routes.
Diffstat (limited to 'proto/pipe/pipe.c')
-rw-r--r-- | proto/pipe/pipe.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/proto/pipe/pipe.c b/proto/pipe/pipe.c index 99d4b737..351db36b 100644 --- a/proto/pipe/pipe.c +++ b/proto/pipe/pipe.c @@ -123,10 +123,16 @@ pipe_postconfig(struct proto_config *CF) if (cc->table->addr_type != cf->peer->addr_type) cf_error("Primary table and peer table must have the same type"); + if (cc->out_subprefix && (cc->table->addr_type != cc->out_subprefix->type)) + cf_error("Export subprefix must match table type"); + + if (cf->in_subprefix && (cc->table->addr_type != cf->in_subprefix->type)) + cf_error("Import subprefix must match table type"); + if (cc->rx_limit.action) cf_error("Pipe protocol does not support receive limits"); - if (cc->in_keep_filtered) + if (cc->in_keep) cf_error("Pipe protocol prohibits keeping filtered routes"); cc->debug = cf->c.debug; @@ -142,6 +148,7 @@ pipe_configure_channels(struct pipe_proto *p, struct pipe_config *cf) .channel = cc->channel, .table = cc->table, .out_filter = cc->out_filter, + .out_subprefix = cc->out_subprefix, .in_limit = cc->in_limit, .ra_mode = RA_ANY, .debug = cc->debug, @@ -153,6 +160,7 @@ pipe_configure_channels(struct pipe_proto *p, struct pipe_config *cf) .channel = cc->channel, .table = cf->peer, .out_filter = cc->in_filter, + .out_subprefix = cf->in_subprefix, .in_limit = cc->out_limit, .ra_mode = RA_ANY, .debug = cc->debug, |