Explicit close-down notifications. 1.0.0pre12
authorMark Wooding <mdw@distorted.org.uk>
Sat, 5 Jan 2013 07:52:43 +0000 (07:52 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Sat, 5 Jan 2013 08:54:42 +0000 (08:54 +0000)
Suppose I have a mobile device, and I roam from one peer to another in
the same organization.  The old peer will continue to believe that I'm
connected through it until it notices, some time later, that pings
aren't getting through to me; it will therefore be sending packets to me
through its broken tunnel.  Suppose further that the organization is
using some dynamic routing protocol in order to propagate information
about how packets to me ought to be routed: then, this old peer will be
continuing to advertise its broken route to me, and all hosts closer to
the old peer than the new one will use the wrong route, until the
connection gets pinged out.

We can fix this by having the mobile peer send some explicit
notification.  It doesn't have to be completely reliable, fortunately.
This change touches a fair few pieces of the code, but in simple ways.

  * `connect' grows a new command to map a user name to a peer name.

  * `watch' grows the ability to issue a `disconnect' command.

  * The default `peers.in' file passes an explicit argument in its
    `connect' SSH rune, and adds a `disconnect' rune with a different
    action argument.

  * The contributed `knock' script knows about these new actions, and
    how to pass them about.  This is pretty much a rewrite, but it was a
    very simple program before.


No differences found