ha: Fix CHILD_SA installation in ha_dispatcher after adding initiator flag
authorTobias Brunner <tobias@strongswan.org>
Thu, 13 Jun 2013 11:17:55 +0000 (13:17 +0200)
committerTobias Brunner <tobias@strongswan.org>
Thu, 13 Jun 2013 11:17:55 +0000 (13:17 +0200)
src/libcharon/plugins/ha/ha_dispatcher.c

index 97ed131..1ce9d3a 100644 (file)
@@ -794,9 +794,11 @@ static void process_child_add(private_ha_dispatcher_t *this,
        if (initiator)
        {
                if (child_sa->install(child_sa, encr_r, integ_r, inbound_spi,
-                                       inbound_cpi, TRUE, TRUE, local_ts, remote_ts) != SUCCESS ||
+                                                         inbound_cpi, initiator, TRUE, TRUE,
+                                                         local_ts, remote_ts) != SUCCESS ||
                        child_sa->install(child_sa, encr_i, integ_i, outbound_spi,
-                                       outbound_cpi, FALSE, TRUE, local_ts, remote_ts) != SUCCESS)
+                                                         outbound_cpi, initiator, FALSE, TRUE,
+                                                         local_ts, remote_ts) != SUCCESS)
                {
                        failed = TRUE;
                }
@@ -804,9 +806,11 @@ static void process_child_add(private_ha_dispatcher_t *this,
        else
        {
                if (child_sa->install(child_sa, encr_i, integ_i, inbound_spi,
-                                       inbound_cpi, TRUE, TRUE, local_ts, remote_ts) != SUCCESS ||
+                                                         inbound_cpi, initiator, TRUE, TRUE,
+                                                         local_ts, remote_ts) != SUCCESS ||
                        child_sa->install(child_sa, encr_r, integ_r, outbound_spi,
-                                       outbound_cpi, FALSE, TRUE, local_ts, remote_ts) != SUCCESS)
+                                                         outbound_cpi, initiator, FALSE, TRUE,
+                                                         local_ts, remote_ts) != SUCCESS)
                {
                        failed = TRUE;
                }