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>2025-02-12 13:46:50 +0100
committerMichael Biebl <biebl@debian.org>2025-02-12 13:46:50 +0100
commit8bdf070ff046f482f6eb5e2b15ebc216f5d1e3da (patch)
treef706478d189d54c6532e8863d4b0d5ff5575af60 /src/core/platform/tests/test-route.c
parent818258cf34b83fbc754633295e1052d4752d7b15 (diff)
New upstream version 1.51.90 upstream/1.51.90
Diffstat (limited to 'src/core/platform/tests/test-route.c')
-rw-r--r--src/core/platform/tests/test-route.c30
1 files changed, 16 insertions, 14 deletions
diff --git a/src/core/platform/tests/test-route.c b/src/core/platform/tests/test-route.c
index 9aa21a9a..a05362f2 100644
--- a/src/core/platform/tests/test-route.c
+++ b/src/core/platform/tests/test-route.c
@@ -574,6 +574,7 @@ test_ip4_route_get(void)
     result = nm_platform_ip_route_get(NM_PLATFORM_GET,
                                       AF_INET,
                                       &a,
+                                      0,
                                       nmtst_get_rand_uint32() % 2 ? 0 : ifindex,
                                       &route);
 
@@ -638,7 +639,7 @@ test_ip4_route_options(gconstpointer test_data)
 
     switch (TEST_IDX) {
     case 1:
-        rts_add[rts_n++] = ((NMPlatformIP4Route){
+        rts_add[rts_n++] = ((NMPlatformIP4Route) {
             .ifindex    = IFINDEX,
             .rt_source  = NM_IP_CONFIG_SOURCE_USER,
             .network    = nmtst_inet4_from_string("172.16.1.0"),
@@ -658,7 +659,7 @@ test_ip4_route_options(gconstpointer test_data)
         });
         break;
     case 2:
-        addr[addr_n++]   = ((NMPlatformIP4Address){
+        addr[addr_n++]   = ((NMPlatformIP4Address) {
               .ifindex      = IFINDEX,
               .address      = nmtst_inet4_from_string("172.16.1.5"),
               .peer_address = nmtst_inet4_from_string("172.16.1.5"),
@@ -667,7 +668,7 @@ test_ip4_route_options(gconstpointer test_data)
               .preferred    = NM_PLATFORM_LIFETIME_PERMANENT,
               .n_ifa_flags  = 0,
         });
-        rts_add[rts_n++] = ((NMPlatformIP4Route){
+        rts_add[rts_n++] = ((NMPlatformIP4Route) {
             .ifindex    = IFINDEX,
             .rt_source  = NM_IP_CONFIG_SOURCE_USER,
             .network    = nmtst_inet4_from_string("172.17.1.0"),
@@ -676,7 +677,7 @@ test_ip4_route_options(gconstpointer test_data)
             .metric     = 20,
             .n_nexthops = 1,
         });
-        rts_add[rts_n++] = ((NMPlatformIP4Route){
+        rts_add[rts_n++] = ((NMPlatformIP4Route) {
             .ifindex     = IFINDEX,
             .rt_source   = NM_IP_CONFIG_SOURCE_USER,
             .network     = nmtst_inet4_from_string("172.19.1.0"),
@@ -766,6 +767,7 @@ test_ip6_route_get(void)
     result = nm_platform_ip_route_get(NM_PLATFORM_GET,
                                       AF_INET6,
                                       a,
+                                      0,
                                       nmtst_get_rand_uint32() % 2 ? 0 : ifindex,
                                       &route);
 
@@ -801,7 +803,7 @@ test_ip6_route_options(gconstpointer test_data)
 
     switch (TEST_IDX) {
     case 1:
-        rts_add[rts_n++] = ((NMPlatformIP6Route){
+        rts_add[rts_n++] = ((NMPlatformIP6Route) {
             .ifindex   = IFINDEX,
             .rt_source = NM_IP_CONFIG_SOURCE_USER,
             .network   = nmtst_inet6_from_string("2001:db8:a:b:0:0:0:0"),
@@ -817,7 +819,7 @@ test_ip6_route_options(gconstpointer test_data)
         });
         break;
     case 2:
-        addr[addr_n++]   = ((NMPlatformIP6Address){
+        addr[addr_n++]   = ((NMPlatformIP6Address) {
               .ifindex      = IFINDEX,
               .address      = nmtst_inet6_from_string("2000::2"),
               .plen         = 128,
@@ -826,7 +828,7 @@ test_ip6_route_options(gconstpointer test_data)
               .preferred    = NM_PLATFORM_LIFETIME_PERMANENT,
               .n_ifa_flags  = 0,
         });
-        rts_add[rts_n++] = ((NMPlatformIP6Route){
+        rts_add[rts_n++] = ((NMPlatformIP6Route) {
             .ifindex   = IFINDEX,
             .rt_source = NM_IP_CONFIG_SOURCE_USER,
             .network   = nmtst_inet6_from_string("1010::1"),
@@ -837,7 +839,7 @@ test_ip6_route_options(gconstpointer test_data)
         });
         break;
     case 3:
-        addr[addr_n++]   = ((NMPlatformIP6Address){
+        addr[addr_n++]   = ((NMPlatformIP6Address) {
               .ifindex      = IFINDEX,
               .address      = nmtst_inet6_from_string("2001:db8:8086::5"),
               .plen         = 128,
@@ -846,7 +848,7 @@ test_ip6_route_options(gconstpointer test_data)
               .preferred    = NM_PLATFORM_LIFETIME_PERMANENT,
               .n_ifa_flags  = 0,
         });
-        rts_add[rts_n++] = ((NMPlatformIP6Route){
+        rts_add[rts_n++] = ((NMPlatformIP6Route) {
             .ifindex   = IFINDEX,
             .rt_source = nmp_utils_ip_config_source_round_trip_rtprot(NM_IP_CONFIG_SOURCE_USER),
             .network   = nmtst_inet6_from_string("2001:db8:8086::"),
@@ -854,7 +856,7 @@ test_ip6_route_options(gconstpointer test_data)
             .metric    = 10021,
             .mss       = 0,
         });
-        rts_add[rts_n++] = ((NMPlatformIP6Route){
+        rts_add[rts_n++] = ((NMPlatformIP6Route) {
             .ifindex   = IFINDEX,
             .rt_source = nmp_utils_ip_config_source_round_trip_rtprot(NM_IP_CONFIG_SOURCE_USER),
             .network   = nmtst_inet6_from_string("2001:db8:abad:c0de::"),
@@ -1595,7 +1597,7 @@ test_rule(gconstpointer test_data)
 
 #define RR(...)                                  \
     nmp_object_new(NMP_OBJECT_TYPE_ROUTING_RULE, \
-                   (const NMPlatformObject *) &((NMPlatformRoutingRule){__VA_ARGS__}))
+                   (const NMPlatformObject *) &((NMPlatformRoutingRule) {__VA_ARGS__}))
 
     objs = g_ptr_array_new_with_free_func((GDestroyNotify) nmp_object_unref);
 
@@ -1926,11 +1928,11 @@ test_blackhole(gconstpointer test_data)
     rtn_type = nmtst_rand_select(RTN_BLACKHOLE, RTN_UNREACHABLE, RTN_PROHIBIT, RTN_THROW);
 
     if (IS_IPv4) {
-        rr.r4 = (const NMPlatformIP4Route){
+        rr.r4 = (const NMPlatformIP4Route) {
             .type_coerced = nm_platform_route_type_coerce(rtn_type),
         };
     } else {
-        rr.r6 = (const NMPlatformIP6Route){
+        rr.r6 = (const NMPlatformIP6Route) {
             .type_coerced = nm_platform_route_type_coerce(rtn_type),
             .metric       = 1000,
         };
@@ -1987,7 +1989,7 @@ again:
 
     if (p == -1) {
         static gsize              lock;
-        const NMPlatformMptcpAddr mptcp_addr = (NMPlatformMptcpAddr){
+        const NMPlatformMptcpAddr mptcp_addr = (NMPlatformMptcpAddr) {
             .id          = 1,
             .addr_family = AF_INET,
             .addr.addr4  = nmtst_inet4_from_string("1.2.3.4"),