]> git.ipfire.org Git - people/ms/strongswan.git/commit
child-sa: Do not install mark on inbound kernel SA
authorEyal Birger <eyal.birger@gmail.com>
Wed, 25 Jan 2017 10:26:42 +0000 (12:26 +0200)
committerTobias Brunner <tobias@strongswan.org>
Tue, 14 Feb 2017 17:34:15 +0000 (18:34 +0100)
commit067fd2c69c25b0f7de92bf78d5542bfdbf9def26
tree31f8a1755f866b41df3cef34d385c6ed08d9012e
parent8a0bbb9355faeb287d08707233427cf47baef4ff
child-sa: Do not install mark on inbound kernel SA

The SA ID (src, dst, proto, spi) is unique on ingress.

As such, explicit inbound marking is not needed to match an SA.

On the other hand, requiring inbound SAs to use marks forces the
installation of a mechanism for marking traffic (e.g. iptables) based
on some criteria.

Defining the criteria becomes complicated, for example when required to
support multiple SAs from the same src, especially when traffic is UDP
encapsulated.

This commit removes the assignment of the child_sa mark_in to the inbound SA.

Policies can be arbitrated by existing means - e.g, via netfilter policy
matching or using VTI interfaces - without the need to classify the flows prior
to state matching.

Since the reqid allocator regards the mark value, there is no risk of matching
the wrong policy.

And as explicit marking was required for route-based VPN to work before this
change, it should not cause regressions in existing setups.

Closes strongswan/strongswan#59.
src/libcharon/sa/child_sa.c