<p>Hi,<br /><br />Thanks - it helped me a lot. <br /><br />I encounter now problems with the child SA management where a call to terminate() fails - and I don't why :-( . <br /><br />Here is what I do:<br />1a- I create a vici connexion with 1 child (child1) & a set a traffic selectors (TS1)<br />1b - Create a tunnel IKE2 with a remote device corresponding to this vici connexion<br />2a - Dynamically I create a new child (child2) in the vici connexion configuration with one additional traffic selector TS2 (no overlap TS1 as it seems to be impossible)<br />2b - I call the vici python intiate() function to instanciate child2 SA -> it runs OK : using swanctl --list-sas, I check that the two SA are here.<br />3a - Dynamically I modify child2 in the vici connexion configuration to add one additional traffic selector TS3 to TS2 <br />3b - I call vici python terminate() & to initiate() functions to get a new child2 SA -> it runs OK but using swanctl --list-sas, I can see two different child1 SAs (with the same parameters?!?) and one child2 SA.<br />4a - Dynamically I modify child2 in the vici connexion configuration to add one additional traffic selector TS4 to TS3 & TS2 <br />4b - I call vici python terminate() & to initiate() functions to get a new child2 SA -> it FAILS and tries to restart the tunnel with new parameters (& new reauthentication). The exception happens during the call to terminate(). I get an exception : <br /> File "/usr/local/lib/python2.7/dist-packages/vici/session.py", line 362, in streamed_request<br /> errmsg=command_response["errmsg"]<br /> CommandException: Command failed: terminating SA failed<br />The problem may happen in a 5b iteration if not in 4b. <br /><br />The problem is not the exception but why the call to terminate() fails, of course. <br />Do I miss something in the child SAs management? <br /><br />thanks,<br /><br />Régis</p>
<p> </p>
<p> </p>
<p> </p>
<p> </p>
<blockquote style="padding-left: 5px; margin-left: 5px; border-left: #ff0000 2px solid;">> Message du 28/08/17 17:48<br />> De : "Noel Kuntze" <noel.kuntze+strongswan-users-ml@thermi.consulting><br />> A : "FRECHIN and Co" <regis.frechin22@orange.fr>, "Sarefrech" <sarefrech@wanadoo.fr>, users@lists.strongswan.org<br />> Copie à : <br />> Objet : Re: [strongSwan] Traffic selector modification ignored when rekeying SA [follow-up]<br />> <br />> def unloadConn(self, id): return self.session.unload_conn({ "name" : str(id) }) def initiateConn(self, id): uniqueid=None for i in self.session.initiate( { "child" : str(id) } ): uniqueid = i["ikesa-uniqueid"] return uniqueid def terminateConn(self, id): for i in self.session.terminate( { "ike" : (id) } ): pass On 28.08.2017 17:40, FRECHIN and Co wrote: > > > > Hi all, > > > > I'm now looking for the right syntax to call "terminate()" & "initiate()" functions through vici with python. I succeed in making calls to load_conn() but not to these 2 functions. > > > > Would you have a code extract to share I could reuse? > > > > thanks, > > > > Régis > > > > > > > > > > > > > Message du 25/08/17 17:59 > > De : "Sarefrech" <sarefrech@wanadoo.fr> > > A : users@lists.strongswan.org > > Copie à : > > Objet : [strongSwan] Traffic selector modification ignored when rekeying SA [follow-up] > > > > > > > Hi all, > > > > > > I think my previous emails got blocked because I did not use my strongswan registered email address. I'll then try to summarize what I did. > > > As a reminder : > > > - the main issue is that traffic selector list update for a given running SA is not taken into account at rekeying time. :-( > > > - I use Vici with python > > > > > > I followed a suggestion that was : > > > - to setup a tunnel with its default SAs (child1) -> works fine with a basic config file. > > > - to create a second child SA (child2) with the updated TS list in the connexion list -> I use the vici python load_conn function : works fine. > > > - to activate this "child2" SA -> I'm supposed to use the activate function I guess. here I have 2 pbs : > > > I am unable to use the python vici function that seems to accept only 1 parameter (the child name). I think I need to fill the connexion name somewhere else. > > > Using the "swanctl --initiate ..." command (as a wokaround), I got one step further but got the error " unable to install policy... " as the same TS are used for child1 & child2. As a result the command fails and the tunnel is restarted. > - to terminate the initial SA -> I did no manage to use the python vici terminate function. > > > > > > Does somebody out there use python vici interface & could help me? > > > > > > thanks, > > > > > > Régis > > > > > > > > > > > > > > > ------------------------------ > > > Hi all, > > > > > > I'm using vici to define & dynamically change traffic selectors associated with a connexion (using ikev2). > > > > > > I observe that traffic selector list modifications are not taken into account at rekey time but only at reauthentication time. > > > I used "Linux strongSwan U5.5.3/K3.16.0-4-amd64" version and recently switched to "Linux strongSwan U5.5.0/K3.16.0-4-amd64". > > > Is there a way to force TS modification at rekeying time ? > > > > thanks - Best regards, > > Régis > <br />><br />> [ signature.asc (0.8 Ko) ]</blockquote>