don't delete own routes
This commit is contained in:
parent
9fffd0419e
commit
5238a8a85f
@ -1341,6 +1341,11 @@ func (n *mucpNetwork) manage() {
|
|||||||
routers := make(map[string]bool)
|
routers := make(map[string]bool)
|
||||||
|
|
||||||
for _, route := range routes {
|
for _, route := range routes {
|
||||||
|
// don't process routes originated by ourselves
|
||||||
|
if route.Router == n.Id() {
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
// check if its been processed
|
// check if its been processed
|
||||||
if _, ok := routers[route.Router]; ok {
|
if _, ok := routers[route.Router]; ok {
|
||||||
continue
|
continue
|
||||||
@ -1353,6 +1358,7 @@ func (n *mucpNetwork) manage() {
|
|||||||
if peer := n.node.GetPeerNode(route.Router); peer != nil {
|
if peer := n.node.GetPeerNode(route.Router); peer != nil {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
// otherwise delete all the routes originated by it
|
// otherwise delete all the routes originated by it
|
||||||
if err := n.pruneRoutes(router.QueryRouter(route.Router)); err != nil {
|
if err := n.pruneRoutes(router.QueryRouter(route.Router)); err != nil {
|
||||||
if logger.V(logger.DebugLevel, logger.DefaultLogger) {
|
if logger.V(logger.DebugLevel, logger.DefaultLogger) {
|
||||||
|
Loading…
Reference in New Issue
Block a user