chiark / gitweb /
polypath asymmetric routing: Priority to mobile sites
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Wed, 15 May 2019 21:42:10 +0000 (22:42 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 18 May 2019 01:16:37 +0000 (02:16 +0100)
commitb2de6bd2d9b5e9047a660e926c4adb17da54fc29
treeef525ce699ae9bd3d57b5524d6a74a051e3c2881
parent67871f70403951d279efb20e4821b77dd75daecf
polypath asymmetric routing: Priority to mobile sites

It is better for the mobile peer to win the key setup priority
battle.  That makes handling the transport address implications,
particularly those of the MSG1, easier.

Since both ends must agree on who has priority, this must be
negotiated.  We use a capability bit for this.  Since the decision is
taken when we have only seen each other's MSG1, it must be an early
capability.  For compatibility with ancient (and security-buggy)
secnets, we can avoid advertising it if neither end is mobile.

In practice, in my tests, this change avoids a spurious key setup
failure when my laptop's secnet is restarted: the new secnet gets a
new NATted address, but the server has priority and insists on talking
to the old address.

Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
---
v2: Document in NOTES following rebase over
    "NOTES: Describe the current allocation of capability bits."
NOTES
magic.h
site.c