Fix routes inverted delete/add in cluster mode dev-lac
authorfendo <fendo@bi12info.com>
Tue, 18 Dec 2012 18:18:05 +0000 (19:18 +0100)
committerfendo <fendo@bi12info.com>
Tue, 18 Dec 2012 18:18:05 +0000 (19:18 +0100)
cluster.c

index b2a244e..9277f41 100644 (file)
--- a/cluster.c
+++ b/cluster.c
@@ -1014,7 +1014,11 @@ int cluster_listinvert_session(int sidnew, int sidtodel)
 
                if ( cluster_changes[i].id == sidnew && cluster_changes[i].type == C_CSESSION)
                {
-                       inew = i;
+                       if (session[i].tunnel != T_FREE)
+                               inew = i;
+                       else
+                               return 0;       // This a free session no invert.
+
                        break;
                }
        }