chiark / gitweb /
server/peer.c, server/tests.at: Handle NAT swapping over peer addresses.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 7 May 2012 13:37:05 +0000 (14:37 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 7 May 2012 14:32:06 +0000 (15:32 +0100)
commit01c2190311b3eab8e861014d57ddca6160998e69
treefc5f04ead25963ebd35d40beddfabdf95fdc4225
parent30678daadcfa128ceb5b9ba29f2b90041a2482e0
server/peer.c, server/tests.at: Handle NAT swapping over peer addresses.

Previously, we'd notice when a mobile peer switched address (e.g., due
to NAT) to one that wasn't currently known; but it seems that some
particularly awful NAT boxes will actually swap over the addresses
assigned to two peers on the wrong side of it.  The static hub peer will
see this as a bunch of decryption failures but not do anything about
it.  Eventually the mobile peers will notice a ping timeout and
reconnect, but this can take a while.

So, when we get a decryption failure from a mobile peer, see whether any
other mobile peers are interested in it.
server/peer.c
server/tests.at