[PATCH 0/4] tests: Miscellaneous fixes and improvements

I've been trying to compile libvirt with musl lately and seen couple of tests failing. Some of them were related strictly to how musl works, but the rest are genuine bugs we have and it's by pure chance that we haven't met them with glibc (1/4 for instance). Green pipeline can be seen here: https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/483864407 Michal Prívozník (4): vircgroupmock: Be wiser about detecting fakerootdir change vircgroupmock: Make global variables static sockettest: Check for IPv4-in-IPv6 parsing and formatting tests: Update IPv4-in-IPv6 addresses tests/nwfilterxml2firewalldata/ah-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/ah-ipv6.xml | 2 +- .../nwfilterxml2firewalldata/all-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/all-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/comment-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/comment.xml | 4 ++-- .../nwfilterxml2firewalldata/esp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/esp-ipv6.xml | 2 +- .../nwfilterxml2firewalldata/hex-data-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/hex-data.xml | 4 ++-- tests/nwfilterxml2firewalldata/icmpv6-linux.args | 2 +- tests/nwfilterxml2firewalldata/icmpv6.xml | 2 +- tests/nwfilterxml2firewalldata/ipv6-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/ipv6.xml | 4 ++-- .../nwfilterxml2firewalldata/sctp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/sctp-ipv6.xml | 2 +- .../nwfilterxml2firewalldata/tcp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/tcp-ipv6.xml | 2 +- .../nwfilterxml2firewalldata/udp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/udp-ipv6.xml | 2 +- .../udplite-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/udplite-ipv6.xml | 2 +- tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/comment-test-invalid.xml | 4 ++-- tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/hex-data-test-invalid.xml | 4 ++-- tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/ipv6-test-invalid.xml | 4 ++-- .../nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml | 2 +- .../udplite-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlout/ah-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/all-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/comment-test.xml | 2 +- tests/nwfilterxml2xmlout/esp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/hex-data-test.xml | 2 +- tests/nwfilterxml2xmlout/icmpv6-test.xml | 2 +- tests/nwfilterxml2xmlout/ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/sctp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/tcp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/udp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/udplite-ipv6-test.xml | 2 +- tests/sockettest.c | 2 ++ tests/vircgroupmock.c | 15 ++++++--------- 46 files changed, 75 insertions(+), 76 deletions(-) -- 2.34.1

The way that vircgroupmock works is that the vircgrouptest creates a temporary directory and sets LIBVIRT_FAKE_ROOT_DIR env variable which is then checked by the mock at the beginning of basically every function it overrides (access(), stat in all its flavours, mkdir(), etc.). The mock then creates a CGroup dir structure. But the test is allowed to change the directory, to accommodate environment for the particular test case. This is done by changing the environment variable which is then detected by the mock and the whole process repeats. However, the way the mock detect changes is buggy. After it got the environment variable it compares it to the last known value (global variable @fakerootdir) and if they don't match the last known value is set to point to the new value. Problem is that the result of getenv() is assigned to the @fakerootdir directly. Therefore, @fakerootdir points somewhere into the buffer of environment variables. In turn, when the test sets new value (via g_setenv()) it may be placed at the very same position in the env var buffer and thus the mock fails to detect the change. The solution is to keep our private copy of the value (by g_strdup()) which makes the variable not rely on getenv()/setenv() placing values at random positions. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/vircgroupmock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c index cebf1912f7..cbf5269df6 100644 --- a/tests/vircgroupmock.c +++ b/tests/vircgroupmock.c @@ -352,7 +352,8 @@ static void init_sysfs(void) if (fakerootdir && STREQ(fakerootdir, newfakerootdir)) return; - fakerootdir = newfakerootdir; + VIR_FREE(fakerootdir); + fakerootdir = g_strdup(newfakerootdir); mock = getenv("VIR_CGROUP_MOCK_MODE"); if (mock) { -- 2.34.1

