]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Make sure we successfully opened xfrm_acq_expires
authorTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 16:54:28 +0000 (18:54 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 28 Sep 2012 16:54:28 +0000 (18:54 +0200)
src/libhydra/plugins/kernel_netlink/kernel_netlink_ipsec.c

index ed7a622b5191060f470022304e7c75fcfaf7180b..4f5b6600d0ec0a374a8a6185b168d562d85adab2 100644 (file)
@@ -2741,7 +2741,7 @@ kernel_netlink_ipsec_t *kernel_netlink_ipsec_create()
 
        /* disable lifetimes for allocated SPIs in kernel */
        fd = open("/proc/sys/net/core/xfrm_acq_expires", O_WRONLY);
-       if (fd)
+       if (fd > 0)
        {
                ignore_result(write(fd, "165", 3));
                close(fd);