mirror of
https://github.com/daeuniverse/dae.git
synced 2025-07-19 20:29:20 +07:00
fix: should roll back configuration if failure of reload
This commit is contained in:
@ -155,6 +155,8 @@ func NewControlPlane(
|
||||
)
|
||||
defer func() {
|
||||
if err != nil {
|
||||
// Flip back.
|
||||
core.Flip()
|
||||
_ = core.Close()
|
||||
}
|
||||
}()
|
||||
@ -358,6 +360,9 @@ func NewControlPlane(
|
||||
func (c *ControlPlane) EjectBpf() *bpfObjects {
|
||||
return c.core.EjectBpf()
|
||||
}
|
||||
func (c *ControlPlane) InjectBpf(bpf *bpfObjects) {
|
||||
c.core.InjectBpf(bpf)
|
||||
}
|
||||
|
||||
func (c *ControlPlane) dnsUpstreamReadyCallback(raw *url.URL, dnsUpstream *dns.Upstream) (err error) {
|
||||
// Waiting for ready.
|
||||
|
Reference in New Issue
Block a user