diff -Nru 2ping-4.1/debian/changelog 2ping-4.1/debian/changelog --- 2ping-4.1/debian/changelog 2017-08-06 02:41:04.000000000 +0000 +++ 2ping-4.1/debian/changelog 2018-08-10 04:31:04.000000000 +0000 @@ -1,3 +1,9 @@ +2ping (4.1-1ubuntu1) bionic; urgency=medium + + * SRU: Fix cleanup crash on non-encrypted sessions (LP: #1786397) + + -- Ryan Finnie Fri, 10 Aug 2018 04:31:04 +0000 + 2ping (4.1-1) unstable; urgency=medium * New upstream release diff -Nru 2ping-4.1/debian/patches/lp1786397-non-encrypted-session-cleanup.patch 2ping-4.1/debian/patches/lp1786397-non-encrypted-session-cleanup.patch --- 2ping-4.1/debian/patches/lp1786397-non-encrypted-session-cleanup.patch 1970-01-01 00:00:00.000000000 +0000 +++ 2ping-4.1/debian/patches/lp1786397-non-encrypted-session-cleanup.patch 2018-08-10 04:31:04.000000000 +0000 @@ -0,0 +1,23 @@ +From 4a636763850bcea590fba6066751d13a36c2b28d Mon Sep 17 00:00:00 2001 +From: Ryan Finnie +Date: Thu, 9 Aug 2018 20:28:09 -0700 +Subject: [PATCH] Fix cleanup on non-encrypted sessions (GitHub + rfinnie/2ping#5) + +--- + twoping/cli.py | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/twoping/cli.py b/twoping/cli.py +index ecc848f..51313fd 100755 +--- a/twoping/cli.py ++++ b/twoping/cli.py +@@ -1046,6 +1046,8 @@ def scheduled_cleanup_sock_class(self, sock_class): + del(sock_class.courtesy_messages[peer_tuple]) + self.print_debug('Cleanup: Removed courtesy_messages empty {}'.format(repr(peer_tuple))) + for peer_tuple in tuple(sock_class.encrypted_sessions.keys()): ++ if sock_class.encrypted_sessions[peer_tuple] is None: ++ continue + if now > (sock_class.encrypted_sessions[peer_tuple][0] + 600.0): + del(sock_class.encrypted_sessions[peer_tuple]) + self.print_debug('Cleanup: Removed encrypted_sessions {}'.format(repr(peer_tuple))) diff -Nru 2ping-4.1/debian/patches/series 2ping-4.1/debian/patches/series --- 2ping-4.1/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 +++ 2ping-4.1/debian/patches/series 2018-08-10 04:31:04.000000000 +0000 @@ -0,0 +1 @@ +lp1786397-non-encrypted-session-cleanup.patch