@@ -976,13 +976,13 @@ send_ipsec_sa_details (ipsec_sa_t * sa, void *arg)
976976
977977 mp -> entry .sad_id = htonl (sa -> id );
978978 mp -> entry .spi = htonl (sa -> spi );
979- mp -> entry . protocol = ipsec_proto_encode (sa -> protocol );
979+ ipsec_proto_encode (sa -> protocol , & mp -> entry . protocol );
980980 mp -> entry .tx_table_id = htonl (sa -> tunnel .t_table_id );
981981
982- mp -> entry . crypto_algorithm = ipsec_crypto_algo_encode (sa -> crypto_alg );
982+ ipsec_crypto_algo_encode (sa -> crypto_alg , & mp -> entry . crypto_algorithm );
983983 ipsec_key_encode (& sa -> crypto_key , & mp -> entry .crypto_key );
984984
985- mp -> entry . integrity_algorithm = ipsec_integ_algo_encode (sa -> integ_alg );
985+ ipsec_integ_algo_encode (sa -> integ_alg , & mp -> entry . integrity_algorithm );
986986 ipsec_key_encode (& sa -> integ_key , & mp -> entry .integrity_key );
987987
988988 mp -> entry .flags = ipsec_sad_flags_encode (sa );
@@ -1058,13 +1058,13 @@ send_ipsec_sa_v2_details (ipsec_sa_t * sa, void *arg)
10581058
10591059 mp -> entry .sad_id = htonl (sa -> id );
10601060 mp -> entry .spi = htonl (sa -> spi );
1061- mp -> entry . protocol = ipsec_proto_encode (sa -> protocol );
1061+ ipsec_proto_encode (sa -> protocol , & mp -> entry . protocol );
10621062 mp -> entry .tx_table_id = htonl (sa -> tunnel .t_table_id );
10631063
1064- mp -> entry . crypto_algorithm = ipsec_crypto_algo_encode (sa -> crypto_alg );
1064+ ipsec_crypto_algo_encode (sa -> crypto_alg , & mp -> entry . crypto_algorithm );
10651065 ipsec_key_encode (& sa -> crypto_key , & mp -> entry .crypto_key );
10661066
1067- mp -> entry . integrity_algorithm = ipsec_integ_algo_encode (sa -> integ_alg );
1067+ ipsec_integ_algo_encode (sa -> integ_alg , & mp -> entry . integrity_algorithm );
10681068 ipsec_key_encode (& sa -> integ_key , & mp -> entry .integrity_key );
10691069
10701070 mp -> entry .flags = ipsec_sad_flags_encode (sa );
@@ -1144,12 +1144,12 @@ send_ipsec_sa_v3_details (ipsec_sa_t *sa, void *arg)
11441144
11451145 mp -> entry .sad_id = htonl (sa -> id );
11461146 mp -> entry .spi = htonl (sa -> spi );
1147- mp -> entry . protocol = ipsec_proto_encode (sa -> protocol );
1147+ ipsec_proto_encode (sa -> protocol , & mp -> entry . protocol );
11481148
1149- mp -> entry . crypto_algorithm = ipsec_crypto_algo_encode (sa -> crypto_alg );
1149+ ipsec_crypto_algo_encode (sa -> crypto_alg , & mp -> entry . crypto_algorithm );
11501150 ipsec_key_encode (& sa -> crypto_key , & mp -> entry .crypto_key );
11511151
1152- mp -> entry . integrity_algorithm = ipsec_integ_algo_encode (sa -> integ_alg );
1152+ ipsec_integ_algo_encode (sa -> integ_alg , & mp -> entry . integrity_algorithm );
11531153 ipsec_key_encode (& sa -> integ_key , & mp -> entry .integrity_key );
11541154
11551155 mp -> entry .flags = ipsec_sad_flags_encode (sa );
@@ -1225,12 +1225,12 @@ send_ipsec_sa_v4_details (ipsec_sa_t *sa, void *arg)
12251225
12261226 mp -> entry .sad_id = htonl (sa -> id );
12271227 mp -> entry .spi = htonl (sa -> spi );
1228- mp -> entry . protocol = ipsec_proto_encode (sa -> protocol );
1228+ ipsec_proto_encode (sa -> protocol , & mp -> entry . protocol );
12291229
1230- mp -> entry . crypto_algorithm = ipsec_crypto_algo_encode (sa -> crypto_alg );
1230+ ipsec_crypto_algo_encode (sa -> crypto_alg , & mp -> entry . crypto_algorithm );
12311231 ipsec_key_encode (& sa -> crypto_key , & mp -> entry .crypto_key );
12321232
1233- mp -> entry . integrity_algorithm = ipsec_integ_algo_encode (sa -> integ_alg );
1233+ ipsec_integ_algo_encode (sa -> integ_alg , & mp -> entry . integrity_algorithm );
12341234 ipsec_key_encode (& sa -> integ_key , & mp -> entry .integrity_key );
12351235
12361236 mp -> entry .flags = ipsec_sad_flags_encode (sa );
@@ -1312,12 +1312,12 @@ send_ipsec_sa_v5_details (ipsec_sa_t *sa, void *arg)
13121312
13131313 mp -> entry .sad_id = htonl (sa -> id );
13141314 mp -> entry .spi = htonl (sa -> spi );
1315- mp -> entry . protocol = ipsec_proto_encode (sa -> protocol );
1315+ ipsec_proto_encode (sa -> protocol , & mp -> entry . protocol );
13161316
1317- mp -> entry . crypto_algorithm = ipsec_crypto_algo_encode (sa -> crypto_alg );
1317+ ipsec_crypto_algo_encode (sa -> crypto_alg , & mp -> entry . crypto_algorithm );
13181318 ipsec_key_encode (& sa -> crypto_key , & mp -> entry .crypto_key );
13191319
1320- mp -> entry . integrity_algorithm = ipsec_integ_algo_encode (sa -> integ_alg );
1320+ ipsec_integ_algo_encode (sa -> integ_alg , & mp -> entry . integrity_algorithm );
13211321 ipsec_key_encode (& sa -> integ_key , & mp -> entry .integrity_key );
13221322
13231323 mp -> entry .flags = ipsec_sad_flags_encode (sa );
0 commit comments