proposal: Copy SPI and proposal number from correct proposal in select()
authorTobias Brunner <tobias@strongswan.org>
Thu, 15 Dec 2016 17:22:11 +0000 (18:22 +0100)
committerTobias Brunner <tobias@strongswan.org>
Mon, 6 Feb 2017 10:14:31 +0000 (11:14 +0100)
commit22f13dcecdd7c788cf5cbf9533d2fb7a1f8317f5
tree6a2923cc8dc9a3748c853f3656276e19ea267e87
parentb062d3cc4463ae632f6e4f10d7981b60a290d458
proposal: Copy SPI and proposal number from correct proposal in select()

If charon.prefer_configured_proposals is disabled select() is called on
the received proposal. This incorrectly set the SPI to 0 as the
configured proposal has no SPI set.

Fixes #2190.
src/libcharon/config/child_cfg.c
src/libcharon/config/ike_cfg.c
src/libcharon/config/proposal.c
src/libcharon/config/proposal.h
src/libcharon/tests/suites/test_proposal.c