I’m trying to see what it would take to alter zerotier’s code and create a separate “global ethernet switch”. I’ve edited World.hpp
to update my planet definition, given it a unique ID, and mkworld.cpp
to hard-code the new IP addresses of my roots as well as reference the header planet definition. All compiles well (building off the 1.6.1 tag) but I’m still missing a piece.
Running the new code results in a segfault, which when traced points to a malformed “planet” file in the home dir:
open("/var/db/zerotier-one//planet",O_RDONLY,0666) = 6 (0x6)
fstat(6,{ mode=-rw-r--r-- ,inode=196674,size=570,blksize=4096 }) = 0 (0x0)
read(6,"\^A\0\0\0\0\b\M-j\M-I\n\0\0\^Ar"...,4096) = 570 (0x23a)
read(6,0x8017a8000,4096) = 0 (0x0)
close(6) = 0 (0x0)
mmap(0x0,20480,PROT_READ|PROT_WRITE,MAP_PRIVATE|MAP_ANON,-1,0x0) = 34384842752 (0x8017f1000)
SIGNAL 11 (SIGSEGV) code=SEGV_MAPERR trapno=12 addr=0x20011ce2c4
process killed, signal = 11 (core dumped)
Would anyone here know what this file is/how to generate it? Seems to be binary data upon inspection, maybe a signature or cert of some kind?
for reference (to those who aren’t BSD-native), /var/db/zerotier-one/planet
and /var/lib/zerotier-one/planet
are the same file, for BSD/Linux respectively.
Thanks in advance