diff options
author | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-06-14 20:02:50 +0200 |
---|---|---|
committer | Ondrej Zajicek (work) <santiago@crfreenet.org> | 2021-06-14 20:02:50 +0200 |
commit | 1b9bf4e192a252db861acadc7f800d7046435a3f (patch) | |
tree | dbee8d877f2d547b6962f60f3e2a20965b5d74d6 | |
parent | 3ebabab2778d05212cc07ebccf583159d5e0890a (diff) |
Nest: Fix export of tmpattrs through pipes
Pipes copy the original rte with old values, so they require rte to be
exported with stored tmpattrs. Other protocols access stored attributes
using eattr list, so they require rte to be exported with expanded
tmpattrs. This is temporary hack, we plan to remove whoe tmpattr mechanism.
Thanks to Paul Donohue for the bugreport.
-rw-r--r-- | nest/rt-table.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nest/rt-table.c b/nest/rt-table.c index 13209dd7..390b3277 100644 --- a/nest/rt-table.c +++ b/nest/rt-table.c @@ -618,6 +618,12 @@ export_filter_(struct channel *c, rte *rt0, rte **rt_free, linpool *pool, int si goto reject; } +#ifdef CONFIG_PIPE + /* Pipes need rte with stored tmpattrs, remaining protocols need expanded tmpattrs */ + if (p->proto == &proto_pipe) + rte_store_tmp_attrs(rt, pool, NULL); +#endif + accept: if (rt != rt0) *rt_free = rt; |