mirror of
https://github.com/juanfont/headscale.git
synced 2024-11-30 02:43:05 +00:00
Merge pull request #87 from juanfont/fix-route-notify
Send notifications when enabling a route
This commit is contained in:
commit
d739ac830f
1 changed files with 4 additions and 6 deletions
10
routes.go
10
routes.go
|
@ -45,14 +45,12 @@ func (h *Headscale) EnableNodeRoute(namespace string, nodeName string, routeStr
|
||||||
m.EnabledRoutes = datatypes.JSON(routes)
|
m.EnabledRoutes = datatypes.JSON(routes)
|
||||||
h.db.Save(&m)
|
h.db.Save(&m)
|
||||||
|
|
||||||
// THIS IS COMPLETELY USELESS.
|
err = h.RequestMapUpdates(m.NamespaceID)
|
||||||
// The peers map is stored in memory in the server process.
|
if err != nil {
|
||||||
// Definitely not accessible from the CLI tool.
|
return nil, err
|
||||||
// We need RPC to the server - or some kind of 'needsUpdate' field in the DB
|
}
|
||||||
h.notifyChangesToPeers(m)
|
|
||||||
return &rIP, nil
|
return &rIP, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil, errors.New("could not find routable range")
|
return nil, errors.New("could not find routable range")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue