about summary refs log tree commit diff
path: root/src/libnm-client-impl
diff options
context:
space:
mode:
authorSebastien Bacher <seb128@ubuntu.com>2021-08-25 15:24:42 +0200
committerSebastien Bacher <seb128@ubuntu.com>2021-08-25 15:24:42 +0200
commitdbb91282fa488964fb20595f9494a9f0e4f36a58 (patch)
tree142bc942e5320b35514cdf03a5f9f47a9b89df0e /src/libnm-client-impl
parent5f2ede3a2813b0e9204befdcfc67509d34be71c6 (diff)
parentcfb80376641fa49137b9996130352697e7f8b436 (diff)
Update upstream source from tag 'upstream/1.32.10'
Update to upstream version '1.32.10'
with Debian dir fcf2778b50b013ede3e7375bc1d829e984175658
Diffstat (limited to 'src/libnm-client-impl')
-rw-r--r--src/libnm-client-impl/libnm.ver5
-rw-r--r--src/libnm-client-impl/nm-libnm-utils.c11
-rw-r--r--src/libnm-client-impl/nm-property-infos-nmcli.xml3
-rw-r--r--src/libnm-client-impl/nm-settings-docs-gir.xml2
-rw-r--r--src/libnm-client-impl/tests/test-libnm.c54
5 files changed, 43 insertions, 32 deletions
diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver
index 65d52b1a..89a99af8 100644
--- a/src/libnm-client-impl/libnm.ver
+++ b/src/libnm-client-impl/libnm.ver
@@ -1793,3 +1793,8 @@ global:
 	nm_setting_match_new;
 	nm_setting_wired_get_accept_all_mac_addresses;
 } libnm_1_30_0;
+
+libnm_1_32_4 {
+global:
+	nm_setting_ip_config_get_required_timeout;
+} libnm_1_32_0;
diff --git a/src/libnm-client-impl/nm-libnm-utils.c b/src/libnm-client-impl/nm-libnm-utils.c
index 3cc88ef4..671466cf 100644
--- a/src/libnm-client-impl/nm-libnm-utils.c
+++ b/src/libnm-client-impl/nm-libnm-utils.c
@@ -160,14 +160,17 @@ _fixup_string(const char *       desc,
         p  = q + 1;
     }
 
-    /* replace '_', ',', ASCII control characters and parentheses, with space. */
+    /* replace '_', ',', ASCII control characters and everything inside parentheses, with space. */
     for (p = desc_full; p[0]; p++) {
         if (*p == '(')
             in_paren = TRUE;
-        if (NM_IN_SET(*p, '_', ',') || *p < ' ' || in_paren)
-            *p = ' ';
-        if (*p == ')')
+        else if (*p == ')')
             in_paren = FALSE;
+        else if (NM_IN_SET(*p, '_', ',') || nm_ascii_is_ctrl_or_del(*p) || in_paren) {
+            /* pass */
+        } else
+            continue;
+        *p = ' ';
     }
 
     /* Attempt to shorten ID by ignoring certain phrases */
diff --git a/src/libnm-client-impl/nm-property-infos-nmcli.xml b/src/libnm-client-impl/nm-property-infos-nmcli.xml
index 49f2e220..b771b74c 100644
--- a/src/libnm-client-impl/nm-property-infos-nmcli.xml
+++ b/src/libnm-client-impl/nm-property-infos-nmcli.xml
@@ -34,10 +34,11 @@
 <setting name="ip-tunnel">
 </setting>
 <setting name="ipv4">
-<property name="addresses" variable="addresses" format="a comma separated list of addresses" values="" default="" example="" description="A list of IPv4 addresses and their prefix length. Multiple addresses can be separated by comma. For example &quot;192.168.1.5/24, 10.1.0.5/24&quot;." />
+<property name="addresses" variable="addresses" format="a comma separated list of addresses" values="" default="" example="" description="A list of IPv4 addresses and their prefix length. Multiple addresses can be separated by comma. For example &quot;192.168.1.5/24, 10.1.0.5/24&quot;. The addresses are listed in increasing priority, meaning the last address will be the primary address." />
 <property name="routes" variable="routes" format="a comma separated list of routes" values="" default="" example="" description="A list of IPv4 destination addresses, prefix length, optional IPv4 next hop addresses, optional route metric, optional attribute. The valid syntax is: &quot;ip[/prefix] [next-hop] [metric] [attribute=val]...[,ip[/prefix]...]&quot;. For example &quot;192.0.2.0/24 10.1.1.1 77, 198.51.100.0/24&quot;." />
 </setting>
 <setting name="ipv6">
