fix net masking in listed routes

This commit is contained in:
Asim Aslam 2020-01-16 00:12:38 +00:00
parent b194b3adc9
commit 19dbd77402

View File

@ -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