ikev2: use remote proposals when installing tunnel

Type: fix

Change-Id: Ia1556aa854fa83fb5340308c4eec868b7b4f8351
Signed-off-by: Filip Tehlar <ftehlar@cisco.com>
This commit is contained in:
Filip Tehlar
2020-08-19 07:54:08 +00:00
committed by Andrew Yourtchenko
parent fcb03a0ea5
commit 9c4d10c7ae

View File

@ -1498,7 +1498,7 @@ ikev2_create_tunnel_interface (vnet_main_t * vnm, ikev2_sa_t * sa,
{ {
a.local_ip.ip4.as_u32 = sa->iaddr.as_u32; a.local_ip.ip4.as_u32 = sa->iaddr.as_u32;
a.remote_ip.ip4.as_u32 = sa->raddr.as_u32; a.remote_ip.ip4.as_u32 = sa->raddr.as_u32;
proposals = child->i_proposals; proposals = child->r_proposals;
a.local_spi = child->r_proposals[0].spi; a.local_spi = child->r_proposals[0].spi;
a.remote_spi = child->i_proposals[0].spi; a.remote_spi = child->i_proposals[0].spi;
} }
@ -1506,7 +1506,7 @@ ikev2_create_tunnel_interface (vnet_main_t * vnm, ikev2_sa_t * sa,
{ {
a.local_ip.ip4.as_u32 = sa->raddr.as_u32; a.local_ip.ip4.as_u32 = sa->raddr.as_u32;
a.remote_ip.ip4.as_u32 = sa->iaddr.as_u32; a.remote_ip.ip4.as_u32 = sa->iaddr.as_u32;
proposals = child->r_proposals; proposals = child->i_proposals;
a.local_spi = child->i_proposals[0].spi; a.local_spi = child->i_proposals[0].spi;
a.remote_spi = child->r_proposals[0].spi; a.remote_spi = child->r_proposals[0].spi;
} }