Page MenuHomeVyOS Platform

Wireguard creates non-existing interfaces in [op-mode].
Closed, ResolvedPublicBUG

Description

When you try to show interfaces wgX that does not exist in the system, a wireguard creates them.

sever@vyos-1.3-roll:~$ show interfaces wireguard 
Possible completions:
  <text>        show wireguard interface information
show interfaces wireguard wg1
...
show interfaces wireguard wg100
...
show interfaces wireguard wg500

Checking in the system

sever@vyos-1.3-roll:~$ sudo ip link show | grep wg
3: wg1: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
4: wg100: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
5: wg500: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
sever@vyos-1.3-roll:~$ show interfaces wireguard wg999
interface: wg999
  public key: None
  private key: (hidden)
  listening port: 0

    RX:  bytes  packets  errors  dropped  overrun       mcast
             0        0       0        0        0           0
    TX:  bytes  packets  errors  dropped  carrier  collisions
             0        0       0        0        0           0


sever@vyos-1.3-roll:~$ sudo ip link show | grep wg
3: wg1: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
4: wg100: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
5: wg500: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
9: wg999: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
sever@vyos-1.3-roll:~$

The second bug, It can be any name for the wireguard interface.
wg/gw/xxx

sever@vyos-1.3-roll:~$ sudo ip link show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP mode DEFAULT group default qlen 1000
    link/ether 52:54:00:8d:00:59 brd ff:ff:ff:ff:ff:ff
3: wg1: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
4: wg100: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
5: wg500: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
6: 999: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
7: gw999: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
8: gw555: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none 
9: wg999: <POINTOPOINT,NOARP> mtu 1420 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/none

Details

Difficulty level
Unknown (require assessment)
Version
VyOS 1.3-rolling-202004180117
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)