]> git.ipfire.org Git - thirdparty/strongswan.git/commit - testing/do-tests
testing: Ignore IP-in-IP SAs created with IPComp SAs that remain in the kernel
authorTobias Brunner <tobias@strongswan.org>
Thu, 1 Feb 2018 16:10:19 +0000 (17:10 +0100)
committerTobias Brunner <tobias@strongswan.org>
Thu, 1 Feb 2018 16:10:19 +0000 (17:10 +0100)
commit4492c9c670f5b0dc30dd4d00ffc4c371ae40a01f
tree27dc70fc85c6b654842075c3bb86cc17c09677b7
parent3c5b010f5bb6c8f4081d8a4067bbf553ccdb8445
testing: Ignore IP-in-IP SAs created with IPComp SAs that remain in the kernel

The kernel creates such SAs to handle uncompressed small packets.  They
are implicitly created and deleted with IPComp SAs.  The problem is that
when we delete an IPComp SA only that state is deleted and removed from
the SA lists immediately, the IP-in-IP state is not removed until the IPComp
state is eventually destroyed.  This could take a while if there are still
references to it around.  So the IP-in-IP states will keep getting reported
by ip xfrm state until that happens (we also can't flush or explicitly delete
such kernel-created states).

In kernels before 4.14 this wasn't really a problem but since
ec30d78c14a8 ("xfrm: add xdst pcpu cache") the kernel seems to keep the
references to the last used SAs around a lot longer.

Also, usually a test scenario following an IPComp scenario will create
and use new SAs and thus the cached SAs will disappear before the kernel
state is checked again.  However, if a following scenario uses different
hosts the states might remain, which caused some unrelated scenarios to
fail before adding this fix.
testing/do-tests