- 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
- Added MaxConnectAttempts configuration option:
If not specified, it defaults to 0, which means that we'll try to connect
indefinitely to the remote server.
- Improved connection retry behaviour:
We were not reconnecting to the server if we failed to connect on the
first attempt. Now we'll try to connect until MaxConnectAttempts, or
indefinitely if not specified (default value 0).
- If the logger is not connected to the remote server, don't send
messages to the queue.
Closes#1350.
We were distributing locales twice, under opensnitch/i18n/ and
opensnitch/i18n/locales/.
This also caused to display an empty language in the Preferences
languages combo box.
The HighContrast theme is part of the gnome-themes-standard [0] package
, which is not always available.
Instead of just setting the theme by code, now we distribute the icons.
This ensures that the icons are always clearly visible when using a
qt-material dark theme.
For qt-material light themes and system themes, we'll use the system
icons.
[0] https://download.gnome.org/sources/gnome-themes-standard/
netlink.AddrSubscribeWithOptions() was causing systemd-resolved not to
obtain DNS servers, and therefore the system was unable to resolve
domain names.
This ssue started happening on Fedora 42, with systemd-resolved 257 and
kernels 6.14.x.
Using netlink.AddrSubscribe() solves this issue for now.
Closes#1343
Changed Error to Warning log level when failing to load hooks.
Except for udp_tunnel6_xmit_skb, which depends on the module
ip6_udp_tunnel to be loaded, which by default is not the case.
In order not to flood the logs with this error, log level changed to
Debug.
By default we use the system icons theme in the GUI.
The Desktop Environment usually is responsible of switching between
dark and light styles.
However if the user selected a qt-material dark theme from the
Preferences, the icons were not updated, and sometimes they were
practically invisible.
Now if the user selects a qt-material dark theme, we set the
HighContrast icon theme, which ensures that all icons are visible
against dark backgrounds.
Allow to select English language from the Preferences.
This is a static entry like "System default".
It will not load a QTranslator object, so the GUI will use the strings
defined in the code, which are in English.
Closes: #1342
In order to intercept UDP tunnels traffic, we use iptunnel_xmit for IPv4
connections. The equivalent of IPv6 would be ip6tunnel_xmit, but
unfortunately it's not public.
So instead of ip6tunnel_xmit, we'll use udp_tunnel6_xmit_skb.
This function receives two parameters besides the struct sock*, in6_addr
*saddr and in6_addr *daddr. If these addresses are not set, usually the
connection is a localhost connection.
On the other hand, this function is defined in the module
ip6_udp_tunnel. If this module is not loaded when the daemon starts,
we'll fail to intercept the connections.
Closes: #1250