[Openswan Users] Pluto using system command
Donald.Goffe at GTECH.COM
Tue Mar 20 10:20:36 EDT 2012
I have had Openswan and Pluto running for some time now and have just noticed that randomly
when I issue the system() command it returns a -1 indicating error.
My monitor application may run for 1/2 hour without any failures then not work.
The system probes IPsec for status to see if the tunnel is blocked every 30 seconds.
Each time thru the loop it first deletes the old status file with an f=fopen("/tmp/connection","w") then fclose(f); Creating a blank new file.
The application then uses the system(file) command. Where file is "ipsec auto --status | grep 'connection * STATE_MAIN_I4' > /tmp/connection"
Does anyone know why the system call would randomly fail in this manner? Ipsec auto --status shows tunnel up and active.
Also if I sleep( 20) seconds to see if Pluto is busy and issue the command again it still fails.
Thanks for any help.
-------------- next part --------------
CONFIDENTIALITY NOTICE: The information contained in this email message is intended only for use of the intended recipient. If the reader of this message is not the intended recipient, you are hereby notified that any dissemination, distribution or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately delete it from your system and notify the sender by replying to this email. ?Thank you.
More information about the Users