[Swan] Error codes

John Crisp jcrisp at safeandsoundit.co.uk
Thu Mar 5 12:14:48 EET 2015


Another query.

I am calling ipsec via a perl routine as below. rereadsecrets seems to
run ok, but auto --replace throws an error :

ipsec replace failed( error code 1280)

However, it seems to have completed correctly so my guess is this is
actually an 'OK' ? Is there any information on status/output codes ?

B. Rgds
John

# This seems to be OK and returns a '0' :

print " ReReading Secrets \n ";
my $reread = qx(/usr/sbin/ipsec auto --rereadsecrets);

die(" Unable launch ipsec reread secrets : $! \n ")
  if not defined $reread;
die(" ipsec reread secrets failed( error code $?) \n ") if $?;


# This throws an error code 1280

print " Restarting connection $connectionName\n ";
my $restart = qx(/usr/sbin/ipsec auto --replace $connectionName);

die(" Unable to launch ipsec replace : $! \n ")
  if not defined $restart;
die(" ipsec replace failed( error code $?) \n ") if $?;

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: OpenPGP digital signature
URL: <https://lists.libreswan.org/pipermail/swan/attachments/20150305/37e7485c/attachment.sig>


More information about the Swan mailing list