Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add IPv6 ipsec tests #2682

Merged
merged 1 commit into from
Jun 12, 2024
Merged

test: Add IPv6 ipsec tests #2682

merged 1 commit into from
Jun 12, 2024

Conversation

cathay4t
Copy link
Member

With NetworkManager-libreswan 1.2.22+, IPv6 libreswan ipsec tunnel is
supported.

Integration test cases included.

Resolves: https://issues.redhat.com/browse/RHEL-32279

Copy link

Congratulations! One of the builds has completed. 🍾

You can install the built RPMs by following these steps:

  • sudo yum install -y dnf-plugins-core on RHEL 8
  • sudo dnf install -y dnf-plugins-core on Fedora
  • dnf copr enable packit/nmstate-nmstate-2682
  • And now you can install the packages.

Please note that the RPMs should be used only in a testing environment.

@cathay4t cathay4t force-pushed the ipsec_ipv6 branch 4 times, most recently from 36cea05 to ee6dff5 Compare May 29, 2024 01:42
tests/integration/ipsec_test.py Outdated Show resolved Hide resolved
right: {IpsecTestEnv.HOSTB_IPV6_CS}
rightid: '@hostb.example.org'
ipsec-interface: 97
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this change?

BTW, adding ipsec-interface uses a different mode in libreswan (Routing based VPN instead of Policy based VPN). Things that works well with one of them might fail with the other (probably because of bugs in NM-libreswan). Should we do all the tests in both modes maybe?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can only tell whether autoconf IPv6 is disabled as desired with dedicate ipsec xfrm interface.

tests/integration/testlib/env.py Outdated Show resolved Hide resolved
tests/integration/testlib/ipsec.py Outdated Show resolved Hide resolved
@cathay4t cathay4t force-pushed the ipsec_ipv6 branch 2 times, most recently from 3d8fce7 to 0143a21 Compare June 3, 2024 06:36
@liangwen12year
Copy link
Collaborator

Please resolve the conflict, thanks.

Instead of checking micro version, we should convert version to a
integer to compare using this formula:

    10000 * major_version + 100 * minor_version + micro_version

Introduced `nm_libreswan_version_int()` and `version_str_to_int()` for
this and fixed all version check in ipsec test.

Signed-off-by: Gris Ge <fge@redhat.com>
@cathay4t cathay4t enabled auto-merge (rebase) June 12, 2024 01:48
@cathay4t cathay4t merged commit af93eee into nmstate:base Jun 12, 2024
26 of 27 checks passed
@cathay4t cathay4t deleted the ipsec_ipv6 branch June 12, 2024 02:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants