network/netmask problem

Johannes Lode johannes.lode at gmx.net
Fri Jun 7 11:17:17 CEST 2002


Hello,

I just upgraded from tinc1.0pre4 to 1.0pre7 and the new thing works
fine.
But with on exception: your function maskcheck() ist still silly. It
classifies the subnet definition 172.16.11.8/29 as wrong (seems to be
the same error as in 1.0pre6 as dicussed in April). My whole VPN is a
class C network (24 bit netmask) and thus every edge of the VPN serves
subnets of the class C network. Therefor the definition 172.16.11.8/29
is for me mandatory to be working.

My first workaround was to comment out your maskcheck code (just below
the comment "teach newbies what subnets are" and before the statement
"*result = subnet" in src/conf.c).

Please find an other fix for that because I think the maskcheck itself
make sense. Unfortunately I am no good C programmer but an better
assembler programmer. My fix of the maskcheck function would not be
elegant C code.
In assembler language I would create code that serves for the following
function (IPv4):

netmask := ( 0xffffffff00000000 rshiftby netmasklength ) and 0xffffffff

OK := (netaddress and not(netmask)) = 0



I´ve no idea how to check IPv6 because I had not (yet) contact with the
new standard :-(

In general you are doing a good job with tinc. Congratulations

Johnny

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://brouwer.uvt.nl/pipermail/tinc-devel/attachments/20020607/f1668fe0/attachment.html


More information about the Tinc-devel mailing list