+<property name="addresses" variable="addresses" format="a comma separated list of addresses" values="" default="" example="" description="A list of IPv6 addresses and their prefix length. Multiple addresses can be separated by comma. For example &quot;2001:db8:85a3::8a2e:370:7334/64, 2001:db8:85a3::5/64&quot;. The addresses are listed in increasing priority, meaning the last address will be the primary address." />
 </setting>
 <setting name="macsec">
 </setting>
diff --git a/src/libnm-client-impl/nm-settings-docs-gir.xml b/src/libnm-client-impl/nm-settings-docs-gir.xml
index 5f8a1d9f..cbbae7b6 100644
--- a/src/libnm-client-impl/nm-settings-docs-gir.xml
+++ b/src/libnm-client-impl/nm-settings-docs-gir.xml
@@ -214,6 +214,7 @@
     <property name="may-fail" name_upper="MAY_FAIL" type="boolean" default="TRUE" description="If TRUE, allow overall network configuration to proceed even if the configuration specified by this property times out.  Note that at least one IP configuration must succeed or overall network configuration will still fail.  For example, in IPv6-only networks, setting this property to TRUE on the NMSettingIP4Config allows the overall network configuration to succeed if IPv4 configuration fails but IPv6 configuration completes successfully." />
     <property name="method" name_upper="METHOD" type="string" description='IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration.  The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.' />
     <property name="never-default" name_upper="NEVER_DEFAULT" type="boolean" default="FALSE" description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
+    <property name="required-timeout" name_upper="REQUIRED_TIMEOUT" type="int32" default="-1" description='The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).' />
     <property name="route-metric" name_upper="ROUTE_METRIC" type="int64" default="-1" description="The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric." />
     <property name="route-table" name_upper="ROUTE_TABLE" type="uint32" default="0" description="Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager." />
     <property name="routes" name_upper="ROUTES" type="array of array of uint32" description="Array of IP routes." />
@@ -241,6 +242,7 @@
     <property name="method" name_upper="METHOD" type="string" description='IP configuration method. NMSettingIP4Config and NMSettingIP6Config both support "disabled", "auto", "manual", and "link-local". See the subclass-specific documentation for other values. In general, for the "auto" method, properties such as "dns" and "routes" specify information that is added on to the information returned from automatic configuration.  The "ignore-auto-routes" and "ignore-auto-dns" properties modify this behavior. For methods that imply no upstream network, such as "shared" or "link-local", these properties must be empty. For IPv4 method "shared", the IP subnet can be configured by adding one manual IPv4 address or otherwise 10.42.x.0/24 is chosen. Note that the shared method must be configured on the interface which shares the internet to a subnet, not on the uplink which is shared.' />
     <property name="never-default" name_upper="NEVER_DEFAULT" type="boolean" default="FALSE" description="If TRUE, this connection will never be the default connection for this IP type, meaning it will never be assigned the default route by NetworkManager." />
     <property name="ra-timeout" name_upper="RA_TIMEOUT" type="int32" default="0" description="A timeout for waiting Router Advertisements in seconds. If zero (the default), a globally configured default is used. If still unspecified, the timeout depends on the sysctl settings of the device. Set to 2147483647 (MAXINT32) for infinity." />
+    <property name="required-timeout" name_upper="REQUIRED_TIMEOUT" type="int32" default="-1" description='The minimum time interval in milliseconds for which dynamic IP configuration should be tried before the connection succeeds. This property is useful for example if both IPv4 and IPv6 are enabled and are allowed to fail. Normally the connection succeeds as soon as one of the two address families completes; by setting a required timeout for e.g. IPv4, one can ensure that even if IP6 succeeds earlier than IPv4, NetworkManager waits some time for IPv4 before the connection becomes active. Note that if "may-fail" is FALSE for the same address family, this property has no effect as NetworkManager needs to wait for the full DHCP timeout. A zero value means that no required timeout is present, -1 means the default value (either configuration ipvx.required-timeout override or zero).' />
     <property name="route-metric" name_upper="ROUTE_METRIC" type="int64" default="-1" description="The default metric for routes that don't explicitly specify a metric. The default value -1 means that the metric is chosen automatically based on the device type. The metric applies to dynamic routes, manual (static) routes that don't have an explicit metric setting, address prefix routes, and the default route. Note that for IPv6, the kernel accepts zero (0) but coerces it to 1024 (user default). Hence, setting this property to zero effectively mean setting it to 1024. For IPv4, zero is a regular value for the metric." />
     <property name="route-table" name_upper="ROUTE_TABLE" type="uint32" default="0" description="Enable policy routing (source routing) and set the routing table used when adding routes. This affects all routes, including device-routes, IPv4LL, DHCP, SLAAC, default-routes and static routes. But note that static routes can individually overwrite the setting by explicitly specifying a non-zero routing table. If the table setting is left at zero, it is eligible to be overwritten via global configuration. If the property is zero even after applying the global configuration value, policy routing is disabled for the address family of this connection. Policy routing disabled means that NetworkManager will add all routes to the main table (except static routes that explicitly configure a different table). Additionally, NetworkManager will not delete any extraneous routes from tables except the main table. This is to preserve backward compatibility for users who manage routing tables outside of NetworkManager." />
     <property name="routes" name_upper="ROUTES" type="array of legacy IPv6 route struct" description="Array of IP routes." />
