Skip to content

nmtui: add ability to activate/deactivate tun/tap connections

Olivier Gayot requested to merge ogayot/NetworkManager:nmtui-tun-tap into main

Hello,

This PR adds support for activating and deactivating tun/tap connections from nmtui.

  • The first patch replaces !strcmp expressions by nm_streq in nm-connection.c
  • The second patch actually adds support for tun/tap

tun/tap connections can be created using a command such as:

$ nmcli connection add type tun ifname tun0 mode tap owner 1000

They appear in nmcli connection show as TYPE "tun".

In nmtui, each connection of TYPE "tun" now appears as:

  TUN/TAP (<ifname>)
  * <connection-name>

Example:

  TUN/TAP (tap0)
  * bridge-slave-tap0

  TUN/TAP (tap1)
    bridge-slave-tap1

tun/tap connections appear after WireGuard connections, which might not be the most consistent place. Feedback would be much appreciated.

Thanks! Olivier

Edited by Olivier Gayot

Merge request reports

Loading