Page MenuHomeVyOS Platform

Negating interface names in NAT configuration causes invalid warnings
Closed, ResolvedPublicBUG

Description

Issue description

Whenever a NAT rule with negation in the interface name is used, an invalid warning appears.

Expected behavior

No warnings appear on screen when commit is executed.

Example of such configuration

set nat destination rule 10 description 'DNS'
set nat destination rule 10 destination address 10.0.0.1
set nat destination rule 10 destination port 53
set nat destination rule 10 inbound-interface name '!eth0'  # <--- here, eth0 is negated
set nat destination rule 10 protocol 'tcp_udp'
set nat destination rule 10 translation address 172.16.0.1

Console output after commit

WARNING: NAT interface "!eth0" for destination NAT rule "10" does not exist!

Suggested fix

https://github.com/vyos/vyos-1x/pull/3482

Details

Difficulty level
Easy (less than an hour)
Version
1.5-rolling-202405121403
Why the issue appeared?
Will be filled on close
Is it a breaking change?
Perfectly compatible
Issue type
Bug (incorrect behavior)