diff --git a/src/libnm-client-impl/tests/test-libnm.c b/src/libnm-client-impl/tests/test-libnm.c
index 6cb8076e..e470c63e 100644
--- a/src/libnm-client-impl/tests/test-libnm.c
+++ b/src/libnm-client-impl/tests/test-libnm.c
@@ -219,7 +219,7 @@ test_fixup_vendor_string(void)
         T_DATA("Memorex", "Memorex"),
         T_DATA("Micrel-Kendin", "Micrel-Kendin"),
         T_DATA("Microchip Technology, Inc.", "Microchip"),
-        T_DATA("Microcomputer Systems (M) Son", "Microcomputer"),
+        T_DATA("Microcomputer Systems (M) Son", "Microcomputer Son"),
         T_DATA("Microsoft Corp.", "Microsoft"),
         T_DATA("Microsoft Corporation", "Microsoft"),
         T_DATA("Micro-Star International Co., Ltd. [MSI]", "MSI"),
@@ -594,11 +594,11 @@ test_fixup_product_string(void)
         T_DATA("82599 Ethernet Controller Virtual Function", "82599 Virtual Function"),
         T_DATA("82599 Virtual Function", "82599 Virtual Function"),
         T_DATA("82801BA/BAM/CA/CAM Ethernet Controller", "82801BA/BAM/CA/CAM"),
-        T_DATA("82801CAM (ICH3) PRO/100 VE Ethernet Controller", "82801CAM"),
-        T_DATA("82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller", "82801CAM"),
-        T_DATA("82801CAM (ICH3) PRO/100 VM Ethernet Controller", "82801CAM"),
-        T_DATA("82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller", "82801CAM"),
-        T_DATA("82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller", "82801CAM"),
+        T_DATA("82801CAM (ICH3) PRO/100 VE Ethernet Controller", "82801CAM PRO/100 VE"),
+        T_DATA("82801CAM (ICH3) PRO/100 VE (LOM) Ethernet Controller", "82801CAM PRO/100 VE"),
+        T_DATA("82801CAM (ICH3) PRO/100 VM Ethernet Controller", "82801CAM PRO/100 VM"),
+        T_DATA("82801CAM (ICH3) PRO/100 VM (KM) Ethernet Controller", "82801CAM PRO/100 VM"),
+        T_DATA("82801CAM (ICH3) PRO/100 VM (LOM) Ethernet Controller", "82801CAM PRO/100 VM"),
         T_DATA("82801DB PRO/100 VE (CNR) Ethernet Controller", "82801DB PRO/100 VE"),
         T_DATA("82801DB PRO/100 VE (LOM) Ethernet Controller", "82801DB PRO/100 VE"),
         T_DATA("82801DB PRO/100 VE (MOB) Ethernet Controller", "82801DB PRO/100 VE"),
@@ -1009,25 +1009,25 @@ test_fixup_product_string(void)
         T_DATA("Ethernet Adapter", NULL),
         T_DATA("Ethernet adapter [U2L 100P-Y1]", "U2L 100P-Y1"),
         T_DATA("Ethernet Adaptive Virtual Function", "Adaptive Virtual Function"),
