Skip to content
This repository has been archived by the owner on Sep 17, 2021. It is now read-only.

Collisions #25

Open
jasonkhanlar opened this issue Jun 15, 2016 · 1 comment
Open

Collisions #25

jasonkhanlar opened this issue Jun 15, 2016 · 1 comment

Comments

@jasonkhanlar
Copy link
Member

jasonkhanlar commented Jun 15, 2016

With written example provided by Protagonistics:

Mesh: 100.64.65.66
Ethermesh: 100.66.65.54

and

Mesh: 100.64.65.170
Ethermesh: 100.170.65.64 (which should convert to 100.106.65.64 to fit in 100.64-127.x.x range)

there are collisions if 2nd octect == 4th octet, example:
Mesh: 100.64.65.64
Ethermesh: 100.64.65.64

To avoid such collisions, ensure that 4th octet never equals (after adjusting to fit in 64-127 range) 2nd octet.

Cut 2nd octet in half. Rather than 64-127, split into 64-95 and 96-127, and ensure that 2nd octet always is within one range, and 4th octet is within the other range.

For example, 2nd octet will always be 96-127 and 4th octet will always be 0-31, 64-95, 128-159, 192-223 and will never be 32-63, 96-127, 160-191, 224-255 (because those when adjusted to fit within 64-127 range will collide with 2nd octet when reversing 2nd/3rd/4th octets from mesh to 4th/3rd/2nd octets for ethermesh)

@jasonkhanlar
Copy link
Member Author

#26

colindean added a commit that referenced this issue Jun 22, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant