- distribute daemon/data/rules/ with the daemon packages.
- added a new system fw rule to allow localhost connections (disabled
by default).
Closes: #965.
When the daemon connects to the GUI, the firewall dialog is configured
based on the system firewall configuration (inbound/outbpund policies).
Due to an error, a fw-change notification was being triggered, causing
unnecessary firewall rules reloads.
Allow to use commas to specify multiple data:
- src/dst ip: 1.2.3.4, 5.6.7.8
- dst host: www.a-b-c.org, www.abcd.org
- proto: tcp, udp
- net ifaces: eth0, eth1
- src/dst port: 123, 456
The data will be translated to ^(..|..|..)$ when saving the rule, and
back to "..,..,.." when loading it.
Closes: #1392.
When replacing a process with the same PID (fork/clone),
and ebpf.QueueEventsSize is > 0 we may receive out or order events.
For example if the checksum calculation takes too much time.
Now we avoid updating the process in this scenario.
Previously when cloning a rule, we added "clone-{num}-" to the rule.
Depending on the number of rules, the cloned rule might not appear next
to the original.
Now we append "-duplicated-{num}" to the end of the rule name, on the one
hand to make the new rule appear close to the cloned one, and on the other
hand, to be consistent with the menu item that triggers this action.
Closes: #1363.
- In some distros, qt-material icons have stopped loading at startup:
qt.svg: Cannot open file '.../icon:/primary/slider.svg'
The cause of the error is still unknown, but this fix solves it
for now.
- Themes() class moved to its own file.
Closes: #1373.
This version introduces a lot of improvements.
It's worth mentioning this one https://github.com/cilium/ebpf/pull/1755,
which reduces memory usage by ~25MB.
It also bumps go version to 1.23.
Added the default Authentication fields, to avoid detecting that the
config has changed.
It was causing the daemon to disconnect and reconnect on the first
config change made by the user.
- New: if Server.Address is not set, stop the routine that attempts
to connect with the remote server.
- Spawn only one polling routine.
- When changing the configuration:
- if the new server.address changed and is not empty -> reconnect.
- if the new server.address changed and is empty -> disconnect.
- if previous server.address was empty and the new one is not -> connect.
- if the authentication settings changed -> reconnect.
If the server.address is not available, we'll try to connect
indefinitely.
- Fixed configuration loading, when the Process Monitor Method
selected failed to work (e.g.: when ebpf modules are missing,
auditd is not configured, etc).
In this scenario, on the first run, the daemon was not loading the
configuration from disk, and was instead using the default values, which
led to some glitches (unexpected reconnections to the GUI, checksums
option ignored, etc).
- added more tests.
Discard events from the queue if we can't send events to the channel.
It can happen if the case of a deadlock such as in ac3053af327e38acad4ff4024ed688ed68d6ae30
In this situation, reading from the ring buffer is blocked, which
eventually causes it to fill up.
When the ring buffer is full, bpf_ringbuf_output() fails with error -11.
Under very high load of kernel events, combined with a
non-zero value for the ebpf.QueueEventsSize config option,
the cache could end up blocking the events workers if the option to
compute process checksums was enabled.
When receiving the paths of a binary from kernel, the path can be a
symlink to the real binary on disk, and we were not obtaining the real
path to the binary.
Now we'll try to obtain it. If we fail, we'll use the path received from
the kernel. And if it's empty, we'll fallback to read it from proc.
Closes#1357