On a Friday in 2022, Michal Privoznik wrote:
The way that vircgroupmock works is that the vircgrouptest creates a temporary directory and sets LIBVIRT_FAKE_ROOT_DIR env variable which is then checked by the mock at the beginning of basically every function it overrides (access(), stat in all its flavours, mkdir(), etc.). The mock then creates a CGroup dir structure. But the test is allowed to change the directory, to accommodate environment for the particular test case. This is done by changing the environment variable which is then detected by the mock and the whole process repeats.
However, the way the mock detect changes is buggy. After it got the environment variable it compares it to the last known value (global variable @fakerootdir) and if they don't match the last known value is set to point to the new value. Problem is that the result of getenv() is assigned to the @fakerootdir directly. Therefore, @fakerootdir points somewhere into the buffer of environment variables. In turn, when the test sets new value (via g_setenv()) it may be placed at the very same position in the env var buffer and thus the mock fails to detect the change.
The solution is to keep our private copy of the value (by g_strdup()) which makes the variable not rely on getenv()/setenv() placing values at random positions.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/vircgroupmock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c index cebf1912f7..cbf5269df6 100644 --- a/tests/vircgroupmock.c +++ b/tests/vircgroupmock.c @@ -352,7 +352,8 @@ static void init_sysfs(void) if (fakerootdir && STREQ(fakerootdir, newfakerootdir)) return;
- fakerootdir = newfakerootdir; + VIR_FREE(fakerootdir);
g_free Jano
+ fakerootdir = g_strdup(newfakerootdir);
mock = getenv("VIR_CGROUP_MOCK_MODE"); if (mock) { -- 2.34.1

Apparently clang was fixed as it no longer considers having global variables static a problem. Make the variables static to be sure they aren't used outside of the source file. This effectively reverts v1.0.6-rc1~198 which started the trend. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/vircgroupmock.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/tests/vircgroupmock.c b/tests/vircgroupmock.c index cbf5269df6..a213c8e686 100644 --- a/tests/vircgroupmock.c +++ b/tests/vircgroupmock.c @@ -36,14 +36,10 @@ static FILE *(*real_fopen)(const char *path, const char *mode); static int (*real_access)(const char *path, int mode); static int (*real_mkdir)(const char *path, mode_t mode); -/* Don't make static, since it causes problems with clang - * when passed as an arg to asprintf() - * vircgroupmock.c:462:22: error: static variable 'fakesysfsdir' is used in an inline function with external linkage [-Werror,-Wstatic-in-inline] - */ -char *fakerootdir; -char *fakesysfscgroupdir; -const char *fakedevicedir0 = FAKEDEVDIR0; -const char *fakedevicedir1 = FAKEDEVDIR1; +static char *fakerootdir; +static char *fakesysfscgroupdir; +static const char *fakedevicedir0 = FAKEDEVDIR0; +static const char *fakedevicedir1 = FAKEDEVDIR1; # define SYSFS_CGROUP_PREFIX "/not/really/sys/fs/cgroup" -- 2.34.1

There are two standards how IPv4 address in IPv6 can be expressed: ::10.1.2.3 ::ffff:10.1.2.3 The former is obsolete and the latter should be used instead [1]. Add test cases to our sockettest to exercise parsing/formatting of the valid address format. 1: https://datatracker.ietf.org/doc/html/rfc4291#section-2.5.5.1 Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/sockettest.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sockettest.c b/tests/sockettest.c index 332def2c93..2a35b6a829 100644 --- a/tests/sockettest.c +++ b/tests/sockettest.c @@ -371,12 +371,14 @@ mymain(void) DO_TEST_PARSE_AND_CHECK_FORMAT("127.2", "127.2.0.0", AF_INET, false); DO_TEST_PARSE_AND_CHECK_FORMAT("1.2.3", "1.2.0.3", AF_INET, true); DO_TEST_PARSE_AND_CHECK_FORMAT("1.2.3", "1.2.3.0", AF_INET, false); + DO_TEST_PARSE_AND_CHECK_FORMAT("::ffff:a01:203", "::ffff:10.1.2.3", AF_INET6, true); DO_TEST_PARSE_AND_FORMAT("::1", AF_UNSPEC, true); DO_TEST_PARSE_AND_FORMAT("::1", AF_INET, false); DO_TEST_PARSE_AND_FORMAT("::1", AF_INET6, true); DO_TEST_PARSE_AND_FORMAT("::1", AF_UNIX, false); DO_TEST_PARSE_AND_FORMAT("::fffe:0:0", AF_UNSPEC, true); + DO_TEST_PARSE_AND_FORMAT("::ffff:10.1.2.3", AF_UNSPEC, true); /* tests that specify a network that should contain the range */ DO_TEST_RANGE("192.168.122.1", "192.168.122.1", "192.168.122.1", 24, 1, true); -- 2.34.1

We have couple of tests where the obsolete IPv4-in-IPv6 notation is used (::10.1.2.3). Change them to the correct format (::ffff:10.1.2.3). Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tests/nwfilterxml2firewalldata/ah-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/ah-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/all-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/all-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/comment-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/comment.xml | 4 ++-- tests/nwfilterxml2firewalldata/esp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/esp-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/hex-data-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/hex-data.xml | 4 ++-- tests/nwfilterxml2firewalldata/icmpv6-linux.args | 2 +- tests/nwfilterxml2firewalldata/icmpv6.xml | 2 +- tests/nwfilterxml2firewalldata/ipv6-linux.args | 4 ++-- tests/nwfilterxml2firewalldata/ipv6.xml | 4 ++-- tests/nwfilterxml2firewalldata/sctp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/sctp-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/tcp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/tcp-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/udp-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/udp-ipv6.xml | 2 +- tests/nwfilterxml2firewalldata/udplite-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/udplite-ipv6.xml | 2 +- tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/comment-test-invalid.xml | 4 ++-- tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/hex-data-test-invalid.xml | 4 ++-- tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/ipv6-test-invalid.xml | 4 ++-- tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml | 2 +- tests/nwfilterxml2xmlout/ah-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/all-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/comment-test.xml | 2 +- tests/nwfilterxml2xmlout/esp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/hex-data-test.xml | 2 +- tests/nwfilterxml2xmlout/icmpv6-test.xml | 2 +- tests/nwfilterxml2xmlout/ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/sctp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/tcp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/udp-ipv6-test.xml | 2 +- tests/nwfilterxml2xmlout/udplite-ipv6-test.xml | 2 +- 44 files changed, 67 insertions(+), 67 deletions(-) diff --git a/tests/nwfilterxml2firewalldata/ah-ipv6-linux.args b/tests/nwfilterxml2firewalldata/ah-ipv6-linux.args index 77f0532fd2..f0bf85e8a1 100644 --- a/tests/nwfilterxml2firewalldata/ah-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/ah-ipv6-linux.args @@ -71,7 +71,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p ah \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -83,7 +83,7 @@ ip6tables \ -p ah \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -93,7 +93,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p ah \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ diff --git a/tests/nwfilterxml2firewalldata/ah-ipv6.xml b/tests/nwfilterxml2firewalldata/ah-ipv6.xml index 95ebbc9e09..b664c0dfa6 100644 --- a/tests/nwfilterxml2firewalldata/ah-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/ah-ipv6.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <ah-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2firewalldata/all-ipv6-linux.args b/tests/nwfilterxml2firewalldata/all-ipv6-linux.args index d86908663c..5eb6033c64 100644 --- a/tests/nwfilterxml2firewalldata/all-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/all-ipv6-linux.args @@ -71,7 +71,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p all \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -83,7 +83,7 @@ ip6tables \ -p all \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -93,7 +93,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p all \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ diff --git a/tests/nwfilterxml2firewalldata/all-ipv6.xml b/tests/nwfilterxml2firewalldata/all-ipv6.xml index 5cf3519437..5132e9bdd6 100644 --- a/tests/nwfilterxml2firewalldata/all-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/all-ipv6.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <all-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2firewalldata/comment-linux.args b/tests/nwfilterxml2firewalldata/comment-linux.args index c014538f09..2b940ccd84 100644 --- a/tests/nwfilterxml2firewalldata/comment-linux.args +++ b/tests/nwfilterxml2firewalldata/comment-linux.args @@ -25,8 +25,8 @@ ebtables \ -s 01:02:03:04:05:06/ff:ff:ff:ff:ff:fe \ -d aa:bb:cc:dd:ee:ff/ff:ff:ff:ff:ff:80 \ -p ipv6 \ ---ip6-source ::10.1.2.3/22 \ ---ip6-destination ::10.1.2.3/113 \ +--ip6-source ::ffff:10.1.2.3/22 \ +--ip6-destination ::ffff:10.1.2.3/113 \ --ip6-protocol 6 \ --ip6-source-port 273:400 \ --ip6-destination-port 13107:65535 \ diff --git a/tests/nwfilterxml2firewalldata/comment.xml b/tests/nwfilterxml2firewalldata/comment.xml index a154a17c14..f1d2af1908 100644 --- a/tests/nwfilterxml2firewalldata/comment.xml +++ b/tests/nwfilterxml2firewalldata/comment.xml @@ -19,8 +19,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='tcp' srcportstart='0x111' srcportend='400' diff --git a/tests/nwfilterxml2firewalldata/esp-ipv6-linux.args b/tests/nwfilterxml2firewalldata/esp-ipv6-linux.args index 22dad0b412..426bdd3083 100644 --- a/tests/nwfilterxml2firewalldata/esp-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/esp-ipv6-linux.args @@ -71,7 +71,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p esp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -83,7 +83,7 @@ ip6tables \ -p esp \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -93,7 +93,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p esp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ diff --git a/tests/nwfilterxml2firewalldata/esp-ipv6.xml b/tests/nwfilterxml2firewalldata/esp-ipv6.xml index 295d0f9b3b..d411366c1c 100644 --- a/tests/nwfilterxml2firewalldata/esp-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/esp-ipv6.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <esp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2firewalldata/hex-data-linux.args b/tests/nwfilterxml2firewalldata/hex-data-linux.args index 3c04e1c23d..ff8f528c48 100644 --- a/tests/nwfilterxml2firewalldata/hex-data-linux.args +++ b/tests/nwfilterxml2firewalldata/hex-data-linux.args @@ -25,8 +25,8 @@ ebtables \ -s 01:02:03:04:05:06/ff:ff:ff:ff:ff:fe \ -d aa:bb:cc:dd:ee:ff/ff:ff:ff:ff:ff:80 \ -p ipv6 \ ---ip6-source ::10.1.2.3/22 \ ---ip6-destination ::10.1.2.3/113 \ +--ip6-source ::ffff:10.1.2.3/22 \ +--ip6-destination ::ffff:10.1.2.3/113 \ --ip6-protocol 6 \ --ip6-source-port 273:400 \ --ip6-destination-port 13107:65535 \ diff --git a/tests/nwfilterxml2firewalldata/hex-data.xml b/tests/nwfilterxml2firewalldata/hex-data.xml index 45df45129b..ee93bbccda 100644 --- a/tests/nwfilterxml2firewalldata/hex-data.xml +++ b/tests/nwfilterxml2firewalldata/hex-data.xml @@ -19,8 +19,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='tcp' srcportstart='0x111' srcportend='400' diff --git a/tests/nwfilterxml2firewalldata/icmpv6-linux.args b/tests/nwfilterxml2firewalldata/icmpv6-linux.args index 6e2110fb81..5a8546e5c8 100644 --- a/tests/nwfilterxml2firewalldata/icmpv6-linux.args +++ b/tests/nwfilterxml2firewalldata/icmpv6-linux.args @@ -45,7 +45,7 @@ ip6tables \ -p icmpv6 \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ --icmpv6-type 255/255 \ diff --git a/tests/nwfilterxml2firewalldata/icmpv6.xml b/tests/nwfilterxml2firewalldata/icmpv6.xml index 9d248266fe..52b3a7cada 100644 --- a/tests/nwfilterxml2firewalldata/icmpv6.xml +++ b/tests/nwfilterxml2firewalldata/icmpv6.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <icmpv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='33' type='255' code='255'/> </rule> </filter> diff --git a/tests/nwfilterxml2firewalldata/ipv6-linux.args b/tests/nwfilterxml2firewalldata/ipv6-linux.args index 87db9c2979..a36ae23cf5 100644 --- a/tests/nwfilterxml2firewalldata/ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/ipv6-linux.args @@ -5,8 +5,8 @@ ebtables \ -s 01:02:03:04:05:06/ff:ff:ff:ff:ff:fe \ -d aa:bb:cc:dd:ee:ff/ff:ff:ff:ff:ff:80 \ -p ipv6 \ ---ip6-source ::10.1.2.3/22 \ ---ip6-destination ::10.1.2.3/113 \ +--ip6-source ::ffff:10.1.2.3/22 \ +--ip6-destination ::ffff:10.1.2.3/113 \ --ip6-protocol 17 \ --ip6-source-port 20:22 \ --ip6-destination-port 100:101 \ diff --git a/tests/nwfilterxml2firewalldata/ipv6.xml b/tests/nwfilterxml2firewalldata/ipv6.xml index 2400958030..0351bca01a 100644 --- a/tests/nwfilterxml2firewalldata/ipv6.xml +++ b/tests/nwfilterxml2firewalldata/ipv6.xml @@ -3,8 +3,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='udp' srcportstart='20' srcportend='22' diff --git a/tests/nwfilterxml2firewalldata/sctp-ipv6-linux.args b/tests/nwfilterxml2firewalldata/sctp-ipv6-linux.args index fbe6f39198..086c11ca52 100644 --- a/tests/nwfilterxml2firewalldata/sctp-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/sctp-ipv6-linux.args @@ -74,7 +74,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p sctp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ @@ -88,7 +88,7 @@ ip6tables \ -p sctp \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --sport 255:256 \ @@ -100,7 +100,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p sctp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ diff --git a/tests/nwfilterxml2firewalldata/sctp-ipv6.xml b/tests/nwfilterxml2firewalldata/sctp-ipv6.xml index d1a57b8f93..1b870ce5d8 100644 --- a/tests/nwfilterxml2firewalldata/sctp-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/sctp-ipv6.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <sctp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65535'/> diff --git a/tests/nwfilterxml2firewalldata/tcp-ipv6-linux.args b/tests/nwfilterxml2firewalldata/tcp-ipv6-linux.args index 8fa5e24eff..50b5514a3b 100644 --- a/tests/nwfilterxml2firewalldata/tcp-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/tcp-ipv6-linux.args @@ -74,7 +74,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p tcp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ @@ -88,7 +88,7 @@ ip6tables \ -p tcp \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --sport 255:256 \ @@ -100,7 +100,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p tcp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ diff --git a/tests/nwfilterxml2firewalldata/tcp-ipv6.xml b/tests/nwfilterxml2firewalldata/tcp-ipv6.xml index d4f24f44de..2f41b227b3 100644 --- a/tests/nwfilterxml2firewalldata/tcp-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/tcp-ipv6.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <tcp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65535'/> diff --git a/tests/nwfilterxml2firewalldata/udp-ipv6-linux.args b/tests/nwfilterxml2firewalldata/udp-ipv6-linux.args index 59367ed3d3..6feec12a04 100644 --- a/tests/nwfilterxml2firewalldata/udp-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/udp-ipv6-linux.args @@ -74,7 +74,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p udp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ @@ -88,7 +88,7 @@ ip6tables \ -p udp \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --sport 255:256 \ @@ -100,7 +100,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p udp \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 63 \ --dport 255:256 \ diff --git a/tests/nwfilterxml2firewalldata/udp-ipv6.xml b/tests/nwfilterxml2firewalldata/udp-ipv6.xml index fd4f135a4b..7c0be8404e 100644 --- a/tests/nwfilterxml2firewalldata/udp-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/udp-ipv6.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <udp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65535'/> diff --git a/tests/nwfilterxml2firewalldata/udplite-ipv6-linux.args b/tests/nwfilterxml2firewalldata/udplite-ipv6-linux.args index de564aee36..6be6aa0069 100644 --- a/tests/nwfilterxml2firewalldata/udplite-ipv6-linux.args +++ b/tests/nwfilterxml2firewalldata/udplite-ipv6-linux.args @@ -71,7 +71,7 @@ ip6tables \ -w \ -A FJ-vnet0 \ -p udplite \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -83,7 +83,7 @@ ip6tables \ -p udplite \ -m mac \ --mac-source 01:02:03:04:05:06 \ ---source ::10.1.2.3/128 \ +--source ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ @@ -93,7 +93,7 @@ ip6tables \ -w \ -A HJ-vnet0 \ -p udplite \ ---destination ::10.1.2.3/128 \ +--destination ::ffff:10.1.2.3/128 \ -m dscp \ --dscp 33 \ -m state \ diff --git a/tests/nwfilterxml2firewalldata/udplite-ipv6.xml b/tests/nwfilterxml2firewalldata/udplite-ipv6.xml index 5b941a2465..1b006e1d42 100644 --- a/tests/nwfilterxml2firewalldata/udplite-ipv6.xml +++ b/tests/nwfilterxml2firewalldata/udplite-ipv6.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <udplite-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='128' + srcipaddr='::ffff:10.1.2.3' srcipmask='128' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml index f0200985df..a5bb5e595f 100644 --- a/tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/ah-ipv6-test-invalid.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <ah-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml index 32772370a8..a162aa1c45 100644 --- a/tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/all-ipv6-test-invalid.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <all-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlin/comment-test-invalid.xml b/tests/nwfilterxml2xmlin/comment-test-invalid.xml index 69ba783ce1..c85dbadb0b 100644 --- a/tests/nwfilterxml2xmlin/comment-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/comment-test-invalid.xml @@ -19,8 +19,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='tcp' srcportstart='0x111' srcportend='400' diff --git a/tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml index ac381dd000..85bcee01d9 100644 --- a/tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/esp-ipv6-test-invalid.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <esp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlin/hex-data-test-invalid.xml b/tests/nwfilterxml2xmlin/hex-data-test-invalid.xml index af26a92ae4..e6c9dc4636 100644 --- a/tests/nwfilterxml2xmlin/hex-data-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/hex-data-test-invalid.xml @@ -19,8 +19,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='tcp' srcportstart='0x111' srcportend='400' diff --git a/tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml b/tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml index a9494bafd8..636f5ec90c 100644 --- a/tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/icmpv6-test-invalid.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <icmpv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='33' type='256' code='256'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlin/ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/ipv6-test-invalid.xml index 2daa3b96dd..3b420871b2 100644 --- a/tests/nwfilterxml2xmlin/ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/ipv6-test-invalid.xml @@ -3,8 +3,8 @@ <rule action='accept' direction='out'> <ipv6 srcmacaddr='1:2:3:4:5:6' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' - srcipaddr='::10.1.2.3' srcipmask='22' - dstipaddr='::10.1.2.3' + srcipaddr='::ffff:10.1.2.3' srcipmask='22' + dstipaddr='::ffff:10.1.2.3' dstipmask='ffff:ffff:ffff:ffff:ffff:ffff:ffff:8000' protocol='udp' srcportstart='20' srcportend='22' diff --git a/tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml index 10c883658e..b29e68020b 100644 --- a/tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/sctp-ipv6-test-invalid.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <sctp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65536'/> diff --git a/tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml index f4340f9ee8..bdc8d6ef23 100644 --- a/tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/tcp-ipv6-test-invalid.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <tcp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65536'/> diff --git a/tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml index f2a73896f2..1f8be92fa0 100644 --- a/tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/udp-ipv6-test-invalid.xml @@ -14,7 +14,7 @@ </rule> <rule action='accept' direction='in'> <udp-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535' dstportend='65536'/> diff --git a/tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml b/tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml index 2f2b8d4941..702804ba7c 100644 --- a/tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml +++ b/tests/nwfilterxml2xmlin/udplite-ipv6-test-invalid.xml @@ -13,7 +13,7 @@ </rule> <rule action='accept' direction='in'> <udplite-ipv6 srcmacaddr='1:2:3:4:5:6' - srcipaddr='::10.1.2.3' srcipmask='129' + srcipaddr='::ffff:10.1.2.3' srcipmask='129' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/ah-ipv6-test.xml b/tests/nwfilterxml2xmlout/ah-ipv6-test.xml index 6d65b3de57..2c4b9c97af 100644 --- a/tests/nwfilterxml2xmlout/ah-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/ah-ipv6-test.xml @@ -7,6 +7,6 @@ <ah-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33'/> </rule> <rule action='accept' direction='in' priority='500'> - <ah-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='33'/> + <ah-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/all-ipv6-test.xml b/tests/nwfilterxml2xmlout/all-ipv6-test.xml index 263a679966..226e86bead 100644 --- a/tests/nwfilterxml2xmlout/all-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/all-ipv6-test.xml @@ -7,6 +7,6 @@ <all-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33'/> </rule> <rule action='accept' direction='in' priority='500'> - <all-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='33'/> + <all-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/comment-test.xml b/tests/nwfilterxml2xmlout/comment-test.xml index 1d95af1c27..70779bcb23 100644 --- a/tests/nwfilterxml2xmlout/comment-test.xml +++ b/tests/nwfilterxml2xmlout/comment-test.xml @@ -7,7 +7,7 @@ <ip srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:ff' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' srcipaddr='10.1.2.3' srcipmask='32' dstipaddr='10.1.2.3' dstipmask='32' protocol='udp' srcportstart='0x123' srcportend='0x234' dstportstart='0x3456' dstportend='0x4567' dscp='0x32' comment='ip rule'/> </rule> <rule action='accept' direction='out' priority='500'> - <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='tcp' srcportstart='0x111' srcportend='400' dstportstart='0x3333' dstportend='65535' comment='ipv6 rule'/> + <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::ffff:10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='tcp' srcportstart='0x111' srcportend='400' dstportstart='0x3333' dstportend='65535' comment='ipv6 rule'/> </rule> <rule action='accept' direction='out' priority='500'> <arp srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:ff' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' hwtype='0x12' protocoltype='0x56' opcode='Request' arpsrcmacaddr='01:02:03:04:05:06' arpdstmacaddr='0a:0b:0c:0d:0e:0f' comment='arp rule'/> diff --git a/tests/nwfilterxml2xmlout/esp-ipv6-test.xml b/tests/nwfilterxml2xmlout/esp-ipv6-test.xml index 3852aaca47..c8744b86d8 100644 --- a/tests/nwfilterxml2xmlout/esp-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/esp-ipv6-test.xml @@ -7,6 +7,6 @@ <esp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33'/> </rule> <rule action='accept' direction='in' priority='500'> - <esp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='33'/> + <esp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/hex-data-test.xml b/tests/nwfilterxml2xmlout/hex-data-test.xml index 35a125b600..98eeac7152 100644 --- a/tests/nwfilterxml2xmlout/hex-data-test.xml +++ b/tests/nwfilterxml2xmlout/hex-data-test.xml @@ -7,7 +7,7 @@ <ip srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:ff' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' srcipaddr='10.1.2.3' srcipmask='32' dstipaddr='10.1.2.3' dstipmask='32' protocol='udp' srcportstart='0x123' srcportend='0x234' dstportstart='0x3456' dstportend='0x4567' dscp='0x32'/> </rule> <rule action='accept' direction='out' priority='500'> - <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='tcp' srcportstart='0x111' srcportend='400' dstportstart='0x3333' dstportend='65535'/> + <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::ffff:10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='tcp' srcportstart='0x111' srcportend='400' dstportstart='0x3333' dstportend='65535'/> </rule> <rule action='accept' direction='out' priority='500'> <arp srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:ff' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:ff' hwtype='0x12' protocoltype='0x56' opcode='Request' arpsrcmacaddr='01:02:03:04:05:06' arpdstmacaddr='0a:0b:0c:0d:0e:0f'/> diff --git a/tests/nwfilterxml2xmlout/icmpv6-test.xml b/tests/nwfilterxml2xmlout/icmpv6-test.xml index 3334038a84..314aad2137 100644 --- a/tests/nwfilterxml2xmlout/icmpv6-test.xml +++ b/tests/nwfilterxml2xmlout/icmpv6-test.xml @@ -7,6 +7,6 @@ <icmpv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33' type='255' code='255'/> </rule> <rule action='accept' direction='in' priority='500'> - <icmpv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='33'/> + <icmpv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='33'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/ipv6-test.xml b/tests/nwfilterxml2xmlout/ipv6-test.xml index ce9dd06233..3c5799590a 100644 --- a/tests/nwfilterxml2xmlout/ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/ipv6-test.xml @@ -1,7 +1,7 @@ <filter name='testcase' chain='root'> <uuid>5c6d49af-b071-6127-b4ec-6f8ed4b55335</uuid> <rule action='accept' direction='out' priority='500'> - <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='udp' srcportstart='20' srcportend='22' dstportstart='100' dstportend='101'/> + <ipv6 srcmacaddr='01:02:03:04:05:06' srcmacmask='ff:ff:ff:ff:ff:fe' dstmacaddr='aa:bb:cc:dd:ee:ff' dstmacmask='ff:ff:ff:ff:ff:80' srcipaddr='::ffff:10.1.2.3' srcipmask='22' dstipaddr='::10.1.2.3' dstipmask='113' protocol='udp' srcportstart='20' srcportend='22' dstportstart='100' dstportend='101'/> </rule> <rule action='accept' direction='inout' priority='500'> <ipv6 srcipaddr='1::2' srcipmask='128' dstipaddr='a:b:c::' dstipmask='65' protocol='tcp' srcportstart='20' srcportend='22' dstportstart='100' dstportend='101'/> diff --git a/tests/nwfilterxml2xmlout/sctp-ipv6-test.xml b/tests/nwfilterxml2xmlout/sctp-ipv6-test.xml index 3ef8589a00..87c8487257 100644 --- a/tests/nwfilterxml2xmlout/sctp-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/sctp-ipv6-test.xml @@ -7,6 +7,6 @@ <sctp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33' srcportstart='20' srcportend='21' dstportstart='100' dstportend='1111'/> </rule> <rule action='accept' direction='in' priority='500'> - <sctp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> + <sctp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/tcp-ipv6-test.xml b/tests/nwfilterxml2xmlout/tcp-ipv6-test.xml index fcbe7a4a0f..0755c1b75f 100644 --- a/tests/nwfilterxml2xmlout/tcp-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/tcp-ipv6-test.xml @@ -7,6 +7,6 @@ <tcp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33' srcportstart='20' srcportend='21' dstportstart='100' dstportend='1111'/> </rule> <rule action='accept' direction='in' priority='500'> - <tcp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> + <tcp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/udp-ipv6-test.xml b/tests/nwfilterxml2xmlout/udp-ipv6-test.xml index abcf698169..28b1a93f4d 100644 --- a/tests/nwfilterxml2xmlout/udp-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/udp-ipv6-test.xml @@ -7,6 +7,6 @@ <udp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipmask='128' dscp='33' srcportstart='20' srcportend='21' dstportstart='100' dstportend='1111'/> </rule> <rule action='accept' direction='in' priority='500'> - <udp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> + <udp-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='63' srcportstart='255' srcportend='256' dstportstart='65535'/> </rule> </filter> diff --git a/tests/nwfilterxml2xmlout/udplite-ipv6-test.xml b/tests/nwfilterxml2xmlout/udplite-ipv6-test.xml index 9f41181535..308fb98e6f 100644 --- a/tests/nwfilterxml2xmlout/udplite-ipv6-test.xml +++ b/tests/nwfilterxml2xmlout/udplite-ipv6-test.xml @@ -7,6 +7,6 @@ <udplite-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='a:b:c::' srcipmask='128' dscp='33'/> </rule> <rule action='accept' direction='in' priority='500'> - <udplite-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::10.1.2.3' dscp='33'/> + <udplite-ipv6 srcmacaddr='01:02:03:04:05:06' srcipaddr='::ffff:10.1.2.3' dscp='33'/> </rule> </filter> -- 2.34.1

On a Friday in 2022, Michal Privoznik wrote:
I've been trying to compile libvirt with musl lately and seen couple of tests failing. Some of them were related strictly to how musl works, but the rest are genuine bugs we have and it's by pure chance that we haven't met them with glibc (1/4 for instance).
Green pipeline can be seen here:
https://gitlab.com/MichalPrivoznik/libvirt/-/pipelines/483864407
See https://gitlab.com/libvirt/libvirt/-/blob/master/ci/README.rst on how to get FreeBSD and macOS coverage.
Michal Prívozník (4): vircgroupmock: Be wiser about detecting fakerootdir change vircgroupmock: Make global variables static sockettest: Check for IPv4-in-IPv6 parsing and formatting tests: Update IPv4-in-IPv6 addresses
tests/nwfilterxml2firewalldata/ah-ipv6-linux.args | 6 +++--- tests/nwfilterxml2firewalldata/ah-ipv6.xml | 2 +- .../nwfilterxml2firewalldata/all-ipv6-linux.args | 6 +++---
[...]
tests/sockettest.c | 2 ++ tests/vircgroupmock.c | 15 ++++++--------- 46 files changed, 75 insertions(+), 76 deletions(-)
Reviewed-by: Ján Tomko <jtomko@redhat.com> Jano
participants (2)
-
Ján Tomko
-
Michal Privoznik