Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
ipsec: use id in ipsec_tunnel_protect_details
[vpp.git]
/
src
/
vnet
/
ipsec
/
ipsec_api.c
diff --git
a/src/vnet/ipsec/ipsec_api.c
b/src/vnet/ipsec/ipsec_api.c
index
177300a
..
ded6e70
100644
(file)
--- a/
src/vnet/ipsec/ipsec_api.c
+++ b/
src/vnet/ipsec/ipsec_api.c
@@
-178,7
+178,8
@@
send_ipsec_tunnel_protect_details (index_t itpi, void *arg)
ipsec_dump_walk_ctx_t *ctx = arg;
vl_api_ipsec_tunnel_protect_details_t *mp;
ipsec_tun_protect_t *itp;
ipsec_dump_walk_ctx_t *ctx = arg;
vl_api_ipsec_tunnel_protect_details_t *mp;
ipsec_tun_protect_t *itp;
- u32 sai, ii = 0;
+ u32 ii = 0;
+ ipsec_sa_t *sa;
itp = ipsec_tun_protect_get (itpi);
itp = ipsec_tun_protect_get (itpi);
@@
-190,12
+191,13
@@
send_ipsec_tunnel_protect_details (index_t itpi, void *arg)
mp->tun.sw_if_index = htonl (itp->itp_sw_if_index);
ip_address_encode2 (itp->itp_key, &mp->tun.nh);
mp->tun.sw_if_index = htonl (itp->itp_sw_if_index);
ip_address_encode2 (itp->itp_key, &mp->tun.nh);
- mp->tun.sa_out = htonl (itp->itp_out_sa);
+ sa = ipsec_sa_get (itp->itp_out_sa);
+ mp->tun.sa_out = htonl (sa->id);
mp->tun.n_sa_in = itp->itp_n_sa_in;
/* *INDENT-OFF* */
mp->tun.n_sa_in = itp->itp_n_sa_in;
/* *INDENT-OFF* */
- FOR_EACH_IPSEC_PROTECT_INPUT_SA
I(itp, sai
,
+ FOR_EACH_IPSEC_PROTECT_INPUT_SA
(itp, sa
,
({
({
- mp->tun.sa_in[ii++] = htonl (sa
i
);
+ mp->tun.sa_in[ii++] = htonl (sa
->id
);
}));
/* *INDENT-ON* */
}));
/* *INDENT-ON* */