make gas mask filtering more generic

Signed-off-by: Mloc-Argent <colmohici@gmail.com>