diff --git a/data/Dockerfiles/netfilter/modules/Logger.py b/data/Dockerfiles/netfilter/modules/Logger.py index 25562965f..0ba2f42ad 100644 --- a/data/Dockerfiles/netfilter/modules/Logger.py +++ b/data/Dockerfiles/netfilter/modules/Logger.py @@ -13,9 +13,12 @@ class Logger: tolog['time'] = int(round(time.time())) tolog['priority'] = priority tolog['message'] = message - if self.r is not None: - self.r.lpush('NETFILTER_LOG', json.dumps(tolog, ensure_ascii=False)) print(message) + if self.r is not None: + try: + self.r.lpush('NETFILTER_LOG', json.dumps(tolog, ensure_ascii=False)) + except Exception as ex: + print('Failed logging to redis: %s' % (ex)) def logWarn(self, message): self.log('warn', message) diff --git a/data/Dockerfiles/netfilter/modules/NFTables.py b/data/Dockerfiles/netfilter/modules/NFTables.py index 4cb0110ae..7740fa59f 100644 --- a/data/Dockerfiles/netfilter/modules/NFTables.py +++ b/data/Dockerfiles/netfilter/modules/NFTables.py @@ -452,6 +452,8 @@ class NFTables: continue rule = _object["rule"]["expr"][0]["match"] + if not "payload" in rule["left"]: + continue left_opt = rule["left"]["payload"] if not left_opt["protocol"] == _family: continue diff --git a/docker-compose.yml b/docker-compose.yml index bd06e265b..ea56b4291 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -441,7 +441,7 @@ services: - acme netfilter-mailcow: - image: mailcow/netfilter:1.57 + image: mailcow/netfilter:1.58 stop_grace_period: 30s restart: always privileged: true