Page MenuHomeVyOS Platform

policy route cannot have several entries with the same table
Closed, ResolvedPublicBUG


When trying to set several policy rules that have the same table, commit fails, I have solved it temporarily by duplicating table 1 to table 11. Possibly related to #T4213

# set policy route src-route rule 1003 set table 1
# commit

- and include all the information presented below

Report time:      2022-01-31 17:34:54
Image version:    VyOS 1.4-rolling-202201291849
Release train:    sagitta

Built by:         [email protected]
Built on:         Sat 29 Jan 2022 18:49 UTC
Build UUID:       6fd7a21e-65e2-41b6-a681-cd14502ad976
Build commit ID:  638f92941ba4f1

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:    88891583-d199-4250-8358-a403f928d037

Traceback (most recent call last):
  File "/usr/libexec/vyos/conf_mode/", line 250, in <module>
  File "/usr/libexec/vyos/conf_mode/", line 241, in apply
  File "/usr/libexec/vyos/conf_mode/", line 217, in apply_table_marks
    cmd(f'{cmd_str} rule add pref {set_table} fwmark {table_mark} table {set_table}')
  File "/usr/lib/python3/dist-packages/vyos/", line 161, in cmd
    raise OSError(code, feedback)
FileNotFoundError: [Errno 2] failed to run command: ip rule add pref 1 fwmark 2147483646 table 1
exit code: 2

cmd 'ip rule add pref 1 fwmark 2147483646 table 1'
returned (out):

returned (err):
RTNETLINK answers: File exists

[[policy route src-route]] failed
Commit failed
# set policy route src-route rule 1003 set table 11
# commit


Difficulty level
Unknown (require assessment)
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Unspecified (possibly destroys the router)
Issue type
Unspecified (please specify)

Event Timeline

sarthurdev changed the task status from Open to In progress.Jan 31 2022, 4:47 PM
sarthurdev claimed this task.
sarthurdev added a subscriber: sarthurdev.

I already have a fix for this from your comment on T4213. Will have it included in a PR shortly.