Hi Volodymyr,
> So, the question is - what I'm doing wrong and how to do in order to get
> the desired result?
You can't use the same session you are currently streaming on (i.e.
enumerating SAs) to send another request (i.e. terminating SAs).
So either store the IDs of the SAs you want to termi
Hi Volodymyr,
> thanks a lot, it works. It worth to say, that timeout must be set to
> reasonable value to allow Strongswan to finish the task. If set to -1 or
> few milliseconds, it returns failure as well :)
If you are referring to the returned error "terminating SA failed",
that's because with
Hi Tobias,
in fact, I see a bit different behaviour. Having the following code:
t = v.terminate({
'ike-id': ike_id,
'timeout': 5000
})
try:
for c in t:
pass
except Exception as e:
print(e)
nothing happens to IKE_SA if I omit "for c in
Hi Volodymyr,
> Processing starts only upon iterating of "t". This is every-time
> reproduceable behaviour.
That's because terminate() (and any other command wrapper that uses
streamed_request()) returns a Python generator, which is only evaluated
once you enumerate it. If you are not interested
Great, Tobias,
thanks!
On 03.12.2019 14:10, Tobias Brunner wrote:
Hi Volodymyr,
Processing starts only upon iterating of "t". This is every-time
reproduceable behaviour.
That's because terminate() (and any other command wrapper that uses
streamed_request()) returns a Python generator, which