-        T_DATA("Ethernet Connection (2) I218-LM", NULL),
-        T_DATA("Ethernet Connection (2) I218-V", NULL),
-        T_DATA("Ethernet Connection (2) I219-LM", NULL),
-        T_DATA("Ethernet Connection (2) I219-V", NULL),
-        T_DATA("Ethernet Connection (3) I218-LM", NULL),
-        T_DATA("Ethernet Connection (3) I218-V", NULL),
-        T_DATA("Ethernet Connection (3) I219-LM", NULL),
-        T_DATA("Ethernet Connection (4) I219-LM", NULL),
-        T_DATA("Ethernet Connection (4) I219-V", NULL),
-        T_DATA("Ethernet Connection (5) I219-LM", NULL),
-        T_DATA("Ethernet Connection (5) I219-V", NULL),
-        T_DATA("Ethernet Connection (6) I219-LM", NULL),
-        T_DATA("Ethernet Connection (6) I219-V", NULL),
-        T_DATA("Ethernet Connection (7) I219-LM", NULL),
-        T_DATA("Ethernet Connection (7) I219-V", NULL),
-        T_DATA("Ethernet Connection (8) I219-LM", NULL),
-        T_DATA("Ethernet Connection (8) I219-V", NULL),
-        T_DATA("Ethernet Connection (9) I219-LM", NULL),
-        T_DATA("Ethernet Connection (9) I219-V", NULL),
+        T_DATA("Ethernet Connection (2) I218-LM", "I218-LM"),
+        T_DATA("Ethernet Connection (2 I218-V", NULL),
+        T_DATA("Ethernet Connection (2 I219-LM", NULL),
+        T_DATA("Ethernet Connection (2 I219-V", NULL),
+        T_DATA("Ethernet Connection (3) I218-LM", "I218-LM"),
+        T_DATA("Ethernet Connection (3) I218-V", "I218-V"),
+        T_DATA("Ethernet Connection (3 I219-LM", NULL),
+        T_DATA("Ethernet Connection (4 I219-LM", NULL),
+        T_DATA("Ethernet Connection (4 I219-V", NULL),
+        T_DATA("Ethernet Connection (5 I219-LM", NULL),
+        T_DATA("Ethernet Connection (5 I219-V", NULL),
+        T_DATA("Ethernet Connection (6 I219-LM", NULL),
+        T_DATA("Ethernet Connection (6 I219-V", NULL),
+        T_DATA("Ethernet Connection (7 I219-LM", NULL),
+        T_DATA("Ethernet Connection (7 I219-V", NULL),
+        T_DATA("Ethernet Connection (8 I219-LM", NULL),
+        T_DATA("Ethernet Connection (8 I219-V", NULL),
+        T_DATA("Ethernet Connection (9 I219-LM", NULL),
+        T_DATA("Ethernet Connection (9 I219-V", NULL),
         T_DATA("Ethernet Connection I217-LM", "I217-LM"),
         T_DATA("Ethernet Connection I217-V", "I217-V"),
         T_DATA("Ethernet Connection I218-LM", "I218-LM"),
@@ -2160,12 +2160,12 @@ test_fixup_product_string(void)
                "WLM-20U2/GN-1080"),
         T_DATA("WLP-UC-AG300 Wireless LAN Adapter", "WLP-UC-AG300"),
         T_DATA("WM168g 802.11bg Wireless Adapter [Intersil ISL3886]", "WM168g"),
-        T_DATA("WN111(v2) RangeMax Next Wireless [Atheros AR9170+AR9101]", "WN111"),
+        T_DATA("WN111(v2) RangeMax Next Wireless [Atheros AR9170+AR9101]", "WN111 RangeMax Next"),
         T_DATA("WNA1000M 802.11bgn [Realtek RTL8188CUS]", "WNA1000M"),
         T_DATA("WNA1000Mv2 802.11bgn [Realtek RTL8188CUS?]", "WNA1000Mv2"),
         T_DATA("WNA1000 Wireless-N 150 [Atheros AR9170+AR9101]", "WNA1000 150"),
         T_DATA("WNA1100 Wireless-N 150 [Atheros AR9271]", "WNA1100 150"),
-        T_DATA("WNA3100M(v1) Wireless-N 300 [Realtek RTL8192CU]", "WNA3100M"),
+        T_DATA("WNA3100M(v1) Wireless-N 300 [Realtek RTL8192CU]", "WNA3100M 300"),
         T_DATA("WNDA3100v1 802.11abgn [Atheros AR9170+AR9104]", "WNDA3100v1"),
         T_DATA("WNDA3200 802.11abgn Wireless Adapter [Atheros AR7010+AR9280]", "WNDA3200"),
         T_DATA("WNDA4100 802.11abgn 3x3:3 [Ralink RT3573]", "WNDA4100"),