Don't parse node IDs if the sending node doesn't support them.
authorEtienne Dechamps <etienne@edechamps.fr>
Mon, 18 May 2015 19:48:45 +0000 (20:48 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Mon, 18 May 2015 19:56:16 +0000 (20:56 +0100)
commitfef29d0193afc7e0a9dc766ef75b79cd4dc6fa37
treea7c9536bfe4eff1e2a29991f8dd6e0d26f01e09c
parent643149b44991121c618a2412c64072ad22955991
Don't parse node IDs if the sending node doesn't support them.

Currently, tinc tries to parse node IDs for all SPTPS packets, including
ones sent from older, pre-node-IDs tinc-1.1 nodes, and therefore doesn't
recognize packets from these nodes. This commit fixes that.

It also makes code slightly clearer by reducing the amount of fiddling
around packet offset/length.
src/net_packet.c