Fixed an issue where the DefaultMask was used instead of the actual network mask

If, for example, the nodes are on a 10.0.0.0/24 network the DefaultMask
will return a /8 network instead of the actually used /24 network. This
results in nodes not being able to find each other as they are trying
to scan a way to large subnet which takes quite a lot of time.