mirror of
https://github.com/caiwx86/small-packages.git
synced 2026-09-15 04:44:24 +08:00
24 lines
672 B
Diff
24 lines
672 B
Diff
From: kenzok8 <kenzok8@noreply>
|
|
Date: 2026-06-23
|
|
Subject: [PATCH] daed: detach BPF hooks when stopping from dashboard
|
|
|
|
Detach BPF hooks when the dashboard stops dae through EmptyConfig.
|
|
Reported: https://github.com/kenzok8/openwrt-daede/issues/13
|
|
---
|
|
--- a/dae/run.go
|
|
+++ b/dae/run.go
|
|
@@ -138,6 +138,13 @@
|
|
/* dae-wing start */
|
|
newConf := newReloadMsg.Config
|
|
/* dae-wing end */
|
|
+
|
|
+ // openwrt-daede: dashboard stop reloads to EmptyConfig; detach hooks.
|
|
+ if newConf == EmptyConfig {
|
|
+ if e := c.DetachBpfHooks(); e != nil {
|
|
+ log.Errorln("[Stop] DetachBpfHooks:", e)
|
|
+ }
|
|
+ }
|
|
// New logger.
|
|
oldLogOutput := log.Out
|
|
log = logrus.New()
|