Page MenuHomeVyOS Platform

Zone firewall: a VLAN deleted from a zoned VRF stays in the zone, and drops all traffic when re-created outside the VRF
Open, HighPublicBUG

Description

A vif that was in a VRF used as a zone member is deleted, then created again without a VRF. The zone firewall still treats it as part of the VRF's zone, so forwarded traffic to it hits the zone's default-action drop.

set vrf name red table 101
set interfaces ethernet eth1 vrf red
set interfaces ethernet eth1 vif 10 vrf red
set interfaces ethernet eth1 vif 10 address 10.99.10.1/24
set firewall zone LAN default-action drop
set firewall zone LAN member vrf red
commit
delete interfaces ethernet eth1 vif 10
commit
set interfaces ethernet eth1 vif 10 address 10.99.10.1/24
commit
ping forwarded to a host on eth1.10 after the re-create
1.5.1            3/3 received (3/3 runs)
rolling          100% packet loss (0/3)

A control flow on another interface kept 3/3.

Cause
T8761 (https://github.com/vyos/vyos-1x/pull/5167) expands zone VRF members into their interfaces and re-renders the firewall when is_vrf_changed() reports a change. is_vrf_changed() (python/vyos/configdict.py) loops over the vifs of the proposed config only, so a deleted vif is never checked, and the firewall keeps the stale expansion.

Suggested fix
Check the vifs of both the effective and the proposed config in is_vrf_changed(), or re-render zones on any interface delete.

Details

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