release: bump version to 1.45.1 (development)

This commit is contained in:
Beniamino Galvani 2023-08-09 18:04:59 +02:00
commit 3f220e7dc5
38 changed files with 757 additions and 453 deletions

View file

@ -7,8 +7,8 @@ dnl - add corresponding NM_VERSION_x_y_z macros in
dnl "shared/nm-version-macros.h.in"
dnl - update number in meson.build
m4_define([nm_major_version], [1])
m4_define([nm_minor_version], [44])
m4_define([nm_micro_version], [0])
m4_define([nm_minor_version], [45])
m4_define([nm_micro_version], [1])
m4_define([nm_version],
[nm_major_version.nm_minor_version.nm_micro_version])

View file

@ -79,6 +79,13 @@
-->
<property name="MaxBitrate" type="u" access="read"/>
<!--
Bandwidth:
The bandwidth announced by the access point in MHz.
-->
<property name="Bandwidth" type="u" access="read"/>
<!--
Strength:

View file

@ -856,7 +856,7 @@ ipv6.ip6-privacy=0
<para>
Not all properties can be overwritten, only the following
properties are supported to have their default values configured
(see <link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link> for details).
(see <link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link> for details).
</para>
<para>
<!-- The following comment is used by check-config-options.sh, don't remove it. -->
@ -1353,7 +1353,7 @@ managed=1
<para>
Like the per-connection settings <literal>ethernet.generate-mac-address-mask</literal>
and <literal>wifi.generate-mac-address-mask</literal>, this allows to configure the
generated MAC addresses during scanning. See <citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry>
generated MAC addresses during scanning. See <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry>
for details.
</para>
</listitem>
@ -1656,7 +1656,7 @@ enable=nm-version-min:1.3,nm-version-min:1.2.6,nm-version-min:1.0.16
private keys in plain text, so it will be made readable only to
root, and the plugin will ignore files that are readable or
writable by any user or group other than root. See "Secret flag types"
in <link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
in <link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
for how to avoid storing passwords in plain text.
</para>
<para>
@ -1881,7 +1881,7 @@ interface-name:vboxnet*,except:interface-name:vboxnet2
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
<link linkend='nm-online'><citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>
</para>

View file

@ -357,7 +357,7 @@
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<link linkend='nmcli-examples'><citerefentry><refentrytitle>nmcli-examples</refentrytitle><manvolnum>7</manvolnum></citerefentry></link>,
<link linkend='nm-online'><citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry>

View file

@ -170,7 +170,7 @@ Connection 'ovs-slave-eth2' (475ac1bf-30b2-4534-a877-27f33f58b082) successfully
<prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth3 master bond0</userinput>
Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully added.
</screen>
<para>It's just a Port with multiple interfaces. See nm-settings manual for
<para>It's just a Port with multiple interfaces. See nm-settings-nmcli manual for
Bonding options you can use with "nmcli c add" or "nmcli c modify". You could
even set a VLAN tag on the same Port to do VLAN tagging and bonding at the same
time.</para>
@ -197,7 +197,7 @@ Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully
<ulink url="https://www.rfc-editor.org/rfc/rfc7047.txt">RFC 7047: The Open vSwitch Database Management Protocol</ulink>,
<citerefentry><refentrytitle>ovs-vsctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
<citerefentry><refentrytitle>ovs-vswitchd.conf.db</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>
</para>
</refsect1>

View file

