Refactor the vlan filter code to reduce code duplication

Description
-----------
Refactor the vlan filter code to reduce code duplication

Impacts
-------
All places that use the vlan filters

Delete branch after merge
-------------------------
NO