mirror of
https://github.com/h44z/wg-portal.git
synced 2025-11-23 01:06:18 +00:00
Compare commits
19 Commits
v2.1.0-rc.
...
v2.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b1637b0c4e | ||
|
|
0cc7ebb83e | ||
|
|
eb6a787cfc | ||
|
|
b546eec4ed | ||
|
|
9be2133220 | ||
|
|
b05837b2d9 | ||
|
|
08c8f8eac0 | ||
|
|
d864e24145 | ||
|
|
5b56e58fe9 | ||
|
|
930ef7b573 | ||
|
|
18296673d7 | ||
|
|
4ccc59c109 | ||
|
|
e6b01a9903 | ||
|
|
2f79dd04c0 | ||
|
|
e5ed9736b3 | ||
|
|
c8353b85ae | ||
|
|
6142031387 | ||
|
|
dd86d0ff49 | ||
|
|
bdd426a679 |
@@ -217,6 +217,15 @@ func (m Manager) RestoreInterfaceState(
|
|||||||
if err != nil && !iface.IsDisabled() {
|
if err != nil && !iface.IsDisabled() {
|
||||||
slog.Debug("creating missing interface", "interface", iface.Identifier, "backend", controller.GetId())
|
slog.Debug("creating missing interface", "interface", iface.Identifier, "backend", controller.GetId())
|
||||||
|
|
||||||
|
// temporarily disable interface in database so that the current state is reflected correctly
|
||||||
|
_ = m.db.SaveInterface(ctx, iface.Identifier,
|
||||||
|
func(in *domain.Interface) (*domain.Interface, error) {
|
||||||
|
now := time.Now()
|
||||||
|
in.Disabled = &now // set
|
||||||
|
in.DisabledReason = domain.DisabledReasonInterfaceMissing
|
||||||
|
return in, nil
|
||||||
|
})
|
||||||
|
|
||||||
// temporarily disable interface in database so that the current state is reflected correctly
|
// temporarily disable interface in database so that the current state is reflected correctly
|
||||||
_ = m.db.SaveInterface(ctx, iface.Identifier,
|
_ = m.db.SaveInterface(ctx, iface.Identifier,
|
||||||
func(in *domain.Interface) (*domain.Interface, error) {
|
func(in *domain.Interface) (*domain.Interface, error) {
|
||||||
|
|||||||
Reference in New Issue
Block a user