@ -36,7 +36,7 @@
<refsect1 id='description'><title>Description</title>
<para>
NetworkManager is based on the concept of connection profiles that contain
network configuration (see <citerefentry><refentrytitle>nm-settings</refentrytitle>
network configuration (see <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details). The profiles can be
stored in various formats. NetworkManager uses plugins for reading and writing
the data. The plugins can be configured in <citerefentry>
@ -322,7 +322,7 @@ DEVICETYPE=TeamPort
<para><filename>/usr/share/doc/initscripts/sysconfig.txt</filename></para>
</refsect1>
<refsect1 id='see_also'><title>See Also</title>
<para><link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<para><link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-keyfile'><citerefentry><refentrytitle>nm-settings-keyfile</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,

View file

@ -32,7 +32,7 @@
<refsect1 id='description'><title>Description</title>
<para>
NetworkManager is based on the concept of connection profiles that contain
network configuration (see <citerefentry><refentrytitle>nm-settings</refentrytitle>
network configuration (see <citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle>
<manvolnum>5</manvolnum></citerefentry> for details). The profiles can be
stored in various formats. NetworkManager uses plugins for reading and writing
the data. The plugins can be configured in <citerefentry>
@ -56,7 +56,7 @@
The <emphasis>keyfile</emphasis> config format is a simple .ini-style
format. It consists of sections (groups) of key-value pairs. Each section
corresponds to a setting name as described in the settings specification
(<citerefentry><refentrytitle>nm-settings</refentrytitle>
(<citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle>
<manvolnum>5</manvolnum></citerefentry>). Each configuration key/value
pair in the section is one of the properties listed in the settings
specification. The majority of properties of the specification is written
@ -195,7 +195,7 @@ id=4
There are several exceptions to this rule, mainly for making keyfile syntax easier
for humans. The exceptions handled specially by <emphasis>keyfile</emphasis>
plugin are listed below. Refer to
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
for all available settings and properties and their description.
</para>
<formalpara><title>Name aliases</title>
@ -246,7 +246,7 @@ id=4
</refsect1>
<refsect1 id='see_also'><title>See Also</title>
<para><link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<para><link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-ifcfg-rh'><citerefentry><refentrytitle>nm-settings-ifcfg-rh</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,

View file

@ -189,7 +189,7 @@ B,DISPATCH</screen>
This command activates a VPN connection profile enabling nmcli to interact with the user
('--ask'): this will allow nmcli to prompt for the VPN password on the command line when
the <emphasis>password-flags</emphasis> are set to '0x02' ('always ask', see
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>
).
This is particularly useful for OTP based VPNs, as the user needs to be prompted for the
password each time the connection is activated.
@ -675,7 +675,7 @@ Type "Yes" to commit the changes: <userinput>Yes</userinput></screen>
<link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<link linkend='NetworkManager'><citerefentry><refentrytitle>NetworkManager</refentrytitle><manvolnum>8</manvolnum></citerefentry></link>,
<link linkend='NetworkManager.conf'><citerefentry><refentrytitle>NetworkManager.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
<link linkend='nm-online'><citerefentry><refentrytitle>nm-online</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>,
<citerefentry><refentrytitle>nm-applet</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
<citerefentry><refentrytitle>nm-connection-editor</refentrytitle><manvolnum>1</manvolnum></citerefentry>

View file

@ -6,7 +6,7 @@ project(
# - add corresponding NM_VERSION_x_y_z macros in
# "src/libnm-core-public/nm-version-macros.h.in"
# - update number in configure.ac
version: '1.44.0',
version: '1.45.1',
license: 'GPL2+',
default_options: [
'buildtype=debugoptimized',

View file

@ -720,7 +720,7 @@ _peers_retry_in_msec(PeerData *peer_data, gboolean after_failure)
return RETRY_IN_MSEC_MAX;
/* double the retry-time, starting with one second. */
return NM_MIN(RETRY_IN_MSEC_MAX, (1u << peer_data->ep_resolv.resolv_fail_count) * 500);
return NM_MIN(RETRY_IN_MSEC_MAX, (1l << peer_data->ep_resolv.resolv_fail_count) * 500);
}
static void

View file

@ -5701,7 +5701,7 @@ out:
return FALSE;
}
#define CONCHECK_P_PROBE_INTERVAL 1
#define CONCHECK_P_PROBE_INTERVAL 1u
static void
concheck_periodic_schedule_set(NMDevice *self, int addr_family, ConcheckScheduleMode mode)
@ -5873,7 +5873,7 @@ concheck_update_interval(NMDevice *self, int addr_family, gboolean check_now)
new_interval = nm_connectivity_get_interval(concheck_get_mgr(self));
new_interval = NM_MIN(new_interval, 7 * 24 * 3600);
new_interval = NM_MIN(new_interval, 7u * 24u * 3600u);
if (new_interval != priv->concheck_x[IS_IPv4].p_max_interval) {
_LOGT(LOGD_CONCHECK,
@ -11546,13 +11546,13 @@ _commit_mtu(NMDevice *self)
mtu_plat = nm_platform_link_get_mtu(nm_device_get_platform(self), ifindex);
if (ip6_mtu) {
ip6_mtu = NM_MAX(1280, ip6_mtu);
ip6_mtu = NM_MAX(1280u, ip6_mtu);
if (!mtu_desired)
mtu_desired = mtu_plat;
if (mtu_desired) {
mtu_desired = NM_MAX(1280, mtu_desired);
mtu_desired = NM_MAX(1280u, mtu_desired);
if (mtu_desired < ip6_mtu)
ip6_mtu = mtu_desired;

View file

@ -36,6 +36,7 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMWifiAP,
PROP_HW_ADDRESS,
PROP_MODE,
PROP_MAX_BITRATE,
PROP_BANDWIDTH,
PROP_STRENGTH,
PROP_LAST_SEEN, );
@ -47,6 +48,7 @@ struct _NMWifiAPPrivate {
guint8 strength;
guint32 freq; /* Frequency in MHz; ie 2412 (== 2.412 GHz) */
guint32 max_bitrate; /* Maximum bitrate of the AP in Kbit/s (ie 54000 Kb/s == 54Mbit/s) */
guint32 bandwidth; /* Bandwidth of the AP in MHz */
gint64
last_seen_msec; /* Timestamp when the AP was seen lastly (in nm_utils_get_monotonic_timestamp_*() scale).
@ -277,6 +279,32 @@ nm_wifi_ap_get_max_bitrate(NMWifiAP *ap)
return NM_WIFI_AP_GET_PRIVATE(ap)->max_bitrate;
}
guint32
nm_wifi_ap_get_bandwidth(NMWifiAP *ap)
{
g_return_val_if_fail(NM_IS_WIFI_AP(ap), 0);
g_return_val_if_fail(nm_dbus_object_is_exported(NM_DBUS_OBJECT(ap)), 0);
return NM_WIFI_AP_GET_PRIVATE(ap)->bandwidth;
}
gboolean
nm_wifi_ap_set_bandwidth(NMWifiAP *ap, guint32 bandwidth)
{
NMWifiAPPrivate *priv;
g_return_val_if_fail(NM_IS_WIFI_AP(ap), FALSE);
priv = NM_WIFI_AP_GET_PRIVATE(ap);
if (priv->bandwidth != bandwidth) {
priv->bandwidth = bandwidth;
_notify(ap, PROP_BANDWIDTH);
return TRUE;
}
return FALSE;
}
gboolean
nm_wifi_ap_set_max_bitrate(NMWifiAP *ap, guint32 bitrate)
{
@ -393,6 +421,7 @@ nm_wifi_ap_update_from_properties(NMWifiAP *ap, const NMSupplicantBssInfo *bss_i
}
changed |= nm_wifi_ap_set_max_bitrate(ap, bss_info->max_rate);
changed |= nm_wifi_ap_set_bandwidth(ap, bss_info->bandwidth);
if (priv->metered != bss_info->metered) {
priv->metered = bss_info->metered;
@ -683,6 +712,9 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
case PROP_MAX_BITRATE:
g_value_set_uint(value, priv->max_bitrate);
break;
case PROP_BANDWIDTH:
g_value_set_uint(value, priv->bandwidth);
break;
case PROP_STRENGTH:
g_value_set_uchar(value, priv->strength);
break;
@ -873,6 +905,7 @@ static const NMDBusInterfaceInfoExtended interface_info_access_point = {
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("MaxBitrate",
"u",
NM_WIFI_AP_MAX_BITRATE),
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("Bandwidth", "u", NM_WIFI_AP_BANDWIDTH),
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("Strength", "y", NM_WIFI_AP_STRENGTH),
NM_DEFINE_DBUS_PROPERTY_INFO_EXTENDED_READABLE("LastSeen",
"i",
@ -979,6 +1012,14 @@ nm_wifi_ap_class_init(NMWifiAPClass *ap_class)
-1,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
obj_properties[PROP_BANDWIDTH] = g_param_spec_uint(NM_WIFI_AP_BANDWIDTH,
"",
"",
0,
G_MAXUINT32,
0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
g_object_class_install_properties(object_class, _PROPERTY_ENUMS_LAST, obj_properties);
}

View file

@ -27,6 +27,7 @@
#define NM_WIFI_AP_HW_ADDRESS "hw-address"
#define NM_WIFI_AP_MODE "mode"
#define NM_WIFI_AP_MAX_BITRATE "max-bitrate"
#define NM_WIFI_AP_BANDWIDTH "bandwidth"
#define NM_WIFI_AP_STRENGTH "strength"
#define NM_WIFI_AP_LAST_SEEN "last-seen"
@ -78,6 +79,8 @@ guint32 nm_wifi_ap_get_freq(NMWifiAP *ap);
gboolean nm_wifi_ap_set_freq(NMWifiAP *ap, guint32 freq);
guint32 nm_wifi_ap_get_max_bitrate(NMWifiAP *ap);
gboolean nm_wifi_ap_set_max_bitrate(NMWifiAP *ap, guint32 bitrate);
guint32 nm_wifi_ap_get_bandwidth(NMWifiAP *ap);
gboolean nm_wifi_ap_set_bandwidth(NMWifiAP *ap, guint32 bandwidth);
gboolean nm_wifi_ap_get_fake(const NMWifiAP *ap);
gboolean nm_wifi_ap_set_fake(NMWifiAP *ap, gboolean fake);
NM80211ApFlags nm_wifi_ap_get_flags(const NMWifiAP *self);

View file

@ -159,7 +159,7 @@ do_connect:
error->message,
try_count,
(long long) (time_end - remaining_time - time_start) / 1000);
interval = NM_CLAMP((gint64) (100L * (1L << NM_MIN(try_count, 31))), 5000, 100000);
interval = NM_CLAMP((gint64) (100L * (1L << NM_MIN(try_count, 31u))), 5000, 100000);
g_usleep(NM_MIN(interval, remaining_time));
g_clear_error(&error);
goto do_connect;
@ -222,7 +222,7 @@ do_notify:
gint64 interval;
_LOGi("failure to call notify: %s (retry %u)", error->message, try_count);
interval = NM_CLAMP((gint64) (100L * (1L << NM_MIN(try_count, 31))), 5000, 25000);
interval = NM_CLAMP((gint64) (100L * (1L << NM_MIN(try_count, 31u))), 5000, 25000);
g_usleep(NM_MIN(interval, remaining_time));
g_clear_error(&error);
goto do_notify;

View file

@ -83,12 +83,12 @@ nm_dnsmasq_utils_get_range(const NMPlatformIP4Address *addr,
mid = (host & netmask) | (((first + last) / 2) & ~netmask);
if (host > mid) {
/* use lower range */
reserved = NM_MIN(((host - first) / 10), 8);
reserved = NM_MIN(((host - first) / 10u), 8u);
last = host - 1 - reserved;
first = NM_MAX(first, last > NUM ? last - NUM : 0);
} else {
/* use upper range */
reserved = NM_MIN(((last - host) / 10), 8);
reserved = NM_MIN(((last - host) / 10u), 8u);
first = host + 1 + reserved;
last = NM_MIN(last, first < 0xFFFFFFFF - NUM ? first + NUM : 0xFFFFFFFF);
}

View file

@ -4779,15 +4779,91 @@ get_max_rate_vht(const guint8 *bytes, guint len, guint32 *out_maxrate)
return TRUE;
}
static gboolean
get_bandwidth_ht(const guint8 *bytes, guint len, guint32 *out_bandwidth)
{
guint8 ht_op_flag_group;
/* http://standards.ieee.org/getieee802/download/802.11-2012.pdf
* https://mrncciew.com/2014/11/04/cwap-ht-operations-ie/
* IEEE std 802.11-2020 section 9.4.2.56
*/
if (len != 22)
return FALSE;
ht_op_flag_group = bytes[1];
/* Check bit for 20Mhz or 40Mhz */
if (ht_op_flag_group & (1 << 2))
*out_bandwidth = 40;
else
*out_bandwidth = 20;
return TRUE;
}
static gboolean
get_bandwidth_vht(const guint8 *bytes, guint len, guint32 *out_bandwidth)
{
guint8 sta_channel_width;
guint8 ccfs0;
guint8 ccfs1;
/* http://chimera.labs.oreilly.com/books/1234000001739/ch03.html#management_frames
* https://community.arubanetworks.com/community-home/librarydocuments/viewdocument?DocumentKey=799aad1b-d9c4-421a-a492-a111e8680d34&CommunityKey=39a6bdf4-2376-46f9-853a-49420d2d0caa&tab=librarydocuments
* IEEE Std 802.11-2020 section 9.4.2.158
*/
if (len < 3)
return FALSE;
sta_channel_width = bytes[0];
ccfs0 = bytes[1];
ccfs1 = bytes[2];
switch (sta_channel_width) {
case 0:
/* we rely on HT Operation IE value*/
return FALSE;
case 1:
if (ccfs1 == 0)
*out_bandwidth = 80;
else if (abs(ccfs1 - ccfs0) == 8)
*out_bandwidth = 160;
else if (abs(ccfs1 - ccfs0) > 16)
/* we are considering 80+80 as 160 */
*out_bandwidth = 160;
else
/* falling back to 80 MHz */
*out_bandwidth = 80;
break;
case 2:
/* deprecated */
*out_bandwidth = 160;
break;
case 3:
/* deprecated */
*out_bandwidth = 160;
break;
default:
return FALSE;
}
return TRUE;
}
/* Management Frame Information Element IDs, ieee80211_eid */
#define WLAN_EID_HT_CAPABILITY 45
#define WLAN_EID_HT_OPERATION 61
#define WLAN_EID_VHT_CAPABILITY 191
#define WLAN_EID_VHT_OPERATION 192
#define WLAN_EID_VENDOR_SPECIFIC 221
void
nm_wifi_utils_parse_ies(const guint8 *bytes,
gsize len,
guint32 *out_max_rate,
guint32 *out_bandwidth,
gboolean *out_metered,
gboolean *out_owe_transition_mode)
{
@ -4795,6 +4871,7 @@ nm_wifi_utils_parse_ies(const guint8 *bytes,
guint32 m;
NM_SET_OUT(out_max_rate, 0);
NM_SET_OUT(out_bandwidth, 0);
NM_SET_OUT(out_metered, FALSE);
NM_SET_OUT(out_owe_transition_mode, FALSE);
@ -4816,12 +4893,20 @@ nm_wifi_utils_parse_ies(const guint8 *bytes,
*out_max_rate = NM_MAX(*out_max_rate, m);
}
break;
case WLAN_EID_HT_OPERATION:
if (out_bandwidth)
get_bandwidth_ht(bytes, elem_len, out_bandwidth);
break;
case WLAN_EID_VHT_CAPABILITY:
if (out_max_rate) {
if (get_max_rate_vht(bytes, elem_len, &m))
*out_max_rate = NM_MAX(*out_max_rate, m);
}
break;
case WLAN_EID_VHT_OPERATION:
if (out_bandwidth)
get_bandwidth_vht(bytes, elem_len, out_bandwidth);
break;
case WLAN_EID_VENDOR_SPECIFIC:
if (len == 8 && bytes[0] == 0x00 /* OUI: Microsoft */
&& bytes[1] == 0x50 && bytes[2] == 0xf2

View file

@ -455,6 +455,7 @@ const char *nm_utils_parse_dns_domain(const char *domain, gboolean *is_routing);
void nm_wifi_utils_parse_ies(const guint8 *bytes,
gsize len,
guint32 *out_max_rate,
guint32 *out_bandwidth,
gboolean *out_metered,
gboolean *out_owe_transition_mode);

View file

@ -800,7 +800,7 @@ initited:
* a lot of stale entries. We must from time to time clean them up.
*
* Do do this cleanup, whenever we have more entries then 2 times the number of links. */
if (G_UNLIKELY(g_hash_table_size(priv->device_route_metrics) > NM_MAX(20, n_links * 2))) {
if (G_UNLIKELY(g_hash_table_size(priv->device_route_metrics) > NM_MAX(20u, n_links * 2u))) {
/* from time to time, we need to do some house-keeping and prune stale entries.
* Otherwise, on a system where interfaces frequently come and go (docker), we
* keep growing this cache for ifindexes that no longer exist. */

View file

@ -32,7 +32,7 @@
* Normalize the requested_value to the kernel_value, if it look as if a rounding
* error happens. If the difference is larger than +/- 1, no normalization happens! */ \
\
((_requested_value >= (NM_MAX(_kernel_value, 1) - 1)) \
((_requested_value >= (NM_MAX(_kernel_value, (typeof(_kernel_value)) 1) - 1)) \
&& (_requested_value <= (NM_MIN(_kernel_value, ~((typeof(_kernel_value)) 0) - 1) + 1))) \
? _kernel_value \
: _requested_value; \

View file

@ -765,9 +765,15 @@ _bss_info_properties_changed(NMSupplicantInterface *self,
gboolean p_owe_transition_mode;
gboolean p_metered;
guint32 rate;
guint32 bandwidth;
arr_data = g_variant_get_fixed_array(v_v, &arr_len, 1);
nm_wifi_utils_parse_ies(arr_data, arr_len, &rate, &p_metered, &p_owe_transition_mode);
nm_wifi_utils_parse_ies(arr_data,
arr_len,
&rate,
&bandwidth,
&p_metered,
&p_owe_transition_mode);
p_max_rate = NM_MAX(p_max_rate, rate);
p_max_rate_has = TRUE;
g_variant_unref(v_v);
@ -777,7 +783,8 @@ _bss_info_properties_changed(NMSupplicantInterface *self,
else
bss_info->rsn_flags &= ~NM_802_11_AP_SEC_KEY_MGMT_OWE_TM;
bss_info->metered = p_metered;
bss_info->metered = p_metered;
bss_info->bandwidth = bandwidth;
}
if (p_max_rate_has)

View file

@ -179,6 +179,8 @@ typedef struct _NMSupplicantBssInfo {
guint32 max_rate;
guint32 bandwidth;
guint8 signal_percent;
NMEtherAddr bssid;

View file

@ -760,7 +760,7 @@ test_l3_ipv4ll(gconstpointer test_data)
if (next_timeout_msec <= 0)
break;
next_timeout_msec = NM_MIN(next_timeout_msec, nmtst_get_rand_uint32() % 1000u);
next_timeout_msec = NM_MIN(next_timeout_msec, (gint64) (nmtst_get_rand_uint32() % 1000u));
nmtst_main_context_iterate_until(NULL, next_timeout_msec, FALSE);
_LOGT("poll 1 intermezzo");

View file

@ -1943,3 +1943,8 @@ global:
nm_setting_link_get_type;
nm_setting_link_new;
} libnm_1_42_0;
libnm_1_46_0 {
global:
nm_access_point_get_bandwidth;
} libnm_1_44_0;

View file

@ -30,6 +30,7 @@ NM_GOBJECT_PROPERTIES_DEFINE(NMAccessPoint,
PROP_HW_ADDRESS,
PROP_MODE,
PROP_MAX_BITRATE,
PROP_BANDWIDTH,
PROP_STRENGTH,
PROP_BSSID,
PROP_LAST_SEEN, );
@ -43,6 +44,7 @@ typedef struct {
guint32 frequency;
guint32 mode;
guint32 max_bitrate;
guint32 bandwidth;
gint32 last_seen;
guint8 strength;
} NMAccessPointPrivate;
@ -198,6 +200,24 @@ nm_access_point_get_max_bitrate(NMAccessPoint *ap)
return NM_ACCESS_POINT_GET_PRIVATE(ap)->max_bitrate;
}
/**
* nm_access_point_get_bandwidth:
* @ap: a #NMAccessPoint
*
* Gets the bandwidth advertised by the access point in MHz.
*
* Returns: the advertised bandwidth (MHz)
*
* Since: 1.46
**/
guint32
nm_access_point_get_bandwidth(NMAccessPoint *ap)
{
g_return_val_if_fail(NM_IS_ACCESS_POINT(ap), 0);
return NM_ACCESS_POINT_GET_PRIVATE(ap)->bandwidth;
}
/**
* nm_access_point_get_strength:
* @ap: a #NMAccessPoint
@ -463,6 +483,9 @@ get_property(GObject *object, guint prop_id, GValue *value, GParamSpec *pspec)
case PROP_MAX_BITRATE:
g_value_set_uint(value, nm_access_point_get_max_bitrate(ap));
break;
case PROP_BANDWIDTH:
g_value_set_uint(value, nm_access_point_get_bandwidth(ap));
break;
case PROP_STRENGTH:
g_value_set_uchar(value, nm_access_point_get_strength(ap));
break;
@ -480,6 +503,7 @@ const NMLDBusMetaIface _nml_dbus_meta_iface_nm_accesspoint = NML_DBUS_META_IFACE
nm_access_point_get_type,
NML_DBUS_META_INTERFACE_PRIO_INSTANTIATE_30,
NML_DBUS_META_IFACE_DBUS_PROPERTIES(
NML_DBUS_META_PROPERTY_INIT_U("Bandwidth", PROP_BANDWIDTH, NMAccessPoint, _priv.bandwidth),
NML_DBUS_META_PROPERTY_INIT_U("Flags", PROP_FLAGS, NMAccessPoint, _priv.flags),
NML_DBUS_META_PROPERTY_INIT_U("Frequency", PROP_FREQUENCY, NMAccessPoint, _priv.frequency),
NML_DBUS_META_PROPERTY_INIT_FCN("HwAddress",
@ -620,6 +644,21 @@ nm_access_point_class_init(NMAccessPointClass *ap_class)
0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* NMAccessPoint:bandwidth:
*
* The channel bandwidth announced by the AP in MHz.
*
* Since: 1.46
**/
obj_properties[PROP_BANDWIDTH] = g_param_spec_uint(NM_ACCESS_POINT_BANDWIDTH,
"",
"",
0,
G_MAXUINT32,
0,
G_PARAM_READABLE | G_PARAM_STATIC_STRINGS);
/**
* NMAccessPoint:strength:
*

View file

@ -35,6 +35,7 @@ G_BEGIN_DECLS
#define NM_ACCESS_POINT_MAX_BITRATE "max-bitrate"
#define NM_ACCESS_POINT_STRENGTH "strength"
#define NM_ACCESS_POINT_LAST_SEEN "last-seen"
#define NM_ACCESS_POINT_BANDWIDTH "bandwidth"
/* DEPRECATED */
#define NM_ACCESS_POINT_HW_ADDRESS "hw-address"
@ -59,6 +60,9 @@ guint8 nm_access_point_get_strength(NMAccessPoint *ap);
NM_AVAILABLE_IN_1_2
int nm_access_point_get_last_seen(NMAccessPoint *ap);
NM_AVAILABLE_IN_1_46
guint32 nm_access_point_get_bandwidth(NMAccessPoint *ap);
GPtrArray *nm_access_point_filter_connections(NMAccessPoint *ap, const GPtrArray *connections);
gboolean nm_access_point_connection_valid(NMAccessPoint *ap, NMConnection *connection);

View file

@ -73,6 +73,7 @@
#define NM_VERSION_1_40 (NM_ENCODE_VERSION(1, 40, 0))
#define NM_VERSION_1_42 (NM_ENCODE_VERSION(1, 42, 0))
#define NM_VERSION_1_44 (NM_ENCODE_VERSION(1, 44, 0))
#define NM_VERSION_1_46 (NM_ENCODE_VERSION(1, 46, 0))
/* For releases, NM_API_VERSION is equal to NM_VERSION.
*

View file

@ -369,6 +369,20 @@
#define NM_AVAILABLE_IN_1_44
#endif
#if NM_VERSION_MIN_REQUIRED >= NM_VERSION_1_46
#define NM_DEPRECATED_IN_1_46 G_DEPRECATED
#define NM_DEPRECATED_IN_1_46_FOR(f) G_DEPRECATED_FOR(f)
#else
#define NM_DEPRECATED_IN_1_46
#define NM_DEPRECATED_IN_1_46_FOR(f)
#endif
#if NM_VERSION_MAX_ALLOWED < NM_VERSION_1_46
#define NM_AVAILABLE_IN_1_46 G_UNAVAILABLE(1, 46)
#else
#define NM_AVAILABLE_IN_1_46
#endif
/*
* Synchronous API for calling D-Bus in libnm is deprecated. See
* https://networkmanager.dev/docs/libnm/latest/usage.html#sync-api

View file

@ -32,6 +32,13 @@ G_STATIC_ASSERT(_nm_alignof(NMEtherAddr) <= _nm_alignof(NMIPAddr));
/*****************************************************************************/
G_STATIC_ASSERT(_NM_INT_IS_SIGNED(1));
G_STATIC_ASSERT(!_NM_INT_IS_SIGNED(1u));
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS((short) 1, 1l));
G_STATIC_ASSERT(!_NM_INT_SAME_SIGNEDNESS((unsigned short) 1, 1l));
/*****************************************************************************/
static void
test_nm_static_assert(void)
{

View file

@ -365,7 +365,7 @@ lldp_rx_start_timer(NMLldpRX *lldp_rx, NMLldpNeighbor *neighbor)
timeout_msec = (n->until_usec / 1000) - nm_utils_get_monotonic_timestamp_msec();
lldp_rx->timer_event_source =
nm_g_source_attach(nm_g_timeout_source_new(NM_CLAMP(timeout_msec, 0, G_MAXUINT),
nm_g_source_attach(nm_g_timeout_source_new(NM_CLAMP(timeout_msec, 0, (gint64) G_MAXUINT),
G_PRIORITY_DEFAULT,
on_timer_event,
lldp_rx,

View file

@ -3922,7 +3922,7 @@ _new_from_nl_route(const struct nlmsghdr *nlh, gboolean id_only, ParseNlmsgIter
* hops in this list). */
nm_assert(v4_n_nexthops > 0u);
if (v4_n_nexthops - 1u >= v4_nh_extra_alloc) {
v4_nh_extra_alloc = NM_MAX(4, v4_nh_extra_alloc * 2u);
v4_nh_extra_alloc = NM_MAX(4u, v4_nh_extra_alloc * 2u);
if (!v4_nh_extra_nexthops_heap) {
v4_nh_extra_nexthops_heap =
g_new(NMPlatformIP4RtNextHop, v4_nh_extra_alloc);

View file

@ -719,7 +719,7 @@ nm_platform_sysctl_ip_neigh_set_ipv6_reachable_time(NMPlatform *self,
/* RFC 4861 says the value can't be greater than one hour.
* Also use a reasonable lower threshold. */
clamped = NM_CLAMP(value_ms, 100, 3600000);
clamped = NM_CLAMP(value_ms, 100u, 3600000u);
nm_sprintf_buf(path, "/proc/sys/net/ipv6/neigh/%s/base_reachable_time_ms", iface);
nm_sprintf_buf(str, "%u", clamped);
if (!nm_platform_sysctl_set(self, NMP_SYSCTL_PATHID_ABSOLUTE(path), str))
@ -746,7 +746,7 @@ nm_platform_sysctl_ip_neigh_set_ipv6_retrans_time(NMPlatform *self,
return TRUE;
nm_sprintf_buf(path, "/proc/sys/net/ipv6/neigh/%s/retrans_time_ms", iface);
nm_sprintf_buf(str, "%u", NM_CLAMP(value_ms, 10, 3600000));
nm_sprintf_buf(str, "%u", NM_CLAMP(value_ms, 10u, 3600000u));
return nm_platform_sysctl_set(self, NMP_SYSCTL_PATHID_ABSOLUTE(path), str);
}

View file

@ -154,6 +154,12 @@ typedef uint64_t _nm_bitwise nm_be64_t;
/*****************************************************************************/
#define _NM_INT_IS_SIGNED(arg) (!(((typeof(arg)) -1) > 0))
#define _NM_INT_SAME_SIGNEDNESS(arg1, arg2) (_NM_INT_IS_SIGNED(arg1) == _NM_INT_IS_SIGNED(arg2))
/*****************************************************************************/
#define NM_PASTE_ARGS(identifier1, identifier2) identifier1##identifier2
#define NM_PASTE(identifier1, identifier2) NM_PASTE_ARGS(identifier1, identifier2)
@ -396,6 +402,9 @@ nm_mult_clamped_u(unsigned a, unsigned b)
({ \
typeof(a) NM_UNIQ_T(A, aq) = (a); \
typeof(b) NM_UNIQ_T(B, bq) = (b); \
\
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(NM_UNIQ_T(A, aq), NM_UNIQ_T(B, bq))); \
\
((NM_UNIQ_T(A, aq) < NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
})
@ -404,19 +413,25 @@ nm_mult_clamped_u(unsigned a, unsigned b)
({ \
typeof(a) NM_UNIQ_T(A, aq) = (a); \
typeof(b) NM_UNIQ_T(B, bq) = (b); \
\
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(NM_UNIQ_T(A, aq), NM_UNIQ_T(B, bq))); \
\
((NM_UNIQ_T(A, aq) > NM_UNIQ_T(B, bq)) ? NM_UNIQ_T(A, aq) : NM_UNIQ_T(B, bq)); \
})
#define NM_CLAMP(x, low, high) __NM_CLAMP(NM_UNIQ, x, NM_UNIQ, low, NM_UNIQ, high)
#define __NM_CLAMP(xq, x, lowq, low, highq, high) \
({ \
typeof(x) NM_UNIQ_T(X, xq) = (x); \
typeof(low) NM_UNIQ_T(LOW, lowq) = (low); \
typeof(high) NM_UNIQ_T(HIGH, highq) = (high); \
\
((NM_UNIQ_T(X, xq) > NM_UNIQ_T(HIGH, highq)) ? NM_UNIQ_T(HIGH, highq) \
: (NM_UNIQ_T(X, xq) < NM_UNIQ_T(LOW, lowq)) ? NM_UNIQ_T(LOW, lowq) \
: NM_UNIQ_T(X, xq)); \
#define __NM_CLAMP(xq, x, lowq, low, highq, high) \
({ \
typeof(x) NM_UNIQ_T(X, xq) = (x); \
typeof(low) NM_UNIQ_T(LOW, lowq) = (low); \
typeof(high) NM_UNIQ_T(HIGH, highq) = (high); \
\
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(NM_UNIQ_T(X, xq), NM_UNIQ_T(LOW, lowq))); \
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(NM_UNIQ_T(X, xq), NM_UNIQ_T(HIGH, highq))); \
\
((NM_UNIQ_T(X, xq) > NM_UNIQ_T(HIGH, highq)) ? NM_UNIQ_T(HIGH, highq) \
: (NM_UNIQ_T(X, xq) < NM_UNIQ_T(LOW, lowq)) ? NM_UNIQ_T(LOW, lowq) \
: NM_UNIQ_T(X, xq)); \
})
#define NM_MAX_WITH_CMP(cmp, a, b) \
@ -1287,13 +1302,15 @@ nm_ptr_to_uintptr(const void *p)
/*****************************************************************************/
#define NM_CMP_DIRECT(a, b) \
do { \
typeof(a) _a = (a); \
typeof(b) _b = (b); \
\
if (_a != _b) \
return (_a < _b) ? -1 : 1; \
#define NM_CMP_DIRECT(a, b) \
do { \
typeof(a) _a = (a); \
typeof(b) _b = (b); \
\
G_STATIC_ASSERT(_NM_INT_SAME_SIGNEDNESS(_a, _b)); \
\
if (_a != _b) \
return (_a < _b) ? -1 : 1; \
} while (0)
#define NM_CMP_DIRECT_UNSAFE(a, b) \

View file

@ -1435,7 +1435,7 @@ nmi_cmdline_reader_parse(const char *etc_connections_dir,
}
}
reader->dhcp_timeout = NM_CLAMP(dhcp_timeout * dhcp_num_tries, 1, G_MAXINT32);
reader->dhcp_timeout = NM_CLAMP(dhcp_timeout * dhcp_num_tries, 1u, (guint32) G_MAXINT32);
for (i = 0; argv[i]; i++) {
gs_free char *argument_clone = NULL;

View file

@ -2262,7 +2262,7 @@ get_connection(NmCli *nmc,
NMCLI_ERROR,
NMC_RESULT_ERROR_USER_INPUT,
_("%s argument is missing"),
selector);
(*argv)[0]);
return NULL;
}
} else {
@ -9369,8 +9369,10 @@ do_connection_delete(const NMCCommand *cmd, NmCli *nmc, int argc, const char *co
g_clear_error(&error);
if (nmc->return_value != NMC_RESULT_ERROR_NOT_FOUND) {
g_string_free(invalid_cons, TRUE);
invalid_cons = NULL;
if (invalid_cons) {
g_string_free(invalid_cons, TRUE);
invalid_cons = NULL;
}
goto finish;
}

View file

@ -725,15 +725,16 @@ const NmcMetaGenericInfo *const nmc_fields_dev_wifi_list[] = {
NMC_META_GENERIC("CHAN"), /* 5 */
NMC_META_GENERIC("FREQ"), /* 6 */
NMC_META_GENERIC("RATE"), /* 7 */
NMC_META_GENERIC("SIGNAL"), /* 8 */
NMC_META_GENERIC("BARS"), /* 9 */
NMC_META_GENERIC("SECURITY"), /* 10 */
NMC_META_GENERIC("WPA-FLAGS"), /* 11 */
NMC_META_GENERIC("RSN-FLAGS"), /* 12 */
NMC_META_GENERIC("DEVICE"), /* 13 */
NMC_META_GENERIC("ACTIVE"), /* 14 */
NMC_META_GENERIC("IN-USE"), /* 15 */
NMC_META_GENERIC("DBUS-PATH"), /* 16 */
NMC_META_GENERIC("BANDWIDTH"), /* 8 */
NMC_META_GENERIC("SIGNAL"), /* 9 */
NMC_META_GENERIC("BARS"), /* 10 */
NMC_META_GENERIC("SECURITY"), /* 11 */
NMC_META_GENERIC("WPA-FLAGS"), /* 12 */
NMC_META_GENERIC("RSN-FLAGS"), /* 13 */
NMC_META_GENERIC("DEVICE"), /* 14 */
NMC_META_GENERIC("ACTIVE"), /* 15 */
NMC_META_GENERIC("IN-USE"), /* 16 */
NMC_META_GENERIC("DBUS-PATH"), /* 17 */
NULL,
};
#define NMC_FIELDS_DEV_WIFI_LIST_COMMON "IN-USE,BSSID,SSID,MODE,CHAN,RATE,SIGNAL,BARS,SECURITY"
@ -1305,7 +1306,9 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
NmcOutputField *arr;
gboolean active;
NM80211ApSecurityFlags wpa_flags, rsn_flags;
guint32 freq, bitrate;
guint32 freq;
guint32 bitrate;
guint32 bandwidth;
guint8 strength;
GBytes *ssid;
const char *bssid;
@ -1315,6 +1318,7 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
char *ssid_str = NULL;
char *ssid_hex_str = NULL;
char *bitrate_str;
char *bandwidth_str;
char *strength_str;
char *wpa_flags_str;
char *rsn_flags_str;
@ -1333,6 +1337,7 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
freq = nm_access_point_get_frequency(ap);
mode = nm_access_point_get_mode(ap);
bitrate = nm_access_point_get_max_bitrate(ap);
bandwidth = nm_access_point_get_bandwidth(ap);
strength = MIN(nm_access_point_get_strength(ap), 100);
/* Convert to strings */
@ -1347,6 +1352,7 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
channel_str = g_strdup_printf("%u", nm_utils_wifi_freq_to_channel(freq));
freq_str = g_strdup_printf(_("%u MHz"), freq);
bitrate_str = g_strdup_printf(_("%u Mbit/s"), bitrate / 1000);
bandwidth_str = g_strdup_printf(_("%u MHz"), bandwidth);
strength_str = nm_strdup_int(strength);
wpa_flags_str = ap_wpa_rsn_flags_to_string(wpa_flags, NM_META_ACCESSOR_GET_TYPE_PRETTY);
rsn_flags_str = ap_wpa_rsn_flags_to_string(rsn_flags, NM_META_ACCESSOR_GET_TYPE_PRETTY);
@ -1402,15 +1408,16 @@ fill_output_access_point(NMAccessPoint *ap, const APInfo *info)
set_val_str(arr, 5, channel_str);
set_val_str(arr, 6, freq_str);
set_val_str(arr, 7, bitrate_str);
set_val_str(arr, 8, strength_str);
set_val_strc(arr, 9, sig_bars);
set_val_str(arr, 10, g_string_free(security_str, FALSE));
set_val_str(arr, 11, wpa_flags_str);
set_val_str(arr, 12, rsn_flags_str);
set_val_strc(arr, 13, info->device);
set_val_strc(arr, 14, active ? _("yes") : _("no"));
set_val_strc(arr, 15, active ? "*" : " ");
set_val_strc(arr, 16, nm_object_get_path(NM_OBJECT(ap)));
set_val_str(arr, 8, bandwidth_str);
set_val_str(arr, 9, strength_str);
set_val_strc(arr, 10, sig_bars);
set_val_str(arr, 11, g_string_free(security_str, FALSE));
set_val_str(arr, 12, wpa_flags_str);
set_val_str(arr, 13, rsn_flags_str);
set_val_strc(arr, 14, info->device);
set_val_strc(arr, 15, active ? _("yes") : _("no"));
set_val_strc(arr, 16, active ? "*" : " ");
set_val_strc(arr, 17, nm_object_get_path(NM_OBJECT(ap)));
/* Set colors */
color = wifi_signal_to_color(strength);

View file

@ -444,40 +444,40 @@ AP[2]: :90\:B1\:5F\:9E\:E0\:E3:wlan0-ap-1:Infrastruktura:1:54Mb/s:44:** :WPA
AP[3]: :61\:66\:D2\:E7\:44\:A2:wlan0-ap-2:Infrastruktura:1:54Mb/s:34:** :WPA1 WPA2
<<<
size: 1972
size: 2049
location: src/tests/client/test-client.py:test_002()/19
cmd: $NMCLI -f ALL d wifi
lang: C
returncode: 0
stdout: 1840 bytes
stdout: 1917 bytes
>>>
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan0-ap-3 776C616E302D61702D33 60:B3:25:25:E2:C8 Infra 1 2412 MHz 54 Mbit/s 55 ** WPA3 (none) pair_tkip pair_ccmp group_tkip group_ccmp sae wlan0 no /org/freedesktop/NetworkManager/AccessPoint/3
AP[2] wlan0-ap-1 776C616E302D61702D31 90:B1:5F:9E:E0:E3 Infra 1 2412 MHz 54 Mbit/s 44 ** WPA1 pair_tkip pair_ccmp group_tkip group_ccmp psk (none) wlan0 no /org/freedesktop/NetworkManager/AccessPoint/1
AP[3] wlan0-ap-2 776C616E302D61702D32 61:66:D2:E7:44:A2 Infra 1 2412 MHz 54 Mbit/s 34 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan0 no /org/freedesktop/NetworkManager/AccessPoint/2
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan0-ap-3 776C616E302D61702D33 60:B3:25:25:E2:C8 Infra 1 2412 MHz 54 Mbit/s 40 MHz 55 ** WPA3 (none) pair_tkip pair_ccmp group_tkip group_ccmp sae wlan0 no /org/freedesktop/NetworkManager/AccessPoint/3
AP[2] wlan0-ap-1 776C616E302D61702D31 90:B1:5F:9E:E0:E3 Infra 1 2412 MHz 54 Mbit/s 40 MHz 44 ** WPA1 pair_tkip pair_ccmp group_tkip group_ccmp psk (none) wlan0 no /org/freedesktop/NetworkManager/AccessPoint/1
AP[3] wlan0-ap-2 776C616E302D61702D32 61:66:D2:E7:44:A2 Infra 1 2412 MHz 54 Mbit/s 40 MHz 34 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan0 no /org/freedesktop/NetworkManager/AccessPoint/2
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan1-ap-4 776C616E312D61702D34 EE:52:8B:49:A1:96 Infra 1 2412 MHz 54 Mbit/s 38 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan1 no /org/freedesktop/NetworkManager/AccessPoint/4
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan1-ap-4 776C616E312D61702D34 EE:52:8B:49:A1:96 Infra 1 2412 MHz 54 Mbit/s 40 MHz 38 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan1 no /org/freedesktop/NetworkManager/AccessPoint/4
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
<<<
size: 2040
size: 2125
location: src/tests/client/test-client.py:test_002()/20
cmd: $NMCLI -f ALL d wifi
lang: pl_PL.UTF-8
returncode: 0
stdout: 1898 bytes
stdout: 1983 bytes
>>>
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan0-ap-3 776C616E302D61702D33 60:B3:25:25:E2:C8 Infrastruktura 1 2412MHz 54Mb/s 55 ** WPA3 (brak) pair_tkip pair_ccmp group_tkip group_ccmp sae wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/3
AP[2] wlan0-ap-1 776C616E302D61702D31 90:B1:5F:9E:E0:E3 Infrastruktura 1 2412MHz 54Mb/s 44 ** WPA1 pair_tkip pair_ccmp group_tkip group_ccmp psk (brak) wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/1
AP[3] wlan0-ap-2 776C616E302D61702D32 61:66:D2:E7:44:A2 Infrastruktura 1 2412MHz 54Mb/s 34 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/2
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan0-ap-3 776C616E302D61702D33 60:B3:25:25:E2:C8 Infrastruktura 1 2412MHz 54Mb/s 40MHz 55 ** WPA3 (brak) pair_tkip pair_ccmp group_tkip group_ccmp sae wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/3
AP[2] wlan0-ap-1 776C616E302D61702D31 90:B1:5F:9E:E0:E3 Infrastruktura 1 2412MHz 54Mb/s 40MHz 44 ** WPA1 pair_tkip pair_ccmp group_tkip group_ccmp psk (brak) wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/1
AP[3] wlan0-ap-2 776C616E302D61702D32 61:66:D2:E7:44:A2 Infrastruktura 1 2412MHz 54Mb/s 40MHz 34 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan0 nie /org/freedesktop/NetworkManager/AccessPoint/2
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan1-ap-4 776C616E312D61702D34 EE:52:8B:49:A1:96 Infrastruktura 1 2412MHz 54Mb/s 38 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan1 nie /org/freedesktop/NetworkManager/AccessPoint/4
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
AP[1] wlan1-ap-4 776C616E312D61702D34 EE:52:8B:49:A1:96 Infrastruktura 1 2412MHz 54Mb/s 40MHz 38 ** WPA1 WPA2 pair_tkip pair_ccmp group_tkip group_ccmp psk pair_tkip pair_ccmp group_tkip group_ccmp psk wlan1 nie /org/freedesktop/NetworkManager/AccessPoint/4
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
NAME SSID SSID-HEX BSSID MODE CHAN FREQ RATE BANDWIDTH SIGNAL BARS SECURITY WPA-FLAGS RSN-FLAGS DEVICE ACTIVE IN-USE DBUS-PATH
<<<
size: 245

File diff suppressed because it is too large Load diff

View file

@ -1210,6 +1210,7 @@ PRP_WIFI_AP_MODE = "Mode"
PRP_WIFI_AP_MAX_BITRATE = "MaxBitrate"
PRP_WIFI_AP_STRENGTH = "Strength"
PRP_WIFI_AP_LAST_SEEN = "LastSeen"
PRP_WIFI_AP_BANDWIDTH = "Bandwidth"
class WifiAp(ExportedObj):
@ -1268,6 +1269,7 @@ class WifiAp(ExportedObj):
PRP_WIFI_AP_MAX_BITRATE: dbus.UInt32(54000),
PRP_WIFI_AP_STRENGTH: dbus.Byte(strength),
PRP_WIFI_AP_LAST_SEEN: dbus.Int32(NM.utils_get_timestamp_msec() / 1000),
PRP_WIFI_AP_BANDWIDTH: dbus.UInt32(40),
}
self.dbus_interface_add(IFACE_WIFI_AP, props)