about summary refs log tree commit diff
path: root/src/core/platform/tests/test-route.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-08-12 19:27:49 +0200
committerMichael Biebl <biebl@debian.org>2022-08-12 19:27:49 +0200
commit3237c6678bee0411e44b2d2055fb16c2f86da218 (patch)
treee3d8a0dab846c99fa6132c945ec3bbd59b1cc170 /src/core/platform/tests/test-route.c
parentb020a0dc29267ec099f631e93f214a0d3549ba40 (diff)
parent6accbd3ec0e42d8633bbde4d47ed7bfe854e7e0b (diff)
Update upstream source from tag 'upstream/1.38.4'
Update to upstream version '1.38.4'
with Debian dir 24b65b102e62687c29d90ce76c47d939b35b96ad
Diffstat (limited to 'src/core/platform/tests/test-route.c')
-rw-r--r--src/core/platform/tests/test-route.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/platform/tests/test-route.c b/src/core/platform/tests/test-route.c
index 2d39cb37..85838267 100644
--- a/src/core/platform/tests/test-route.c
+++ b/src/core/platform/tests/test-route.c
@@ -1390,12 +1390,17 @@ again_table:
         rr->protocol = _rr_rand_choose_u8(nmtst_get_rand_uint32());
 
 #define IPTOS_TOS_MASK 0x1E
+#define INET_DSCP_MASK 0xFC
 
 again_tos:
     rr->tos = _rr_rand_choose_u8(nmtst_get_rand_uint32());
+
     if (rr->addr_family == AF_INET && rr->tos & ~IPTOS_TOS_MASK)
         goto again_tos;
 
+    if (rr->tos & ~INET_DSCP_MASK)
+        goto again_tos;
+
     if (_rule_check_kernel_support(platform, FRA_IP_PROTO))
         rr->ip_proto = _rr_rand_choose_u8(nmtst_get_rand_uint32());