Merge "Support encoding/decoding IkeSessionParams with IKE_OPTION_INITIAL_CONTACT"

This commit is contained in:
Nagendra Prasad Nagarle Basavaraju
2021-11-01 23:55:56 +00:00
committed by Gerrit Code Review
2 changed files with 3 additions and 1 deletions

View File

@@ -79,6 +79,7 @@ public final class IkeSessionParamsUtils {
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_EAP_ONLY_AUTH);
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_MOBIKE);
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_FORCE_PORT_4500);
IKE_OPTIONS.add(IkeSessionParams.IKE_OPTION_INITIAL_CONTACT);
}
/** Serializes an IkeSessionParams to a PersistableBundle. */

View File

@@ -135,11 +135,12 @@ public class IkeSessionParamsUtilsTest {
}
@Test
public void testEncodeRecodeParamsWithIkeOptions() throws Exception {
public void testEncodeDecodeParamsWithIkeOptions() throws Exception {
final IkeSessionParams params =
createBuilderMinimum()
.addIkeOption(IkeSessionParams.IKE_OPTION_ACCEPT_ANY_REMOTE_ID)
.addIkeOption(IkeSessionParams.IKE_OPTION_MOBIKE)
.addIkeOption(IkeSessionParams.IKE_OPTION_INITIAL_CONTACT)
.build();
verifyPersistableBundleEncodeDecodeIsLossless(params);
}