]> git.ipfire.org Git - thirdparty/strongswan.git/commit
child-cfg: Skip non-matching TS instead of replacing them for transport mode
authorTobias Brunner <tobias@strongswan.org>
Thu, 14 Jul 2022 11:22:55 +0000 (13:22 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 18 Jul 2022 10:44:20 +0000 (12:44 +0200)
commit833333eae90f8469ca3299e242d8b26e3caf0bf5
treecc6a66697ee5473a8e9c3a60e14d6991745b57ca
parent1f242e772b7076b32136d86d403e77874a8f83e4
child-cfg: Skip non-matching TS instead of replacing them for transport mode

get_traffic_selectors() is called the same way also as responder when
selecting child configs via peer_cfg_t::select_child_cfg().  Replacing
TS for all child configs could lead to selecting one that later fails
to actually narrow the traffic selectors.  Ignoring non-matching TS also
helps if we have a trap config with multiple remote subnets (otherwise,
we'd have to filter duplicates afterwards).

When installing traps, the hosts might be %any, in which case we allow
the configured (technically non-matching) TS for the wildcard use case.

Fixes: da82786b2d8c ("child-cfg: Always apply hosts to traffic selectors if proposing transport mode")
Closes strongswan/strongswan#1143
src/libcharon/config/child_cfg.c