Page MenuHomeVyOS Platform

UPnP configuration without listen option fail
Closed, ResolvedPublicBUG

Description

Set configuration without listen option
It tried to check undefined value in the dictionary:

set service upnp rule 10 action 'allow'
set service upnp rule 10 external-port-range '1024-65535'
set service upnp rule 10 internal-port-range '1024-65535'
set service upnp rule 10 ip '10.0.0.1'
set service upnp wan-interface 'eth0'

Commit:

Report time:      2022-08-15 14:18:52
Image version:    VyOS 1.4-rolling-202208100217
Release train:    sagitta

Built by:         [email protected]
Built on:         Wed 10 Aug 2022 02:17 UTC
Build UUID:       502ff2e0-6d7e-4bea-823d-9d74694d52f5
Build commit ID:  95af1e2cbdbc06

Architecture:     x86_64
Boot via:         installed image
System type:      KVM guest

Hardware vendor:  QEMU
Hardware model:   Standard PC (Q35 + ICH9, 2009)
Hardware S/N:     
Hardware UUID:    504a981d-6fb3-49ca-8a43-c28326992bd4

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/service_upnp.py", line 152, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/service_upnp.py", line 116, in verify
    for listen_if_or_addr in upnpd['listen']:
KeyError: 'listen'



[[service upnp]] failed
Commit failed
[edit]
vyos@r1#

The second, completion help looked odd:

vyos@r1# set service upnp listen 
Possible completions:
   <interface>          Monitor interface address
   <x.x.x.x>            IP address to listen for incoming connections
   ipv4-prefix          IP prefix to listen for incoming connections
   <h:h:h:h:h:h:h:h>    IP address to listen for incoming connections
   ipv6-prefix          IP prefix to listen for incoming connections
   127.0.0.1            
   192.0.2.2            
   192.168.122.11

Details

Difficulty level
Easy (less than an hour)
Version
VyOS 1.4-rolling-202208100217
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)