Skip to content

Commit

Permalink
[Netfilter] Update to 1.58
Browse files Browse the repository at this point in the history
  • Loading branch information
FreddleSpl0it committed Feb 14, 2024
1 parent d8baadb commit 3b83949
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions data/Dockerfiles/netfilter/modules/Logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@ def log(self, priority, message):
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)
Expand Down
2 changes: 2 additions & 0 deletions data/Dockerfiles/netfilter/modules/NFTables.py
Original file line number Diff line number Diff line change
Expand Up @@ -452,6 +452,8 @@ def get_unban_ip_dict(self, ipaddr:str, _family: str):
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
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3b83949

Please sign in to comment.