Page MenuHomeVyOS Platform

Keys are not allowed with ipip and sit tunnels
Closed, ResolvedPublicBUG

Description

Keys not allowed for ipip and sit tunnels:

vyos@r1-roll# sudo ip tunnel add tun3 mode ipip local 0.0.0.0 remote 203.0.113.1 key 1 tos inherit ttl 64
Keys are not allowed with ipip and sit tunnels

Initial configuration:

set interfaces tunnel tun3 encapsulation ipip
set interfaces tunnel tun3 source-address '0.0.0.0'
set interfaces tunnel tun3 remote 203.0.113.1
set interfaces tunnel tun3 address 10.130.130.1/30
set interfaces tunnel tun3 parameters ip key '1'

Commit:

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 177, in <module>
    apply(c)
  File "/usr/libexec/vyos/conf_mode/interfaces-tunnel.py", line 167, in apply
    tun = TunnelIf(**tunnel)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 109, in __init__
    super().__init__(ifname, **kargs)
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/interface.py", line 269, in __init__
    self._create()
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/tunnel.py", line 134, in _create
    self._cmd(cmd.format(**self.config))
  File "/usr/lib/python3/dist-packages/vyos/ifconfig/control.py", line 51, in _cmd
    return cmd(command, self.debug)
  File "/usr/lib/python3/dist-packages/vyos/util.py", line 161, in cmd
    raise OSError(code, feedback)
PermissionError: [Errno 1] failed to run command: ip tunnel add tun3 mode ipip local 0.0.0.0 remote 203.0.113.1 key 1 tos inherit ttl 64
returned: 
exit code: 1

noteworthy:
cmd 'ip tunnel add tun3 mode ipip local 0.0.0.0 remote 203.0.113.1 key 1 tos inherit ttl 64'
returned (out):

returned (err):
Keys are not allowed with ipip and sit tunnels

[[interfaces tunnel tun3]] failed
Commit failed
[edit]
vyos@r1-roll#

Add checks for ipip/sit encapsulation and key in configuration.

Details

Difficulty level
Normal (likely a few hours)
Version
VyOS 1.3-beta-202108300342, 1.4-rolling-202108300430
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)