Page MenuHomeVyOS Platform

policy route: Generating ConfigError failes when tcp flag is missing on set tcp-mss rule commit
Closed, ResolvedPublicBUG

Description

On trying to set tcp-mss rule with missing syn flag the code will error out on a NameError.

it is correct that this should result in an error, but not a NameError

vyos@vyos# set policy route mss rule 10 protocol 'tcp'
[edit]
vyos@vyos# set policy route mss rule 10 set tcp-mss 1000
[edit]
vyos@vyos# commit
[ policy route mss ]
VyOS had an issue completing a command.

We are sorry that you encountered a problem while using VyOS.
There are a few things you can do to help us (and yourself):
- Contact us using the online help desk if you have a subscription:
  https://support.vyos.io/
- Make sure you are running the latest version of VyOS available at:
  https://vyos.net/get/
- Consult the community forum to see how to handle this issue:
  https://forum.vyos.io
- Join us on Slack where our users exchange help and advice:
  https://vyos.slack.com

When reporting problems, please include as much information as possible:
- do not obfuscate any data (feel free to contact us privately if your
  business policy requires it)
- and include all the information presented below

Report time:      2022-09-15 21:30:46
Image version:    VyOS 1.4-rolling-202209151254
Release train:    sagitta

Built by:         autobuild@vyos.net
Built on:         Thu 15 Sep 2022 12:54 UTC
Build UUID:       e0ff93b7-b917-40bf-84ec-5865a3a88e18
Build commit ID:  7e856f0c81923d

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

Hardware vendor:  QEMU
Hardware model:   Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID:    Unknown

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 289, in <module>
    verify(c)
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 169, in verify
    verify_rule(policy, name, rule_conf, ipv6)
  File "/usr/libexec/vyos/conf_mode/policy-route.py", line 117, in verify_rule
    raise ConfigError(f'{name} rule {rule_id}: TCP SYN flag must be set to modify TCP-MSS')
NameError: name 'rule_id' is not defined



[[policy route mss]] failed
Commit failed
[edit]

Details

Version
VyOS 1.4-rolling-202209151254
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Bug (incorrect behavior)