Revert "ha: Always install the CHILD_SAs with the inbound flag set to FALSE"
authorMartin Willi <martin@revosec.ch>
Mon, 9 Mar 2015 16:47:53 +0000 (17:47 +0100)
committerMartin Willi <martin@revosec.ch>
Mon, 9 Mar 2015 17:18:20 +0000 (18:18 +0100)
While this change results in the correct add/update flag during installation,
it exchanges all other values in the child_sa->install() call. We should pass
the correct flag, but determine the add/update flag by other means.

This reverts commit e722ee5d.

src/libcharon/plugins/ha/ha_dispatcher.c

index 81132b4..983f9d8 100644 (file)
@@ -792,7 +792,7 @@ 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, initiator, FALSE, TRUE,
+                                                         inbound_cpi, initiator, TRUE, TRUE,
                                                          local_ts, remote_ts) != SUCCESS ||
                        child_sa->install(child_sa, encr_i, integ_i, outbound_spi,
                                                          outbound_cpi, initiator, FALSE, TRUE,
@@ -804,7 +804,7 @@ 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, initiator, FALSE, TRUE,
+                                                         inbound_cpi, initiator, TRUE, TRUE,
                                                          local_ts, remote_ts) != SUCCESS ||
                        child_sa->install(child_sa, encr_r, integ_r, outbound_spi,
                                                          outbound_cpi, initiator, FALSE, TRUE,