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.

[email protected]:~$ 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

[email protected]:~$ 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
[email protected]:~$ 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


[email protected]:~$ 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
[email protected]:~$

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

[email protected]:~$ 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)

Event Timeline

https://github.com/thomas-mangin/vyos-1x/pull/new/T2320

The code has the concept of options which can be infered from the default dict and thefore should probably be removed for simplication.

Viacheslav changed the task status from Open to Needs testing.Apr 20 2020, 6:53 AM
Viacheslav claimed this task.

Fixed.

erkin set Issue type to Bug (incorrect behavior).Aug 30 2021, 6:49 AM
erkin removed a subscriber: Active contributors.