libs/core: fix bug in firewall model