opensnitch/daemon
Gustavo Iñiguez Goia da99686ab0
clean dns ebpf hooks on exit
We were not reacting to common exit signals, only to kill/interrupt
signals, so the DNS uprobes were never properly removed. Each uprobe
has the PID of the daemon in the identifier, so in theory, there
shouldn't be conflicts, but better clean our probes on exit.

previous to this commit with the daemon running
(and lot of starts/stops):

~ # cat /sys/kernel/debug/tracing/uprobe_events |wc -l
367

after stopping the daemon:
~ # cat /sys/kernel/debug/tracing/uprobe_events |wc -l
364

~ # > /sys/kernel/debug/tracing/uprobe_events
~ # cat /sys/kernel/debug/tracing/uprobe_events |wc -l
0

~ # cp opensnitchd-new /usr/bin/opensnitchd ; service opensnitchd start
~ # cat /sys/kernel/debug/tracing/uprobe_events |wc -l
3
~ # service opensnitchd stop
~ # cat /sys/kernel/debug/tracing/uprobe_events |wc -l
0

(cherry picked from commit 785500cd08)
2024-01-28 01:14:15 +01:00
..
conman structs fields reorganized 2024-01-13 22:15:23 +01:00
core strings concatenation improvements 2024-01-15 17:44:32 +01:00
data/rules Added sample rule to allow localhost connections 2023-07-23 22:30:49 +02:00
dns clean dns ebpf hooks on exit 2024-01-28 01:14:15 +01:00
firewall structs fields reorganized 2024-01-13 22:15:23 +01:00
log structs fields reorganized 2024-01-13 22:15:23 +01:00
netfilter structs fields reorganized 2024-01-13 22:15:23 +01:00
netlink removed debugging logs, fixed build 2023-07-25 02:11:35 +02:00
netstat strings concatenation improvements 2024-01-15 17:44:32 +01:00
procmon on errors stop established conns monitor 2024-01-21 11:13:07 +01:00
rule rules: fixed typo checking proc arguments 2024-01-15 21:56:55 +01:00
statistics strings concatenation improvements 2024-01-15 17:44:32 +01:00
ui updated daemon/ui tests 2024-01-24 20:22:34 +01:00
.gitignore daemon -> opensnitchd (ref #118) 2018-04-10 18:38:04 +02:00
default-config.json Introduce 2 new daemon logging options: LogUTC & LogMicro. 2023-06-05 20:46:42 -06:00
go.mod Added systemd-resolved DNS monitor 2023-03-10 15:04:42 +01:00
go.sum added go.sum 2024-01-14 19:15:53 +01:00
Gopkg.toml fix: calling ftrace probe Reset in order to start from a clean state (fixes #159) 2018-04-18 02:00:12 +02:00
main.go fixed loading dns ebpf module 2024-01-09 10:16:23 +01:00
Makefile daemon/Makefile: improvements to make distro packaging easier (#780) 2022-12-21 10:35:52 +01:00
opensnitchd-dinit Add files via upload 2023-06-17 23:56:58 +02:00
opensnitchd-openrc feat(daemon): add OpenRC script 2023-04-02 02:33:40 +02:00
opensnitchd.service Replace docs link in opensnitchd.service 2023-02-09 20:56:29 +00:00
system-fw.json added icmp destination-unreachable to system-fw.json 2023-07-26 11:40:17 +02:00