WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit c526907

Browse files
reload procmon method after fw rules
There was a situation where if the ebpf modules path did not exist, the fw rules were not added, causing the daemon to crash after connecting to the GUI.
1 parent 7d2ca8d commit c526907

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

daemon/ui/config_utils.go

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -190,14 +190,6 @@ func (c *Client) reloadConfiguration(reload bool, newConfig config.Config) *moni
190190
} else {
191191
log.Debug("[config] config.Ebpf.ModulesPath not changed")
192192
}
193-
if reloadProc {
194-
err := monitor.ReconfigureMonitorMethod(newConfig.ProcMonitorMethod, newConfig.Ebpf)
195-
if err != nil && err.What > monitor.NoError {
196-
return err
197-
}
198-
} else {
199-
log.Debug("[config] config.procmon not changed")
200-
}
201193

202194
// 3. load fw
203195
reloadFw := false
@@ -220,6 +212,16 @@ func (c *Client) reloadConfiguration(reload bool, newConfig config.Config) *moni
220212
log.Debug("[config] config.firewall not changed")
221213
}
222214

215+
// 4. reload procmon if needed
216+
if reloadProc {
217+
err := monitor.ReconfigureMonitorMethod(newConfig.ProcMonitorMethod, newConfig.Ebpf)
218+
if err != nil && err.What > monitor.NoError {
219+
return err
220+
}
221+
} else {
222+
log.Debug("[config] config.procmon not changed")
223+
}
224+
223225
if (reloadProc || reloadFw) && newConfig.Internal.FlushConnsOnStart {
224226
log.Debug("[config] flushing established connections")
225227
netlink.FlushConnections()

0 commit comments

Comments
 (0)