]> git.ipfire.org Git - thirdparty/strongswan.git/commit
charon-nm: Actually use the created XFRM interface
authorTobias Brunner <tobias@strongswan.org>
Fri, 23 Jun 2023 10:04:14 +0000 (12:04 +0200)
committerTobias Brunner <tobias@strongswan.org>
Wed, 26 Jul 2023 13:07:22 +0000 (15:07 +0200)
commit69e0c1161d54f0ecb5d18b0e0c5e39dcc69fba93
tree8e0df2ae4439d795d9fe36f3206eda87b4f8253c
parent36b1a6d76c1bc0d3bd1e3e7c04e89817c8b953e4
charon-nm: Actually use the created XFRM interface

The created XFRM interface was not actually used (no interface IDs on the
SAs, no routes via interface).  It was basically treated like the dummy
TUN device.  To actually install the routes via XFRM interface, we have
to create it before we install the SAs and policies, signal_ip_config()
happens too late.  We also have to mark the ESP packets the same as IKE
the packets to avoid a routing loop if the server's IP is included in
the remote traffic selector (in particular if it's 0.0.0.0/0 or ::/0).

Fixes: 58f278f93239 ("charon-nm: Use an XFRM interface if available")
src/charon-nm/nm/nm_service.c