mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-12 17:00:33 +01:00
platform: remove fwmark from vti/vti6 tests
Older versions of iproute2 don't support the fwmark option. Remove it. Fixes:1cf8df2f35('platform: support VTI tunnels') Fixes:b669a3ae46('platform: support VTI6 tunnels')
This commit is contained in:
parent
115102efe9
commit
d1f010b305
2 changed files with 18 additions and 20 deletions
|
|
@ -2131,6 +2131,7 @@ nmtstp_link_vti_add(NMPlatform *platform,
|
|||
g_assert(nm_utils_ifname_valid_kernel(name, NULL));
|
||||
external_command = nmtstp_run_command_check_external(external_command);
|
||||
_init_platform(&platform, external_command);
|
||||
g_assert(lnk->fwmark == 0);
|
||||
|
||||
if (external_command) {
|
||||
gs_free char *dev = NULL;
|
||||
|
|
@ -2139,15 +2140,14 @@ nmtstp_link_vti_add(NMPlatform *platform,
|
|||
dev =
|
||||
g_strdup_printf("dev %s", nm_platform_link_get_name(platform, lnk->parent_ifindex));
|
||||
|
||||
success = !nmtstp_run_command(
|
||||
"ip link add %s type vti %s local %s remote %s ikey %u okey %u fwmark 0x%x",
|
||||
name,
|
||||
dev ?: "",
|
||||
nm_inet4_ntop(lnk->local, b1),
|
||||
nm_inet4_ntop(lnk->remote, b2),
|
||||
lnk->ikey,
|
||||
lnk->okey,
|
||||
lnk->fwmark);
|
||||
success =
|
||||
!nmtstp_run_command("ip link add %s type vti %s local %s remote %s ikey %u okey %u",
|
||||
name,
|
||||
dev ?: "",
|
||||
nm_inet4_ntop(lnk->local, b1),
|
||||
nm_inet4_ntop(lnk->remote, b2),
|
||||
lnk->ikey,
|
||||
lnk->okey);
|
||||
if (success)
|
||||
pllink = nmtstp_assert_wait_for_link(platform, name, NM_LINK_TYPE_VTI, 100);
|
||||
} else
|
||||
|
|
@ -2172,6 +2172,7 @@ nmtstp_link_vti6_add(NMPlatform *platform,
|
|||
g_assert(nm_utils_ifname_valid_kernel(name, NULL));
|
||||
external_command = nmtstp_run_command_check_external(external_command);
|
||||
_init_platform(&platform, external_command);
|
||||
g_assert(lnk->fwmark == 0);
|
||||
|
||||
if (external_command) {
|
||||
gs_free char *dev = NULL;
|
||||
|
|
@ -2180,15 +2181,14 @@ nmtstp_link_vti6_add(NMPlatform *platform,
|
|||
dev =
|
||||
g_strdup_printf("dev %s", nm_platform_link_get_name(platform, lnk->parent_ifindex));
|
||||
|
||||
success = !nmtstp_run_command(
|
||||
"ip link add %s type vti6 %s local %s remote %s ikey %u okey %u fwmark 0x%x",
|
||||
name,
|
||||
dev ?: "",
|
||||
nm_inet6_ntop(&lnk->local, b1),
|
||||
nm_inet6_ntop(&lnk->remote, b2),
|
||||
lnk->ikey,
|
||||
lnk->okey,
|
||||
lnk->fwmark);
|
||||
success =
|
||||
!nmtstp_run_command("ip link add %s type vti6 %s local %s remote %s ikey %u okey %u",
|
||||
name,
|
||||
dev ?: "",
|
||||
nm_inet6_ntop(&lnk->local, b1),
|
||||
nm_inet6_ntop(&lnk->remote, b2),
|
||||
lnk->ikey,
|
||||
lnk->okey);
|
||||
if (success)
|
||||
pllink = nmtstp_assert_wait_for_link(platform, name, NM_LINK_TYPE_VTI6, 100);
|
||||
} else
|
||||
|
|
|
|||
|
|
@ -1629,7 +1629,6 @@ test_software_detect(gconstpointer user_data)
|
|||
lnk_vti.local = nmtst_inet4_from_string("192.168.212.204");
|
||||
lnk_vti.remote = nmtst_inet4_from_string("172.168.11.25");
|
||||
lnk_vti.parent_ifindex = ifindex_parent;
|
||||
lnk_vti.fwmark = 0x42;
|
||||
lnk_vti.ikey = 12;
|
||||
lnk_vti.okey = 13;
|
||||
|
||||
|
|
@ -1655,7 +1654,6 @@ test_software_detect(gconstpointer user_data)
|
|||
lnk_vti6.local = nmtst_inet6_from_string("fd01::1");
|
||||
lnk_vti6.remote = nmtst_inet6_from_string("fd02::2");
|
||||
lnk_vti6.parent_ifindex = ifindex_parent;
|
||||
lnk_vti6.fwmark = 0x43;
|
||||
lnk_vti6.ikey = 13;
|
||||
lnk_vti6.okey = 14;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue