ipsec gre: Don't cache bad ovs-monitor-ipsec pid values.
authorJustin Pettit <jpettit@nicira.com>
Sun, 8 Jul 2012 20:04:27 +0000 (13:04 -0700)
committerJustin Pettit <jpettit@nicira.com>
Sun, 8 Jul 2012 20:21:11 +0000 (13:21 -0700)
Commit 2a586a5 (ipsec gre: Do not reread ovs monitor ipsec pidfile in
netdev vport so much) attempts to cache the pid of ovs-monitor-ipsec so
that it's not re-checked so often.  Unfortunately, it also cached error
returns, so errors never recover.  This commit continues to check for
the process's existence after an error.

Issue #12399

Reported-by: Paul Ingram <paul@nicira.com>
Signed-off-by: Justin Pettit <jpettit@nicira.com>
lib/netdev-vport.c

index d2c2672b024974abe27d684af82d69617375a919..836069f7038544bb4050e0e2ee455b75b361e0f7 100644 (file)
@@ -682,7 +682,7 @@ parse_tunnel_config(const char *name, const char *type,
 
     if (is_ipsec) {
         static pid_t pid = 0;
-        if (pid == 0) {
+        if (pid <= 0) {
             char *file_name = xasprintf("%s/%s", ovs_rundir(),
                                         "ovs-monitor-ipsec.pid");
             pid = read_pidfile(file_name);