From: Mark Wooding Date: Mon, 27 Jun 2011 13:47:04 +0000 (+0100) Subject: svc/conntrack.in: Don't track the local IP address any more. X-Git-Tag: 1.0.0pre11~24 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/tripe/commitdiff_plain/7b7e3c74e04ac019a6f888a0cd090e224513c4b4 svc/conntrack.in: Don't track the local IP address any more. If we need to change the peer name, we still need a full renegotiation; otherwise we can let the mobile-peer machinery deal with us. This will, with a little luck, result in a smoother handover when a mobile peer roams between networks (or gets screwed by NAT). --- diff --git a/svc/conntrack.in b/svc/conntrack.in index a7431321..78141e6f 100644 --- a/svc/conntrack.in +++ b/svc/conntrack.in @@ -214,7 +214,6 @@ def localaddr(peer): _kick = T.Queue() def kickpeers(): - lastip = {} while True: upness, reason = _kick.get() @@ -280,14 +279,13 @@ def kickpeers(): changes.append(_) ## Start the right one if necessary. - if want is not None and (not found or ip != lastip.get(g, None)): + if want is not None and not found: def _(want = want): try: SM.svcsubmit('connect', 'active', want) except T.TripeError, exc: SM.warn('conntrack', 'connect-failed', want, *exc.args) changes.append(_) - lastip[g] = ip ## Commit the changes. if changes: