From 19dbd77402bc6fec4a576682237053ed816d1efa Mon Sep 17 00:00:00 2001 From: Asim Aslam Date: Thu, 16 Jan 2020 00:12:38 +0000 Subject: [PATCH] fix net masking in listed routes --- network/default.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/network/default.go b/network/default.go index aea8ae8e..4bad341a 100644 --- a/network/default.go +++ b/network/default.go @@ -1335,7 +1335,11 @@ func (n *network) manage() { // encode the routes to protobuf pbRoutes := make([]*pbRtr.Route, 0, len(routes)) for _, route := range routes { + // generate new route proto pbRoute := pbUtil.RouteToProto(route) + // mask the route before outbounding + n.maskRoute(pbRoute) + // add to list of routes pbRoutes = append(pbRoutes, pbRoute) } // pack the routes into the sync message