惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Vercel News
Vercel News
Recorded Future
Recorded Future
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
The GitHub Blog
The GitHub Blog
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Google DeepMind News
Google DeepMind News
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Microsoft Azure Blog
Microsoft Azure Blog
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
M
MIT News - Artificial intelligence
云风的 BLOG
云风的 BLOG
Y
Y Combinator Blog
N
News | PayPal Newsroom
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Help Net Security
Help Net Security
博客园 - Franky
SecWiki News
SecWiki News
Recent Announcements
Recent Announcements
T
Troy Hunt's Blog
The Register - Security
The Register - Security
The Last Watchdog
The Last Watchdog
Webroot Blog
Webroot Blog
S
Security Affairs
博客园 - 司徒正美
S
Schneier on Security
I
InfoQ
博客园_首页
www.infosecurity-magazine.com
www.infosecurity-magazine.com
T
Threat Research - Cisco Blogs
Forbes - Security
Forbes - Security
腾讯CDC
N
Netflix TechBlog - Medium
N
News and Events Feed by Topic
Cloudbric
Cloudbric
T
The Exploit Database - CXSecurity.com
P
Proofpoint News Feed
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Recent Commits to openclaw:main
Recent Commits to openclaw:main
B
Blog
V
Vulnerabilities – Threatpost
C
Check Point Blog
Google DeepMind News
Google DeepMind News
Google Online Security Blog
Google Online Security Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Hacker News - Newest:
Hacker News - Newest: "LLM"
C
Cisco Blogs
Schneier on Security
Schneier on Security
O
OpenAI News
K
Kaspersky official blog

NetworkManager

NetworkManager 1.54 NetworkManager 1.52 Protect your VPN from TunnelVision attacks NetworkManager 1.50 Addressing hostname assignment in NetworkManager 1.40 Help NetworkManager project to triage issues NetworkManager 1.48 NetworkManager 1.46 NetworkManager 1.44 NetworkManager 1.42 Set up NMCI on Fedora Linux VM Using Python and NetworkManager to control the network [link] Notes on D-Bus NetworkManager 1.40 NetworkManager 1.38 From ifcfg to keyfiles [link] NetworkManager 1.36 NetworkManager 1.34 NetworkManager 1.32 NetworkManager 1.30 Initscripts’ ifcfg-rh Format in NetworkManager and its Future [link] How to set up your NetworkManager environment [link] NetworkManager 1.28 [link] Looking forward to Linux network configuration in the initial ramdisk (initrd) [link] NetworkManager 1.26 [link] Internet connection sharing with NetworkManager [link] Why NetworkManager? [link] Please welcome: NetworkManager 1.20 [link] Becoming friends with NetworkManager [link] WireGuard in NetworkManager [link] MAC Address Spoofing in NetworkManager 1.4.0 [link] NetworkManager for administrators Resources for developers man pages Video tutorials VPN support
RFKill
2001-01-01 · via NetworkManager

The rfkill subsystem in Linux provides a mechanism to disable radio transmitters, as Wi-Fi, Bluetooth cards or WWAN modems installed in the system.

From the kernel point of view, such devices typically have a associated rfkill device (also called killswitch) that is visible in the output of the rfkill utility.

$ rfkill
ID TYPE      DEVICE                 SOFT      HARD
 0 bluetooth tpacpi_bluetooth_sw blocked unblocked
 2 wlan      phy0                blocked unblocked

Each rfkill device has a type (bluetooth, wlan, wwan) and two flags to indicate whether the killswitch is hard-blocked (when radio transmission is blocked via a hardware switch) or soft-blocked (when radio is disabled but can be re-enabled in software).

Support in NetworkManager

NetworkManager can manage the global rfkill state for Wi-Fi and WWAN devices.

It uses udev to discover (at startup, but also at runtime) the available killswitches. For each of them, NetworkManager keeps track of the current state (unblocked, soft-blocked, hard-blocked).

Each killswitch can be a platform one or a non-platform (or device) one. Platform killswitches are those belonging to the “platform” or “acpi” udev subsystem. Device switches, if hard-killed typically cannot be changed except by a physical hardware switch. Also it is common that platform killswitches control device killswitches. That is, a hard-blocked device switch can often be unblocked by a platform switch.

Therefore, when determining the global killswitch state for a given hardware type (Wi-Fi or WWAN), blocked platform switches have higher priority. If all platform switches are unblocked, then the global state is the maximum blocked state of device switches.

The global killswitch state for a hardware type is “unavailable” when no killswitches of that kind were found on the system and there are no compatible devices.

D-Bus API

The rkfill state is exposed on D-Bus via the following boolean properties of the org.freedesktop.NetworkManager interface on the /org/freedesktop/NetworkManager object:

  • WirelessEnabled (read-write)
  • WirelessHardwareEnabled (read-only)
  • WwanEnabled (read-write)
  • WwanHardwareEnabled (read-only)

‘Hardware’ properties cannot be written as they refer to the hardware-blocked state. The other two properties refer to the software-blocked state.

Since version 1.38, NetworkManager also exposes a RadioFlags property on the same interface. It currently supports two flags:

  • NM_RADIO_FLAG_WLAN_AVAILABLE = 0x1
  • NM_RADIO_FLAG_WWAN_AVAILABLE = 0x2

indicating whether any Wi-fi or WWAN hardware is present in the system.

When WirelessEnabled (or WwanEnabled) gets written, NetworkManager updates the soft-blocked state of all Wi-Fi (or WWAN) killswitches in kernel; in addition, it enables or disables any NetworkManager device of type ‘wifi’ (or ‘gsm’).

The soft-blocked state set via D-Bus is also saved in a persistent state file (/var/lib/NetworkManager/NetworkManager.state) that is reloaded at the next restart.

nmcli

nmcli implements the radio subcommand to control the rfkill state.

$ nmcli radio
WIFI-HW  WIFI      WWAN-HW  WWAN
enabled  disabled  enabled  enabled

For Wi-Fi and WWAN, bot the hardware and software killswitch states are displayed.

The soft-blocked states can be changed via

nmcli radio {all | wifi | wwan} [on | off]

and this basically controls the soft-blocked D-Bus properties as described in the previous section.

Note that since version 1.38 nmcli displays missing in the *-HW column when there are no killswitches or compatible devices.