[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2017-09-11 Thread translation
commit 16b81b966ffed4755516194c3009e09d67d22021
Author: Translation commit bot 
Date:   Tue Sep 12 05:46:14 2017 +

Update translations for tor-launcher-properties
---
 am/torlauncher.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/am/torlauncher.properties b/am/torlauncher.properties
index 64c9728fa..5084bdd2f 100644
--- a/am/torlauncher.properties
+++ b/am/torlauncher.properties
@@ -32,7 +32,7 @@ torlauncher.recommended_bridge=(የሚመከር)
 
 torlauncher.connect=Connect
 torlauncher.restart_tor=Restart Tor
-torlauncher.quit=Quit
+torlauncher.quit=አቋርጥ 
 torlauncher.quit_win=ቅጣ 
 torlauncher.done=Done
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-and-https] Update translations for tor-and-https

2017-09-11 Thread translation
commit 487c8df3b45c868be903f92f598625fd907b40c8
Author: Translation commit bot 
Date:   Tue Sep 12 01:47:44 2017 +

Update translations for tor-and-https
---
 am.po | 42 +-
 1 file changed, 21 insertions(+), 21 deletions(-)

diff --git a/am.po b/am.po
index b1c3c213e..f373e78ae 100644
--- a/am.po
+++ b/am.po
@@ -3,10 +3,10 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
-"POT-Creation-Date: 2014-05-24 16:09+\n"
-"PO-Revision-Date: 2014-05-25 09:55+\n"
-"Last-Translator: runasand \n"
-"Language-Team: Amharic 
(http://www.transifex.com/projects/p/torproject/language/am/)\n"
+"POT-Creation-Date: 2014-07-17 14:23+\n"
+"PO-Revision-Date: 2017-09-12 01:24+\n"
+"Last-Translator: runasand \n"
+"Language-Team: Amharic 
(http://www.transifex.com/otf/torproject/language/am/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
@@ -29,107 +29,107 @@ msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Site.com"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "user / pw"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "data"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "location"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 3em max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "WiFi"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 4em max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "ISP"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Hacker"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Lawyer"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Sysadmin"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Police"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "NSA"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Tor relay"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Key"
-msgstr ""
+msgstr "ቁልፍ"
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Internet connection"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Eavesdropping"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Data sharing"
 msgstr ""

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-openpgp-applet] Update translations for tails-openpgp-applet

2017-09-11 Thread translation
commit 0aee6f680e2965955adaaac2ccfdafb35551955e
Author: Translation commit bot 
Date:   Tue Sep 12 01:17:58 2017 +

Update translations for tails-openpgp-applet
---
 am/openpgp-applet.pot | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/am/openpgp-applet.pot b/am/openpgp-applet.pot
index de8f5efb2..f0ad30164 100644
--- a/am/openpgp-applet.pot
+++ b/am/openpgp-applet.pot
@@ -27,7 +27,7 @@ msgstr ""
 
 #: bin/openpgp-applet:175
 msgid "Exit"
-msgstr ""
+msgstr "ቅጣ "
 
 #: bin/openpgp-applet:177
 msgid "About"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2017-09-11 Thread translation
commit 7ed72dc045d8e049cdca1dfdd2f0e7055799d9f1
Author: Translation commit bot 
Date:   Tue Sep 12 01:16:15 2017 +

Update translations for tor-launcher-properties
---
 am/torlauncher.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/am/torlauncher.properties b/am/torlauncher.properties
index ab9e56247..64c9728fa 100644
--- a/am/torlauncher.properties
+++ b/am/torlauncher.properties
@@ -33,7 +33,7 @@ torlauncher.recommended_bridge=(የሚመከር)
 torlauncher.connect=Connect
 torlauncher.restart_tor=Restart Tor
 torlauncher.quit=Quit
-torlauncher.quit_win=Exit
+torlauncher.quit_win=ቅጣ 
 torlauncher.done=Done
 
 torlauncher.forAssistance=For assistance, contact %S

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbutton-torbuttondtd] Update translations for torbutton-torbuttondtd

2017-09-11 Thread translation
commit b30d087c4146a0f9a7d52f71e9d6a4009afa906c
Author: Translation commit bot 
Date:   Tue Sep 12 00:47:14 2017 +

Update translations for torbutton-torbuttondtd
---
 am/torbutton.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/am/torbutton.dtd b/am/torbutton.dtd
index cb89155f0..269d81478 100644
--- a/am/torbutton.dtd
+++ b/am/torbutton.dtd
@@ -46,7 +46,7 @@
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/bridgedb] Update translations for bridgedb

2017-09-11 Thread translation
commit 41249110a82c326eb77ef6f0a9a357cccd01161e
Author: Translation commit bot 
Date:   Tue Sep 12 00:45:05 2017 +

Update translations for bridgedb
---
 am/LC_MESSAGES/bridgedb.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/am/LC_MESSAGES/bridgedb.po b/am/LC_MESSAGES/bridgedb.po
index d5797b11b..5717abbba 100644
--- a/am/LC_MESSAGES/bridgedb.po
+++ b/am/LC_MESSAGES/bridgedb.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: 
'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB=bridgedb-reported,msgid=isis,sysrqb=isis'\n"
 "POT-Creation-Date: 2015-07-25 03:40+\n"
-"PO-Revision-Date: 2017-09-11 05:24+\n"
+"PO-Revision-Date: 2017-09-12 00:37+\n"
 "Last-Translator: runasand \n"
 "Language-Team: Amharic 
(http://www.transifex.com/otf/torproject/language/am/)\n"
 "MIME-Version: 1.0\n"
@@ -43,7 +43,7 @@ msgstr ""
 
 #: bridgedb/https/templates/base.html:85
 msgid "Changelog"
-msgstr ""
+msgstr "የለወጥ መዝገብ "
 
 #: bridgedb/https/templates/base.html:88
 msgid "Contact"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2017-09-11 Thread translation
commit 4c57289e69aa30dfde7819ed4140cdaeb5daccaa
Author: Translation commit bot 
Date:   Mon Sep 11 23:16:15 2017 +

Update translations for tor-launcher-properties
---
 be/torlauncher.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be/torlauncher.properties b/be/torlauncher.properties
index d8b04f948..44c1e75ba 100644
--- a/be/torlauncher.properties
+++ b/be/torlauncher.properties
@@ -32,7 +32,7 @@ torlauncher.recommended_bridge=(recommended)
 
 torlauncher.connect=Злучэнне
 torlauncher.restart_tor=Restart Tor
-torlauncher.quit=Quit
+torlauncher.quit=Выхад
 torlauncher.quit_win=Выйсце
 torlauncher.done=Done
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] circuit: Add a log info when marking for close

2017-09-11 Thread nickm
commit 84bb5cb1f1d71a8f5067e85fd19c43dcb2bb33c5
Author: David Goulet 
Date:   Mon Sep 11 16:10:18 2017 -0400

circuit: Add a log info when marking for close

Closes #23462

Signed-off-by: David Goulet 
---
 src/or/circuitlist.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/or/circuitlist.c b/src/or/circuitlist.c
index 774edc90b..5cc625232 100644
--- a/src/or/circuitlist.c
+++ b/src/or/circuitlist.c
@@ -1912,6 +1912,10 @@ circuit_mark_for_close_, (circuit_t *circ, int reason, 
int line,
 circuits_pending_close = smartlist_new();
 
   smartlist_add(circuits_pending_close, circ);
+
+  log_info(LD_GENERAL, "Circuit %u marked for close at %s:%d (orig reason: "
+   "%u, new reason: %u)",
+   circ->n_circ_id, file, line, orig_reason, reason);
 }
 
 /** Called immediately before freeing a marked circuit circ from



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'dgoulet/ticket23462_032_01'

2017-09-11 Thread nickm
commit 6e4967ef03fb5d046592253c41e2a62f822332fd
Merge: e3caad0ea 84bb5cb1f
Author: Nick Mathewson 
Date:   Mon Sep 11 17:57:31 2017 -0400

Merge remote-tracking branch 'dgoulet/ticket23462_032_01'

 src/or/circuitlist.c | 4 
 1 file changed, 4 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2017-09-11 Thread nickm
commit 77a848b9d47a9f7b19bcb3204056633d7a1bd18f
Merge: 8b4ff0168 eaa8224ce
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

 changes/bug22446 | 4 
 1 file changed, 4 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit 2b26815e09760cc84b18791bdbfca27c7b8334f4
Merge: c894e9d3d 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Merge branch 'maint-0.3.0' into release-0.3.0

2017-09-11 Thread nickm
commit 9c8b07c5eba7f5809937fb913f851378e30e2667
Merge: c3debdfe6 2b26815e0
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.0' into release-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit eaa8224cef25c1fb27b5f2ef14f836325439f10e
Merge: d4f87073a 2b26815e0
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1

 changes/bug22446 | 4 
 1 file changed, 4 insertions(+)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit 2b26815e09760cc84b18791bdbfca27c7b8334f4
Merge: c894e9d3d 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/maint-0.2.9] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/release-0.3.1] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/master] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit eaa8224cef25c1fb27b5f2ef14f836325439f10e
Merge: d4f87073a 2b26815e0
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1

 changes/bug22446 | 4 
 1 file changed, 4 insertions(+)



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/release-0.2.9] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/release-0.2.9] Merge branch 'maint-0.2.9' into release-0.2.9

2017-09-11 Thread nickm
commit 2cae7c8a29f3d4c14bab103e785a1d33cade7141
Merge: 40f385dee 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into release-0.2.9

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/master] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit 2b26815e09760cc84b18791bdbfca27c7b8334f4
Merge: c894e9d3d 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/master] Merge branch 'maint-0.3.1'

2017-09-11 Thread nickm
commit e3caad0ea1fedd8d13b6772d0f848a5dd417bf12
Merge: b719fa7ef eaa8224ce
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.1'

 changes/bug22446 | 4 
 1 file changed, 4 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit 2b26815e09760cc84b18791bdbfca27c7b8334f4
Merge: c894e9d3d 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit eaa8224cef25c1fb27b5f2ef14f836325439f10e
Merge: d4f87073a 2b26815e0
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1

 changes/bug22446 | 4 
 1 file changed, 4 insertions(+)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/release-0.3.0] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/maint-0.3.1] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/maint-0.3.0] Fix GCC 7 -Wimplicit-fallthrough warnings

2017-09-11 Thread nickm
commit 6cd5a80275614105ccf8794465b6ba5c0c5e8f3f
Author: Andreas Stieger 
Date:   Sun May 28 23:49:31 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings

Add magic comments recognized by default -Wimplicit-fallthrough=3
or break, as required.
---
 src/ext/csiphash.c   | 14 +++---
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 6 files changed, 23 insertions(+), 19 deletions(-)

diff --git a/src/ext/csiphash.c b/src/ext/csiphash.c
index b60f73a7f..49a6dc477 100644
--- a/src/ext/csiphash.c
+++ b/src/ext/csiphash.c
@@ -122,13 +122,13 @@ uint64_t siphash24(const void *src, unsigned long src_sz, 
const struct sipkey *k
}
 
switch (src_sz - blocks) {
-   case 7: last7 |= (uint64_t)m[i + 6] << 48;
-   case 6: last7 |= (uint64_t)m[i + 5] << 40;
-   case 5: last7 |= (uint64_t)m[i + 4] << 32;
-   case 4: last7 |= (uint64_t)m[i + 3] << 24;
-   case 3: last7 |= (uint64_t)m[i + 2] << 16;
-   case 2: last7 |= (uint64_t)m[i + 1] <<  8;
-   case 1: last7 |= (uint64_t)m[i + 0]  ;
+   case 7: last7 |= (uint64_t)m[i + 6] << 48; /* Falls through. */
+   case 6: last7 |= (uint64_t)m[i + 5] << 40; /* Falls through. */
+   case 5: last7 |= (uint64_t)m[i + 4] << 32; /* Falls through. */
+   case 4: last7 |= (uint64_t)m[i + 3] << 24; /* Falls through. */
+   case 3: last7 |= (uint64_t)m[i + 2] << 16; /* Falls through. */
+   case 2: last7 |= (uint64_t)m[i + 1] <<  8; /* Falls through. */
+   case 1: last7 |= (uint64_t)m[i + 0]  ; /* Falls through. */
case 0:
default:;
}
diff --git a/src/ext/ed25519/donna/modm-donna-64bit.h 
b/src/ext/ed25519/donna/modm-donna-64bit.h
index 012ea9ea0..06c98e303 100644
--- a/src/ext/ed25519/donna/modm-donna-64bit.h
+++ b/src/ext/ed25519/donna/modm-donna-64bit.h
@@ -294,10 +294,10 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++;
+   case 4: out[i] = (a[i] - b[i]); carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 63); 
out[i] &= 0xff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -310,10 +310,10 @@ lt256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++;
-   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++;
+   case 4: t = (a[i] - b[i]); carry = (t >> 63); i++; /* 
Falls through. */
+   case 3: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 2: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
+   case 1: t = (a[i] - b[i]) - carry; carry = (t >> 63); i++; /* 
Falls through. */
case 0: t = (a[i] - b[i]) - carry; carry = (t >> 63);
}
return (int)carry;
@@ -325,10 +325,10 @@ lte256_modm_batch(const bignum256modm a, const 
bignum256modm b, size_t limbsize)
size_t i = 0;
bignum256modm_element_t t, carry = 0;
switch (limbsize) {
-   case 4: t = (b[i] - a[i]); carry = (t >> 63); i++;
-   case 3: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 2: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
-   case 1: t = (b[i] - a[i]) - carry; carry = (t >> 63); i++;
+  

[tor-commits] [tor/maint-0.2.9] Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

2017-09-11 Thread nickm
commit b81a2e8f46bf5951a9dd0890f7e1420cf3a6a57c
Author: Andreas Stieger 
Date:   Wed May 31 11:54:11 2017 +0200

Fix GCC 7 -Wimplicit-fallthrough warnings (32 bit)

Add magic comments recognized by default -Wimplicit-fallthrough=3
Follow-up to e5f464, fixes Ticket 22446 for 32 bit.

[nick notes: Backport from 0.3.1.3-alpha.]
---
 changes/bug22446 |  4 +++
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 2 files changed, 28 insertions(+), 24 deletions(-)

diff --git a/changes/bug22446 b/changes/bug22446
new file mode 100644
index 0..eab65aac0
--- /dev/null
+++ b/changes/bug22446
@@ -0,0 +1,4 @@
+  o Minor features (code style, backport from 0.3.1.3-alpha):
+- Add "Falls through" comments to our codebase, in order to silence
+  GCC 7's -Wimplicit-fallthrough warnings. Patch from Andreas
+  Stieger. Closes ticket 22446.
diff --git a/src/ext/ed25519/donna/modm-donna-32bit.h 
b/src/ext/ed25519/donna/modm-donna-32bit.h
index 5f36df655..0ef9e58fa 100644
--- a/src/ext/ed25519/donna/modm-donna-32bit.h
+++ b/src/ext/ed25519/donna/modm-donna-32bit.h
@@ -385,14 +385,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
size_t i = 0;
bignum256modm_element_t carry = 0;
switch (limbsize) {
-   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
-   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++;
+   case 8: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 7: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 6: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 5: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 4: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 3: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 2: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
+   case 1: out[i] = (a[i] - b[i]) - carry; carry = (out[i] >> 31); 
out[i] &= 0x3fff; i++; /* Falls through. */
case 0: 
default: out[i] = (a[i] - b[i]) - carry;
}
@@ -403,14 +403,14 @@ sub256_modm_batch(bignum256modm out, const bignum256modm 
a, const bignum256modm
 static int
 lt256_modm_batch(const bignum256modm a, const bignum256modm b, size_t 
limbsize) {
switch (limbsize) {
-   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1;
-   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1;
-   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1;
-   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1;
-   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1;
-   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1;
-   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1;
-   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1;
+   case 8: if (a[8] > b[8]) return 0; if (a[8] < b[8]) return 1; 
/* Falls through. */
+   case 7: if (a[7] > b[7]) return 0; if (a[7] < b[7]) return 1; 
/* Falls through. */
+   case 6: if (a[6] > b[6]) return 0; if (a[6] < b[6]) return 1; 
/* Falls through. */
+   case 5: if (a[5] > b[5]) return 0; if (a[5] < b[5]) return 1; 
/* Falls through. */
+   case 4: if (a[4] > b[4]) return 0; if (a[4] < b[4]) return 1; 
/* Falls through. */
+   case 3: if (a[3] > b[3]) return 0; if (a[3] < b[3]) return 1; 
/* Falls through. */
+   case 2: if (a[2] > b[2]) return 0; if (a[2] < b[2]) return 1; 
/* Falls through. */
+   case 1: if (a[1] > b[1]) return 0; if (a[1] < b[1]) return 1; 
/* Falls 

[tor-commits] [tor/maint-0.3.0] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit 2b26815e09760cc84b18791bdbfca27c7b8334f4
Merge: c894e9d3d 6cd5a8027
Author: Nick Mathewson 
Date:   Mon Sep 11 17:49:18 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22446 |  4 +++
 src/ext/csiphash.c   | 14 +-
 src/ext/ed25519/donna/modm-donna-32bit.h | 48 
 src/ext/ed25519/donna/modm-donna-64bit.h | 24 
 src/or/buffers.c |  1 +
 src/or/connection_edge.c |  1 +
 src/or/dns.c |  1 +
 src/or/relay.c   |  1 +
 8 files changed, 51 insertions(+), 43 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/mat-gui] Update translations for mat-gui

2017-09-11 Thread translation
commit 34b30006413ad82a90277c4d1cb20a742b2ba42e
Author: Translation commit bot 
Date:   Mon Sep 11 21:46:08 2017 +

Update translations for mat-gui
---
 be.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/be.po b/be.po
index 0cf967188..ae9966ce0 100644
--- a/be.po
+++ b/be.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2016-02-10 23:06+0100\n"
-"PO-Revision-Date: 2017-09-11 09:27+\n"
+"PO-Revision-Date: 2017-09-11 21:21+\n"
 "Last-Translator: carolyn \n"
 "Language-Team: Belarusian 
(http://www.transifex.com/otf/torproject/language/be/)\n"
 "MIME-Version: 1.0\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] downgrade warning for #23465

2017-09-11 Thread nickm
commit b719fa7efe8678cc5d90a57ea3c1fe370246a473
Author: Nick Mathewson 
Date:   Mon Sep 11 16:50:43 2017 -0400

downgrade warning for #23465
---
 src/or/hs_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 1fbea95e2..cde0231d9 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -1017,7 +1017,7 @@ hs_client_refetch_hsdesc(const ed25519_public_key_t 
*identity_pk)
 cached_desc = hs_cache_lookup_as_client(identity_pk);
 if (cached_desc && hs_client_any_intro_points_usable(identity_pk,
  cached_desc)) {
-  log_warn(LD_GENERAL, "We would fetch a v3 hidden service descriptor "
+  log_info(LD_GENERAL, "We would fetch a v3 hidden service descriptor "
 "but we already have a usable descriptor.");
   return 0;
 }

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] spelling

2017-09-11 Thread nickm
commit c5a55975725077f29ab499311788b182dfb54fe2
Author: Nick Mathewson 
Date:   Mon Sep 11 16:48:27 2017 -0400

spelling
---
 src/or/hs_client.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index c8b65aeab..1fbea95e2 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -1018,7 +1018,7 @@ hs_client_refetch_hsdesc(const ed25519_public_key_t 
*identity_pk)
 if (cached_desc && hs_client_any_intro_points_usable(identity_pk,
  cached_desc)) {
   log_warn(LD_GENERAL, "We would fetch a v3 hidden service descriptor "
-"but we already have a useable descriprot.");
+"but we already have a usable descriptor.");
   return 0;
 }
   }

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-and-https] Update translations for tor-and-https

2017-09-11 Thread translation
commit 244dd0d0c535a376312d9b6f96635a6e50125a3e
Author: Translation commit bot 
Date:   Mon Sep 11 20:47:36 2017 +

Update translations for tor-and-https
---
 be.po | 44 ++--
 1 file changed, 22 insertions(+), 22 deletions(-)

diff --git a/be.po b/be.po
index fe38e546a..5a400f9da 100644
--- a/be.po
+++ b/be.po
@@ -3,15 +3,15 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
-"POT-Creation-Date: 2014-05-24 16:09+\n"
-"PO-Revision-Date: 2014-05-25 09:55+\n"
-"Last-Translator: runasand \n"
-"Language-Team: Belarusian 
(http://www.transifex.com/projects/p/torproject/language/be/)\n"
+"POT-Creation-Date: 2014-07-17 14:23+\n"
+"PO-Revision-Date: 2017-09-11 20:27+\n"
+"Last-Translator: runasand \n"
+"Language-Team: Belarusian 
(http://www.transifex.com/otf/torproject/language/be/)\n"
 "MIME-Version: 1.0\n"
 "Content-Type: text/plain; charset=UTF-8\n"
 "Content-Transfer-Encoding: 8bit\n"
 "Language: be\n"
-"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && 
n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=4; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && 
n%10<=4 && (n%100<12 || n%100>14) ? 1 : n%10==0 || (n%10>=5 && n%10<=9) || 
(n%100>=11 && n%100<=14)? 2 : 3);\n"
 
 #. (itstool) path: C/tor-and-https.svg/svg@direction
 #. (itstool) comment: C/tor-and-https.svg/svg@direction
@@ -29,107 +29,107 @@ msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Site.com"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "user / pw"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "data"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 7em max. Seven times the capital letter "M".
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "location"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 3em max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "WiFi"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 4em max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "ISP"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Hacker"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Lawyer"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Sysadmin"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Police"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "NSA"
 msgstr ""
 
 #. (itstool) path: defs/text
 #. Keep it short: 8em is ok, 9em is max.
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Tor relay"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Key"
-msgstr ""
+msgstr "Ключ"
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Internet connection"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Eavesdropping"
 msgstr ""
 
 #. (itstool) path: defs/text
-#: C/tor-and-https.svg:348
+#: C/tor-and-https.svg:363
 #, no-wrap
 msgid "Data sharing"
 msgstr ""

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] hs: Handled REND_JOINED circuit when getting an INTRODUCE_ACK

2017-09-11 Thread nickm
commit b71f4ecb8d289f0d8a44eaadedf51773640ff2b8
Author: David Goulet 
Date:   Mon Sep 11 11:06:22 2017 -0400

hs: Handled REND_JOINED circuit when getting an INTRODUCE_ACK

Because we can get a RENDEZVOUS2 cell before the INTRODUCE_ACK, we need to
correctly handle the circuit purpose REND_JOINED that is not change its
purpose when we get an INTRODUCE_ACK and simply close the intro circuit
normally.

Fixes #23455

Signed-off-by: David Goulet 
---
 src/or/hs_circuitmap.c | 24 +---
 src/or/hs_client.c |  8 
 2 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/src/or/hs_circuitmap.c b/src/or/hs_circuitmap.c
index 09704d796..63d5c1ba2 100644
--- a/src/or/hs_circuitmap.c
+++ b/src/or/hs_circuitmap.c
@@ -407,9 +407,20 @@ hs_circuitmap_get_rend_circ_service_side(const uint8_t 
*cookie)
 }
 
 /* Public function: Return client-side rendezvous circuit with rendezvous
- * cookie. It will first lookup for the CIRCUIT_PURPOSE_C_REND_READY
- * purpose and then try for CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED and then
- * finally tries for CIRCUIT_PURPOSE_C_ESTABLISH_REND.
+ * cookie. It will look for circuits with the following purposes:
+
+ * a) CIRCUIT_PURPOSE_C_REND_READY: Established rend circuit (received
+ *RENDEZVOUS_ESTABLISHED). Waiting for RENDEZVOUS2 from service, and for
+ *INTRODUCE_ACK from intro point.
+ *
+ * b) CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED: Established rend circuit and
+ *introduce circuit acked. Waiting for RENDEZVOUS2 from service.
+ *
+ * c) CIRCUIT_PURPOSE_C_REND_JOINED: Established rend circuit and received
+ *RENDEZVOUS2 from service.
+ *
+ * d) CIRCUIT_PURPOSE_C_ESTABLISH_REND: Rend circuit open but not yet
+ *established.
  *
  * Return NULL if no such circuit is found in the circuitmap. */
 origin_circuit_t *
@@ -433,6 +444,13 @@ hs_circuitmap_get_rend_circ_client_side(const uint8_t 
*cookie)
 
   circ = hs_circuitmap_get_origin_circuit(HS_TOKEN_REND_CLIENT_SIDE,
   REND_TOKEN_LEN, cookie,
+  CIRCUIT_PURPOSE_C_REND_JOINED);
+  if (circ) {
+return circ;
+  }
+
+  circ = hs_circuitmap_get_origin_circuit(HS_TOKEN_REND_CLIENT_SIDE,
+  REND_TOKEN_LEN, cookie,
   CIRCUIT_PURPOSE_C_ESTABLISH_REND);
   return circ;
 }
diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index f85ebc847..652b7cf74 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -746,6 +746,14 @@ handle_introduce_ack_success(origin_circuit_t *intro_circ)
   }
 
   assert_circ_anonymity_ok(rend_circ, get_options());
+
+  /* It is possible to get a RENDEZVOUS2 cell before the INTRODUCE_ACK which
+   * means that the circuit will be joined and already transmitting data. In
+   * that case, simply skip the purpose change and close the intro circuit
+   * like it should be. */
+  if (TO_CIRCUIT(rend_circ)->purpose == CIRCUIT_PURPOSE_C_REND_JOINED) {
+goto end;
+  }
   circuit_change_purpose(TO_CIRCUIT(rend_circ),
  CIRCUIT_PURPOSE_C_REND_READY_INTRO_ACKED);
   /* Set timestamp_dirty, because circuit_expire_building expects it to



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge remote-tracking branch 'dgoulet/bug23455_032_01'

2017-09-11 Thread nickm
commit 2a1ddd78da86d6a675146ae2afabfbcede437a95
Merge: 007d3d233 b71f4ecb8
Author: Nick Mathewson 
Date:   Mon Sep 11 16:32:40 2017 -0400

Merge remote-tracking branch 'dgoulet/bug23455_032_01'

 src/or/hs_circuitmap.c | 24 +---
 src/or/hs_client.c |  8 
 2 files changed, 29 insertions(+), 3 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit d4f87073aec5e8ef6090cf8f246ffd7483968567
Merge: 72ea4a8f0 c894e9d3d
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Always allow extra file descriptors when setting the connection maximum

2017-09-11 Thread nickm
commit 878e0d45a5d1469965d456a5d8a436b45ac59c3a
Author: teor 
Date:   Mon Jul 3 15:30:52 2017 +1000

Always allow extra file descriptors when setting the connection maximum

When setting the maximum number of connections allowed by the OS,
always allow some extra file descriptors for other files.

Fixes bug 22797; bugfix on 0.2.0.10-alpha.
---
 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/changes/bug22797 b/changes/bug22797
new file mode 100644
index 0..619baaa40
--- /dev/null
+++ b/changes/bug22797
@@ -0,0 +1,4 @@
+  o Minor bugfixes (file limits):
+- When setting the maximum number of connections allowed by the OS,
+  always allow some extra file descriptors for other files.
+  Fixes bug 22797; bugfix on 0.2.0.10-alpha.
diff --git a/src/common/compat.c b/src/common/compat.c
index e25ecc462..eee52ad34 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1568,19 +1568,24 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
   if (setrlimit(RLIMIT_NOFILE, ) != 0) {
 int bad = 1;
 #ifdef OPEN_MAX
-if (errno == EINVAL && OPEN_MAX < rlim.rlim_cur) {
+uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
+if (errno == EINVAL && try_limit < rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
-  rlim.rlim_cur = OPEN_MAX;
+  rlim.rlim_cur = try_limit;
   if (setrlimit(RLIMIT_NOFILE, ) == 0) {
 if (rlim.rlim_cur < (rlim_t)limit) {
   log_warn(LD_CONFIG, "We are limited to %lu file descriptors by "
- "OPEN_MAX, and ConnLimit is %lu.  Changing ConnLimit; sorry.",
-   (unsigned long)OPEN_MAX, (unsigned long)limit);
+   "OPEN_MAX (%lu), and ConnLimit is %lu.  Changing "
+   "ConnLimit; sorry.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)limit);
 } else {
-  log_info(LD_CONFIG, "Dropped connection limit to OPEN_MAX (%lu); "
-   "Apparently, %lu was too high and rlimit lied to us.",
-   (unsigned long)OPEN_MAX, (unsigned long)rlim.rlim_max);
+  log_info(LD_CONFIG, "Dropped connection limit to %lu based on "
+   "OPEN_MAX (%lu); Apparently, %lu was too high and rlimit "
+   "lied to us.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)rlim.rlim_max);
 }
 bad = 0;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Always allow extra file descriptors when setting the connection maximum

2017-09-11 Thread nickm
commit 878e0d45a5d1469965d456a5d8a436b45ac59c3a
Author: teor 
Date:   Mon Jul 3 15:30:52 2017 +1000

Always allow extra file descriptors when setting the connection maximum

When setting the maximum number of connections allowed by the OS,
always allow some extra file descriptors for other files.

Fixes bug 22797; bugfix on 0.2.0.10-alpha.
---
 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/changes/bug22797 b/changes/bug22797
new file mode 100644
index 0..619baaa40
--- /dev/null
+++ b/changes/bug22797
@@ -0,0 +1,4 @@
+  o Minor bugfixes (file limits):
+- When setting the maximum number of connections allowed by the OS,
+  always allow some extra file descriptors for other files.
+  Fixes bug 22797; bugfix on 0.2.0.10-alpha.
diff --git a/src/common/compat.c b/src/common/compat.c
index e25ecc462..eee52ad34 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1568,19 +1568,24 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
   if (setrlimit(RLIMIT_NOFILE, ) != 0) {
 int bad = 1;
 #ifdef OPEN_MAX
-if (errno == EINVAL && OPEN_MAX < rlim.rlim_cur) {
+uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
+if (errno == EINVAL && try_limit < rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
-  rlim.rlim_cur = OPEN_MAX;
+  rlim.rlim_cur = try_limit;
   if (setrlimit(RLIMIT_NOFILE, ) == 0) {
 if (rlim.rlim_cur < (rlim_t)limit) {
   log_warn(LD_CONFIG, "We are limited to %lu file descriptors by "
- "OPEN_MAX, and ConnLimit is %lu.  Changing ConnLimit; sorry.",
-   (unsigned long)OPEN_MAX, (unsigned long)limit);
+   "OPEN_MAX (%lu), and ConnLimit is %lu.  Changing "
+   "ConnLimit; sorry.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)limit);
 } else {
-  log_info(LD_CONFIG, "Dropped connection limit to OPEN_MAX (%lu); "
-   "Apparently, %lu was too high and rlimit lied to us.",
-   (unsigned long)OPEN_MAX, (unsigned long)rlim.rlim_max);
+  log_info(LD_CONFIG, "Dropped connection limit to %lu based on "
+   "OPEN_MAX (%lu); Apparently, %lu was too high and rlimit "
+   "lied to us.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)rlim.rlim_max);
 }
 bad = 0;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit c894e9d3d44bceaf209a9b73c2c43911af3eb1a8
Merge: f5092e711 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit d4f87073aec5e8ef6090cf8f246ffd7483968567
Merge: 72ea4a8f0 c894e9d3d
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Merge branch 'maint-0.3.0' into release-0.3.0

2017-09-11 Thread nickm
commit c3debdfe6cef2382d4807a3f9292dd7bd87965a5
Merge: 3a7e2ce1b c894e9d3d
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.0' into release-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit c894e9d3d44bceaf209a9b73c2c43911af3eb1a8
Merge: f5092e711 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.0] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit c894e9d3d44bceaf209a9b73c2c43911af3eb1a8
Merge: f5092e711 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2017-09-11 Thread nickm
commit 8b4ff0168ac4d9ec758fdf50769067d55c7a061d
Merge: 4d4e2fc22 d4f87073a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.1'

2017-09-11 Thread nickm
commit 007d3d2337edf436cd9860a0430324b6904067e9
Merge: b9ecb522f d4f87073a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.1'

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.2.9] Merge branch 'maint-0.2.9' into release-0.2.9

2017-09-11 Thread nickm
commit 40f385dee73295695222c63a2ce0c62aa808e11c
Merge: 2fc33716e 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into release-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit c894e9d3d44bceaf209a9b73c2c43911af3eb1a8
Merge: f5092e711 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Merge branch 'maint-0.2.9' into maint-0.3.0

2017-09-11 Thread nickm
commit c894e9d3d44bceaf209a9b73c2c43911af3eb1a8
Merge: f5092e711 6a49e3360
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.2.9' into maint-0.3.0

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Fix mixed-sign comparison warning in fix for 22797.

2017-09-11 Thread nickm
commit 6a49e3360bcb30b267da4a47af749bd4571ee72d
Author: Nick Mathewson 
Date:   Wed Jul 5 15:56:57 2017 -0400

Fix mixed-sign comparison warning in fix for 22797.
---
 src/common/compat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/common/compat.c b/src/common/compat.c
index 3ebcfad14..e16dfb1d2 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1719,7 +1719,7 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
 int bad = 1;
 #ifdef OPEN_MAX
 uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
-if (errno == EINVAL && try_limit < rlim.rlim_cur) {
+if (errno == EINVAL && try_limit < (uint64_t) rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
   rlim.rlim_cur = try_limit;

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'teor-bug22797-025' into maint-0.2.9

2017-09-11 Thread nickm
commit a25d97e53046132567fd78e82791a2f8cad7b199
Merge: 3cace828a 878e0d45a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:28:59 2017 -0400

Merge branch 'teor-bug22797-025' into maint-0.2.9

 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)




___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Merge branch 'maint-0.3.0' into maint-0.3.1

2017-09-11 Thread nickm
commit d4f87073aec5e8ef6090cf8f246ffd7483968567
Merge: 72ea4a8f0 c894e9d3d
Author: Nick Mathewson 
Date:   Mon Sep 11 16:29:10 2017 -0400

Merge branch 'maint-0.3.0' into maint-0.3.1

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.2.9] Always allow extra file descriptors when setting the connection maximum

2017-09-11 Thread nickm
commit 878e0d45a5d1469965d456a5d8a436b45ac59c3a
Author: teor 
Date:   Mon Jul 3 15:30:52 2017 +1000

Always allow extra file descriptors when setting the connection maximum

When setting the maximum number of connections allowed by the OS,
always allow some extra file descriptors for other files.

Fixes bug 22797; bugfix on 0.2.0.10-alpha.
---
 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/changes/bug22797 b/changes/bug22797
new file mode 100644
index 0..619baaa40
--- /dev/null
+++ b/changes/bug22797
@@ -0,0 +1,4 @@
+  o Minor bugfixes (file limits):
+- When setting the maximum number of connections allowed by the OS,
+  always allow some extra file descriptors for other files.
+  Fixes bug 22797; bugfix on 0.2.0.10-alpha.
diff --git a/src/common/compat.c b/src/common/compat.c
index e25ecc462..eee52ad34 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1568,19 +1568,24 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
   if (setrlimit(RLIMIT_NOFILE, ) != 0) {
 int bad = 1;
 #ifdef OPEN_MAX
-if (errno == EINVAL && OPEN_MAX < rlim.rlim_cur) {
+uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
+if (errno == EINVAL && try_limit < rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
-  rlim.rlim_cur = OPEN_MAX;
+  rlim.rlim_cur = try_limit;
   if (setrlimit(RLIMIT_NOFILE, ) == 0) {
 if (rlim.rlim_cur < (rlim_t)limit) {
   log_warn(LD_CONFIG, "We are limited to %lu file descriptors by "
- "OPEN_MAX, and ConnLimit is %lu.  Changing ConnLimit; sorry.",
-   (unsigned long)OPEN_MAX, (unsigned long)limit);
+   "OPEN_MAX (%lu), and ConnLimit is %lu.  Changing "
+   "ConnLimit; sorry.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)limit);
 } else {
-  log_info(LD_CONFIG, "Dropped connection limit to OPEN_MAX (%lu); "
-   "Apparently, %lu was too high and rlimit lied to us.",
-   (unsigned long)OPEN_MAX, (unsigned long)rlim.rlim_max);
+  log_info(LD_CONFIG, "Dropped connection limit to %lu based on "
+   "OPEN_MAX (%lu); Apparently, %lu was too high and rlimit "
+   "lied to us.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)rlim.rlim_max);
 }
 bad = 0;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.0] Always allow extra file descriptors when setting the connection maximum

2017-09-11 Thread nickm
commit 878e0d45a5d1469965d456a5d8a436b45ac59c3a
Author: teor 
Date:   Mon Jul 3 15:30:52 2017 +1000

Always allow extra file descriptors when setting the connection maximum

When setting the maximum number of connections allowed by the OS,
always allow some extra file descriptors for other files.

Fixes bug 22797; bugfix on 0.2.0.10-alpha.
---
 changes/bug22797|  4 
 src/common/compat.c | 19 ---
 2 files changed, 16 insertions(+), 7 deletions(-)

diff --git a/changes/bug22797 b/changes/bug22797
new file mode 100644
index 0..619baaa40
--- /dev/null
+++ b/changes/bug22797
@@ -0,0 +1,4 @@
+  o Minor bugfixes (file limits):
+- When setting the maximum number of connections allowed by the OS,
+  always allow some extra file descriptors for other files.
+  Fixes bug 22797; bugfix on 0.2.0.10-alpha.
diff --git a/src/common/compat.c b/src/common/compat.c
index e25ecc462..eee52ad34 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -1568,19 +1568,24 @@ set_max_file_descriptors(rlim_t limit, int *max_out)
   if (setrlimit(RLIMIT_NOFILE, ) != 0) {
 int bad = 1;
 #ifdef OPEN_MAX
-if (errno == EINVAL && OPEN_MAX < rlim.rlim_cur) {
+uint64_t try_limit = OPEN_MAX - ULIMIT_BUFFER;
+if (errno == EINVAL && try_limit < rlim.rlim_cur) {
   /* On some platforms, OPEN_MAX is the real limit, and getrlimit() is
* full of nasty lies.  I'm looking at you, OSX 10.5 */
-  rlim.rlim_cur = OPEN_MAX;
+  rlim.rlim_cur = try_limit;
   if (setrlimit(RLIMIT_NOFILE, ) == 0) {
 if (rlim.rlim_cur < (rlim_t)limit) {
   log_warn(LD_CONFIG, "We are limited to %lu file descriptors by "
- "OPEN_MAX, and ConnLimit is %lu.  Changing ConnLimit; sorry.",
-   (unsigned long)OPEN_MAX, (unsigned long)limit);
+   "OPEN_MAX (%lu), and ConnLimit is %lu.  Changing "
+   "ConnLimit; sorry.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)limit);
 } else {
-  log_info(LD_CONFIG, "Dropped connection limit to OPEN_MAX (%lu); "
-   "Apparently, %lu was too high and rlimit lied to us.",
-   (unsigned long)OPEN_MAX, (unsigned long)rlim.rlim_max);
+  log_info(LD_CONFIG, "Dropped connection limit to %lu based on "
+   "OPEN_MAX (%lu); Apparently, %lu was too high and rlimit "
+   "lied to us.",
+   (unsigned long)try_limit, (unsigned long)OPEN_MAX,
+   (unsigned long)rlim.rlim_max);
 }
 bad = 0;
   }



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Taboo the get_options() function while options are validating

2017-09-11 Thread nickm
commit c4cb969a2a90570120f57f72448241af41e21e97
Author: Nick Mathewson 
Date:   Wed Sep 6 16:50:05 2017 -0400

Taboo the get_options() function while options are validating

When option validation or transition is happening, there are no
"current options" -- only "old options" and "maybe new options".
Looking at get_options() is likely a mistake, so have a nonfatal
assertion let us know if we do that.

Closes 22281.
---
 changes/ticket22281 |  3 +++
 src/or/config.c | 32 +++-
 2 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/changes/ticket22281 b/changes/ticket22281
new file mode 100644
index 0..95787580f
--- /dev/null
+++ b/changes/ticket22281
@@ -0,0 +1,3 @@
+  o Minor features (bug detection):
+- Log a warning message, with stack trace, for any attempt to call
+  get_options() during option validation. Closes ticket 22281.
diff --git a/src/or/config.c b/src/or/config.c
index eb89d6f5e..2c507ab9d 100644
--- a/src/or/config.c
+++ b/src/or/config.c
@@ -766,6 +766,9 @@ static int have_parsed_cmdline = 0;
 static char *global_dirfrontpagecontents = NULL;
 /** List of port_cfg_t for all configured ports. */
 static smartlist_t *configured_ports = NULL;
+/** True iff we're currently validating options, and any calls to
+ * get_options() are likely to be bugs. */
+static int in_option_validation = 0;
 
 /** Return the contents of our frontpage string, or NULL if not configured. */
 MOCK_IMPL(const char*,
@@ -779,6 +782,7 @@ MOCK_IMPL(or_options_t *,
 get_options_mutable, (void))
 {
   tor_assert(global_options);
+  tor_assert_nonfatal(! in_option_validation);
   return global_options;
 }
 
@@ -2304,24 +2308,35 @@ options_trial_assign(config_line_t *list, unsigned 
flags, char **msg)
 return r;
   }
 
+  setopt_err_t rv;
+
+  in_option_validation = 1;
+
   if (options_validate(get_options_mutable(), trial_options,
global_default_options, 1, msg) < 0) {
 or_options_free(trial_options);
-return SETOPT_ERR_PARSE; /*XXX make this a separate return value. */
+rv = SETOPT_ERR_PARSE; /*XXX make this a separate return value. */
+goto done;
   }
 
   if (options_transition_allowed(get_options(), trial_options, msg) < 0) {
 or_options_free(trial_options);
-return SETOPT_ERR_TRANSITION;
+rv = SETOPT_ERR_TRANSITION;
+goto done;
   }
+  in_option_validation = 0;
 
   if (set_options(trial_options, msg)<0) {
 or_options_free(trial_options);
-return SETOPT_ERR_SETTING;
+rv = SETOPT_ERR_SETTING;
+goto done;
   }
 
   /* we liked it. put it in place. */
-  return SETOPT_OK;
+  rv = SETOPT_OK;
+ done:
+  in_option_validation = 0;
+  return rv;
 }
 
 /** Print a usage message for tor. */
@@ -2824,8 +2839,11 @@ static int
 options_validate_cb(void *old_options, void *options, void *default_options,
 int from_setconf, char **msg)
 {
-  return options_validate(old_options, options, default_options,
+  in_option_validation = 1;
+  int rv = options_validate(old_options, options, default_options,
   from_setconf, msg);
+  in_option_validation = 0;
+  return rv;
 }
 
 #define REJECT(arg) \
@@ -5200,6 +5218,7 @@ options_init_from_string(const char *cf_defaults, const 
char *cf,
   }
 
   newoptions->IncludeUsed = cf_has_include;
+  in_option_validation = 1;
 
   /* Validate newoptions */
   if (options_validate(oldoptions, newoptions, newdefaultoptions,
@@ -5212,17 +5231,20 @@ options_init_from_string(const char *cf_defaults, const 
char *cf,
 err = SETOPT_ERR_TRANSITION;
 goto err;
   }
+  in_option_validation = 0;
 
   if (set_options(newoptions, msg)) {
 err = SETOPT_ERR_SETTING;
 goto err; /* frees and replaces old options */
   }
+
   or_options_free(global_default_options);
   global_default_options = newdefaultoptions;
 
   return SETOPT_OK;
 
  err:
+  in_option_validation = 0;
   or_options_free(newoptions);
   or_options_free(newdefaultoptions);
   if (*msg) {



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'ticket22281_squashed'

2017-09-11 Thread nickm
commit b9ecb522fce8f54cc03548f6dc9572f3de9d9259
Merge: fca590a63 c4cb969a2
Author: Nick Mathewson 
Date:   Mon Sep 11 16:23:24 2017 -0400

Merge branch 'ticket22281_squashed'

 changes/ticket22281 |  3 +++
 src/or/config.c | 32 +++-
 2 files changed, 30 insertions(+), 5 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] prop224: Log undecodable descriptor when SafeLogging is off

2017-09-11 Thread nickm
commit 00967cd2a87f8ef4c30bfcebd8eae9c9fb2ed251
Author: David Goulet 
Date:   Thu Aug 31 12:33:52 2017 -0400

prop224: Log undecodable descriptor when SafeLogging is off

Closes #23304

Signed-off-by: David Goulet 
---
 src/or/hs_client.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/or/hs_client.c b/src/or/hs_client.c
index 99be058eb..75cc45b3b 100644
--- a/src/or/hs_client.c
+++ b/src/or/hs_client.c
@@ -903,7 +903,10 @@ hs_client_decode_descriptor(const char *desc_str,
   ret = hs_desc_decode_descriptor(desc_str, subcredential, desc);
   memwipe(subcredential, 0, sizeof(subcredential));
   if (ret < 0) {
-log_warn(LD_GENERAL, "Could not parse received descriptor as client");
+log_warn(LD_GENERAL, "Could not parse received descriptor as client.");
+if (get_options()->SafeLogging_ == SAFELOG_SCRUB_NONE) {
+  log_warn(LD_GENERAL, "%s", escaped(desc_str));
+}
 goto err;
   }
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'ticket23304_032_01_squashed'

2017-09-11 Thread nickm
commit fca590a63f8950b910d4f6b3a4ff39a009e9bf32
Merge: 59072d202 00967cd2a
Author: Nick Mathewson 
Date:   Mon Sep 11 16:13:55 2017 -0400

Merge branch 'ticket23304_032_01_squashed'

 src/or/hs_client.c | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-web/master] Update metrics-lib subproject.

2017-09-11 Thread karsten
commit 87a3f8cb8f97ca8d6f5598958e29c1d11e370054
Author: Karsten Loesing 
Date:   Mon Sep 11 21:59:46 2017 +0200

Update metrics-lib subproject.
---
 submods/metrics-lib | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/submods/metrics-lib b/submods/metrics-lib
index f533c3d..13a22d9 16
--- a/submods/metrics-lib
+++ b/submods/metrics-lib
@@ -1 +1 @@
-Subproject commit f533c3d91de39857a0fc0fd5b7cae6239dfeb411
+Subproject commit 13a22d9ebef304a37179f65f0f00e3c71c3e2523



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [metrics-web/master] Update news.json to version 128 of doc/MetricsTimeline.

2017-09-11 Thread karsten
commit 5f4aaf484ec503c8301f5ede0ad7c8412fd1a499
Author: Karsten Loesing 
Date:   Mon Sep 11 22:04:32 2017 +0200

Update news.json to version 128 of doc/MetricsTimeline.
---
 website/src/main/resources/etc/news.json | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/website/src/main/resources/etc/news.json 
b/website/src/main/resources/etc/news.json
index b4ecd1d..bfa3819 100644
--- a/website/src/main/resources/etc/news.json
+++ b/website/src/main/resources/etc/news.json
@@ -1167,9 +1167,10 @@
 "protocols": [
   "obfs4"
 ],
-"description": "A flood of new obfs4 bridges nicknamed \"Machiavelli\".",
+"description": "A flood of over 4,000 obfs4 bridges nicknamed 
\"Machiavelli\".",
 "links": [
   "https://metrics.torproject.org/networksize.html?start=2017-07-01=2017-09-15\;>graph
 of number of bridges",
+  "https://lists.torproject.org/pipermail/tor-relays/2017-September/012925.html\;>tor-relays
 post",
   "https://twitter.com/nusenu_/status/905580044503969792\;>tweet"
 ]
   },

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2017-09-11 Thread translation
commit 9fb150252f0b655fe8429208cc5e07d5940adaac
Author: Translation commit bot 
Date:   Mon Sep 11 19:45:32 2017 +

Update translations for https_everywhere
---
 nl/https-everywhere.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/nl/https-everywhere.dtd b/nl/https-everywhere.dtd
index a06fd62b4..2204d4bb3 100644
--- a/nl/https-everywhere.dtd
+++ b/nl/https-everywhere.dtd
@@ -25,7 +25,7 @@
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] test: Fix memleaks

2017-09-11 Thread nickm
commit 59072d20277fe6250d0e9b6cf90bf41a75ad651c
Author: David Goulet 
Date:   Mon Sep 11 14:39:24 2017 -0400

test: Fix memleaks

Signed-off-by: David Goulet 
---
 src/test/test_hs_common.c | 15 +--
 src/test/test_nodelist.c  |  4 ++--
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/src/test/test_hs_common.c b/src/test/test_hs_common.c
index b0e7f5e1e..da592eb08 100644
--- a/src/test/test_hs_common.c
+++ b/src/test/test_hs_common.c
@@ -1494,9 +1494,6 @@ helper_test_hsdir_sync(networkstatus_t *ns,
*  the client was also picked by service.
*/
 
-  cleanup_nodelist();
-  smartlist_clear(ns->routerstatus_list);
-
   /* 1) Initialize service time: consensus and real time */
   time_t now = helper_set_consensus_and_system_time(ns,
service_between_srv_and_tp);
@@ -1508,6 +1505,8 @@ helper_test_hsdir_sync(networkstatus_t *ns,
 
   /* Now let's upload our desc to all hsdirs */
   upload_descriptor_to_all(service, desc);
+  /* Cleanup right now so we don't memleak on error. */
+  cleanup_nodelist();
   /* Check that previous hsdirs were populated */
   tt_int_op(smartlist_len(desc->previous_hsdirs), OP_EQ, 6);
 
@@ -1515,6 +1514,8 @@ helper_test_hsdir_sync(networkstatus_t *ns,
   now = helper_set_consensus_and_system_time(ns, client_between_srv_and_tp);
 
   cleanup_nodelist();
+  SMARTLIST_FOREACH(ns->routerstatus_list,
+routerstatus_t *, rs, routerstatus_free(rs));
   smartlist_clear(ns->routerstatus_list);
   helper_initialize_big_hash_ring(ns);
 
@@ -1522,6 +1523,8 @@ helper_test_hsdir_sync(networkstatus_t *ns,
   char client_hsdir_b64_digest[BASE64_DIGEST_LEN+1] = {0};
   helper_client_pick_hsdir(>keys.identity_pk,
   client_hsdir_b64_digest);
+  /* Cleanup right now so we don't memleak on error. */
+  cleanup_nodelist();
 
   /* CHECK: Go through the hsdirs chosen by the service and make sure that it
* contains the one picked by the client! */
@@ -1534,6 +1537,9 @@ helper_test_hsdir_sync(networkstatus_t *ns,
* need it for next scenario. */
   hs_service_free_all();
   hs_service_init();
+  SMARTLIST_FOREACH(ns->routerstatus_list,
+routerstatus_t *, rs, routerstatus_free(rs));
+  smartlist_clear(ns->routerstatus_list);
 }
 
 /** This test ensures that client and service will pick the same HSDirs, under
@@ -1643,9 +1649,6 @@ test_client_service_hsdir_set_sync(void *arg)
   helper_test_hsdir_sync(ns, 0, 1, 0);
 
  done:
-  SMARTLIST_FOREACH(ns->routerstatus_list,
-routerstatus_t *, rs, routerstatus_free(rs));
-  smartlist_clear(ns->routerstatus_list);
   networkstatus_vote_free(ns);
   nodelist_free_all();
   hs_free_all();
diff --git a/src/test/test_nodelist.c b/src/test/test_nodelist.c
index db2a8fd02..a873003d7 100644
--- a/src/test/test_nodelist.c
+++ b/src/test/test_nodelist.c
@@ -197,8 +197,8 @@ test_nodelist_ed_id(void *arg)
 tor_free(ri[i]->cache_info.signing_key_cert);
 tor_free(ri[i]);
   }
-  smartlist_free(ns->routerstatus_list);
-  tor_free(ns);
+  smartlist_clear(ns->routerstatus_list);
+  networkstatus_vote_free(ns);
   UNMOCK(networkstatus_get_latest_consensus);
   UNMOCK(networkstatus_get_latest_consensus_by_flavor);
 }

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Merge branch 'maint-0.3.1'

2017-09-11 Thread nickm
commit 52c40330c8ab0c43c5773349d033ff7e49f02f53
Merge: 67a5d4cb6 72ea4a8f0
Author: Nick Mathewson 
Date:   Mon Sep 11 13:49:20 2017 -0400

Merge branch 'maint-0.3.1'

 src/common/timers.c | 26 ++
 src/common/timers.h |  4 
 2 files changed, 22 insertions(+), 8 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/maint-0.3.1] Extract the important parts of the run-pending-timers function.

2017-09-11 Thread nickm
commit 72ea4a8f081318c60c460cef5d9daf55e399c434
Author: Nick Mathewson 
Date:   Mon Sep 11 13:48:39 2017 -0400

Extract the important parts of the run-pending-timers function.

Our unit tests will need this, so that they can simulate advancing
time without getting libevent involved.
---
 src/common/timers.c | 26 ++
 src/common/timers.h |  4 
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/src/common/timers.c b/src/common/timers.c
index 6f4a6c30f..c43c49c08 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -29,6 +29,8 @@
 
 #include "orconfig.h"
 
+#define TOR_TIMERS_PRIVATE
+
 #include "compat.h"
 #include "compat_libevent.h"
 #include "timers.h"
@@ -148,6 +150,21 @@ libevent_timer_reschedule(void)
   event_add(global_timer_event, );
 }
 
+/** Run the callback of every timer that has expired, based on the current
+ * output of monotime_get(). */
+STATIC void
+timers_run_pending(void)
+{
+  monotime_t now;
+  monotime_get();
+  timer_advance_to_cur_time();
+
+  tor_timer_t *t;
+  while ((t = timeouts_get(global_timeouts))) {
+t->callback.cb(t, t->callback.arg, );
+  }
+}
+
 /**
  * Invoked when the libevent timer has expired: see which tor_timer_t events
  * have fired, activate their callbacks, and reschedule the libevent timer.
@@ -159,14 +176,7 @@ libevent_timer_callback(evutil_socket_t fd, short what, 
void *arg)
   (void)what;
   (void)arg;
 
-  monotime_t now;
-  monotime_get();
-  timer_advance_to_cur_time();
-
-  tor_timer_t *t;
-  while ((t = timeouts_get(global_timeouts))) {
-t->callback.cb(t, t->callback.arg, );
-  }
+  timers_run_pending();
 
   libevent_timer_reschedule();
 }
diff --git a/src/common/timers.h b/src/common/timers.h
index e816630e6..d9602cd2a 100644
--- a/src/common/timers.h
+++ b/src/common/timers.h
@@ -22,5 +22,9 @@ void timer_free(tor_timer_t *t);
 void timers_initialize(void);
 void timers_shutdown(void);
 
+#ifdef TOR_TIMERS_PRIVATE
+STATIC void timers_run_pending(void);
+#endif
+
 #endif
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Merge branch 'maint-0.3.1' into release-0.3.1

2017-09-11 Thread nickm
commit 4d4e2fc22489fcbc2427a3275f6b95cfe4e9ccdd
Merge: 6108499c9 72ea4a8f0
Author: Nick Mathewson 
Date:   Mon Sep 11 13:49:12 2017 -0400

Merge branch 'maint-0.3.1' into release-0.3.1

 src/common/timers.c | 26 ++
 src/common/timers.h |  4 
 2 files changed, 22 insertions(+), 8 deletions(-)

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/release-0.3.1] Extract the important parts of the run-pending-timers function.

2017-09-11 Thread nickm
commit 72ea4a8f081318c60c460cef5d9daf55e399c434
Author: Nick Mathewson 
Date:   Mon Sep 11 13:48:39 2017 -0400

Extract the important parts of the run-pending-timers function.

Our unit tests will need this, so that they can simulate advancing
time without getting libevent involved.
---
 src/common/timers.c | 26 ++
 src/common/timers.h |  4 
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/src/common/timers.c b/src/common/timers.c
index 6f4a6c30f..c43c49c08 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -29,6 +29,8 @@
 
 #include "orconfig.h"
 
+#define TOR_TIMERS_PRIVATE
+
 #include "compat.h"
 #include "compat_libevent.h"
 #include "timers.h"
@@ -148,6 +150,21 @@ libevent_timer_reschedule(void)
   event_add(global_timer_event, );
 }
 
+/** Run the callback of every timer that has expired, based on the current
+ * output of monotime_get(). */
+STATIC void
+timers_run_pending(void)
+{
+  monotime_t now;
+  monotime_get();
+  timer_advance_to_cur_time();
+
+  tor_timer_t *t;
+  while ((t = timeouts_get(global_timeouts))) {
+t->callback.cb(t, t->callback.arg, );
+  }
+}
+
 /**
  * Invoked when the libevent timer has expired: see which tor_timer_t events
  * have fired, activate their callbacks, and reschedule the libevent timer.
@@ -159,14 +176,7 @@ libevent_timer_callback(evutil_socket_t fd, short what, 
void *arg)
   (void)what;
   (void)arg;
 
-  monotime_t now;
-  monotime_get();
-  timer_advance_to_cur_time();
-
-  tor_timer_t *t;
-  while ((t = timeouts_get(global_timeouts))) {
-t->callback.cb(t, t->callback.arg, );
-  }
+  timers_run_pending();
 
   libevent_timer_reschedule();
 }
diff --git a/src/common/timers.h b/src/common/timers.h
index e816630e6..d9602cd2a 100644
--- a/src/common/timers.h
+++ b/src/common/timers.h
@@ -22,5 +22,9 @@ void timer_free(tor_timer_t *t);
 void timers_initialize(void);
 void timers_shutdown(void);
 
+#ifdef TOR_TIMERS_PRIVATE
+STATIC void timers_run_pending(void);
+#endif
+
 #endif
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor/master] Extract the important parts of the run-pending-timers function.

2017-09-11 Thread nickm
commit 72ea4a8f081318c60c460cef5d9daf55e399c434
Author: Nick Mathewson 
Date:   Mon Sep 11 13:48:39 2017 -0400

Extract the important parts of the run-pending-timers function.

Our unit tests will need this, so that they can simulate advancing
time without getting libevent involved.
---
 src/common/timers.c | 26 ++
 src/common/timers.h |  4 
 2 files changed, 22 insertions(+), 8 deletions(-)

diff --git a/src/common/timers.c b/src/common/timers.c
index 6f4a6c30f..c43c49c08 100644
--- a/src/common/timers.c
+++ b/src/common/timers.c
@@ -29,6 +29,8 @@
 
 #include "orconfig.h"
 
+#define TOR_TIMERS_PRIVATE
+
 #include "compat.h"
 #include "compat_libevent.h"
 #include "timers.h"
@@ -148,6 +150,21 @@ libevent_timer_reschedule(void)
   event_add(global_timer_event, );
 }
 
+/** Run the callback of every timer that has expired, based on the current
+ * output of monotime_get(). */
+STATIC void
+timers_run_pending(void)
+{
+  monotime_t now;
+  monotime_get();
+  timer_advance_to_cur_time();
+
+  tor_timer_t *t;
+  while ((t = timeouts_get(global_timeouts))) {
+t->callback.cb(t, t->callback.arg, );
+  }
+}
+
 /**
  * Invoked when the libevent timer has expired: see which tor_timer_t events
  * have fired, activate their callbacks, and reschedule the libevent timer.
@@ -159,14 +176,7 @@ libevent_timer_callback(evutil_socket_t fd, short what, 
void *arg)
   (void)what;
   (void)arg;
 
-  monotime_t now;
-  monotime_get();
-  timer_advance_to_cur_time();
-
-  tor_timer_t *t;
-  while ((t = timeouts_get(global_timeouts))) {
-t->callback.cb(t, t->callback.arg, );
-  }
+  timers_run_pending();
 
   libevent_timer_reschedule();
 }
diff --git a/src/common/timers.h b/src/common/timers.h
index e816630e6..d9602cd2a 100644
--- a/src/common/timers.h
+++ b/src/common/timers.h
@@ -22,5 +22,9 @@ void timer_free(tor_timer_t *t);
 void timers_initialize(void);
 void timers_shutdown(void);
 
+#ifdef TOR_TIMERS_PRIVATE
+STATIC void timers_run_pending(void);
+#endif
+
 #endif
 



___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [stem/master] Fix inversion of HAS_ENCODING_ARG

2017-09-11 Thread atagar
commit 6c0d26e93949dce170a97d37d72b064d6e9790cd
Author: Damian Johnson 
Date:   Mon Sep 11 09:57:33 2017 -0700

Fix inversion of HAS_ENCODING_ARG

Oops, fixing HAS_ENCODING_ARG caused another regression where 'two wrongs 
were
making a right'. Caught thanks to our jenkins tests.
---
 stem/manual.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/manual.py b/stem/manual.py
index 2dd55747..df074c1b 100644
--- a/stem/manual.py
+++ b/stem/manual.py
@@ -486,7 +486,7 @@ class Manual(object):
 :raises: **IOError** if unable to retrieve the manual
 """
 
-man_cmd = 'man %s -P cat %s' % ('' if HAS_ENCODING_ARG else 
'--encoding=ascii', man_path)
+man_cmd = 'man %s -P cat %s' % ('--encoding=ascii' if HAS_ENCODING_ARG 
else '', man_path)
 
 try:
   man_output = stem.util.system.call(man_cmd, env = {'MANWIDTH': 
'1000'})

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [stem/master] bsd, mac and slackware don't have --encoding arg, so we should use negation

2017-09-11 Thread atagar
commit b528fe436411ee7b001214fef386dc7a45163197
Author: Edmund Wong 
Date:   Mon Sep 11 11:16:02 2017 +0800

bsd, mac and slackware don't have --encoding arg, so we should use negation
---
 stem/manual.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/stem/manual.py b/stem/manual.py
index e436c866..2dd55747 100644
--- a/stem/manual.py
+++ b/stem/manual.py
@@ -84,7 +84,7 @@ Category = stem.util.enum.Enum('GENERAL', 'CLIENT', 'RELAY', 
'DIRECTORY', 'AUTHO
 GITWEB_MANUAL_URL = 'https://gitweb.torproject.org/tor.git/plain/doc/tor.1.txt'
 CACHE_PATH = os.path.join(os.path.dirname(__file__), 
'cached_tor_manual.sqlite')
 DATABASE = None  # cache database connections
-HAS_ENCODING_ARG = stem.util.system.is_mac() or stem.util.system.is_bsd() or 
stem.util.system.is_slackware()
+HAS_ENCODING_ARG = not stem.util.system.is_mac() and not 
stem.util.system.is_bsd() and not stem.util.system.is_slackware()
 
 SCHEMA_VERSION = 1  # version of our scheme, bump this if you change the 
following
 SCHEMA = (

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [tor-browser-build/master] Bug 23454: restore stderr in build logs

2017-09-11 Thread gk
commit 75af4379125bcf3979f54b5773f1ced1c37eb9c6
Author: Nicolas Vigier 
Date:   Mon Sep 11 14:30:03 2017 +0200

Bug 23454: restore stderr in build logs

In #23425 we redirected the output from runc start to /dev/null to
avoid annoying messages saying "stdin: is not a tty". However this also
removes stderr from build logs.

The command producing the `stdin: is not a tty` message is the `chown -R`
command from runc/remote_put, so we now only hide stderr from that
part while keeping it for the runc command running the build script.
---
 rbm.conf | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/rbm.conf b/rbm.conf
index d574f7a..7bda275 100644
--- a/rbm.conf
+++ b/rbm.conf
@@ -329,7 +329,7 @@ runc:
 cat > '[% c("var/container/dir") %]'/config.json << EOF
 [% INCLUDE 'runc-config.json' %]
 EOF
-sudo runc start -b '[% c("var/container/dir") %]' rbm-[% 
sha256(c("build_id", { error_if_undef => 1 })) %] [% IF ! c("interactive") 
%]2>/dev/null[% END %]
+sudo runc start -b '[% c("var/container/dir") %]' rbm-[% 
sha256(c("build_id", { error_if_undef => 1 })) %] [% IF c("runc_hide_stderr") 
%]2>/dev/null[% END %]
 
   remote_put: |
 #!/bin/sh
@@ -340,7 +340,10 @@ runc:
 -%]
 sudo mkdir -p '[% c("var/container/dir") %]'/rootfs/[% dst %]
 sudo cp -aP [% src %] '[% c("var/container/dir") %]'/rootfs/[% dst %]
-[% c("remote_exec", { exec_as_root => 1, exec_cmd => 'chown -R ' _ 
c("var/container/user") _ ' ' _ dst }) %]
+# On Ubuntu, the /root/.profile file contains a `mesg n` line which is
+# producing some `stdin: is not a tty` messages. To hide them, we hide
+# stderr from this part by setting runc_hide_stderr.
+[% c("remote_exec", { exec_as_root => 1, exec_cmd => 'chown -R ' _ 
c("var/container/user") _ ' ' _ dst, runc_hide_stderr => 1 }) %]
 
   remote_get: |
 #!/bin/sh

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-fingerdtd] Update translations for tor-messenger-fingerdtd

2017-09-11 Thread translation
commit 71cbf1efea78aef5dcc635866245ccc0e54dc774
Author: Translation commit bot 
Date:   Mon Sep 11 12:18:38 2017 +

Update translations for tor-messenger-fingerdtd
---
 my/finger.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my/finger.dtd b/my/finger.dtd
index 535e2726e..14d2077a4 100644
--- a/my/finger.dtd
+++ b/my/finger.dtd
@@ -10,6 +10,6 @@
 
 
 
-
+
 
 
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-perl5lib] Update translations for tails-perl5lib

2017-09-11 Thread translation
commit fe088f904df4f59f78748fd8e48076f236fe0cbd
Author: Translation commit bot 
Date:   Mon Sep 11 12:17:26 2017 +

Update translations for tails-perl5lib
---
 my.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/my.po b/my.po
index fa4109719..a02862da7 100644
--- a/my.po
+++ b/my.po
@@ -7,8 +7,8 @@ msgid ""
 msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
-"POT-Creation-Date: 2016-01-25 16:59+0100\n"
-"PO-Revision-Date: 2016-03-21 16:27+\n"
+"POT-Creation-Date: 2017-05-20 10:59+0200\n"
+"PO-Revision-Date: 2017-09-11 11:48+\n"
 "Last-Translator: carolyn \n"
 "Language-Team: Burmese 
(http://www.transifex.com/otf/torproject/language/my/)\n"
 "MIME-Version: 1.0\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-misc] Update translations for tails-misc

2017-09-11 Thread translation
commit a49e6b22f347a36ddbc9b3bd096c5fa0b318ef8f
Author: Translation commit bot 
Date:   Mon Sep 11 12:16:42 2017 +

Update translations for tails-misc
---
 my.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my.po b/my.po
index d37f42db9..94a375490 100644
--- a/my.po
+++ b/my.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: \n"
 "POT-Creation-Date: 2017-06-05 11:57+0200\n"
-"PO-Revision-Date: 2017-09-08 13:33+\n"
+"PO-Revision-Date: 2017-09-11 11:48+\n"
 "Last-Translator: carolyn \n"
 "Language-Team: Burmese 
(http://www.transifex.com/otf/torproject/language/my/)\n"
 "MIME-Version: 1.0\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-persistence-setup] Update translations for tails-persistence-setup

2017-09-11 Thread translation
commit 5e95a69c868b60f47da5419f63167bb23269e2d8
Author: Translation commit bot 
Date:   Mon Sep 11 12:15:53 2017 +

Update translations for tails-persistence-setup
---
 my/my.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my/my.po b/my/my.po
index 6ed5fc9b4..aefd86e23 100644
--- a/my/my.po
+++ b/my/my.po
@@ -8,7 +8,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
 "POT-Creation-Date: 2017-05-15 13:51+0200\n"
-"PO-Revision-Date: 2017-09-08 14:30+\n"
+"PO-Revision-Date: 2017-09-11 11:48+\n"
 "Last-Translator: carolyn \n"
 "Language-Team: Burmese 
(http://www.transifex.com/otf/torproject/language/my/)\n"
 "MIME-Version: 1.0\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/https_everywhere] Update translations for https_everywhere

2017-09-11 Thread translation
commit 42aba314837487cee7e97d642c430b56ee393ff0
Author: Translation commit bot 
Date:   Mon Sep 11 12:15:33 2017 +

Update translations for https_everywhere
---
 my/ssl-observatory.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my/ssl-observatory.dtd b/my/ssl-observatory.dtd
index 827a4b80c..81587ebe6 100644
--- a/my/ssl-observatory.dtd
+++ b/my/ssl-observatory.dtd
@@ -50,7 +50,7 @@ intrusive corporate network:">
 
 
-
+
 
 ___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-greeter-2] Update translations for tails-greeter-2

2017-09-11 Thread translation
commit 40019cf2cc30e36b4d55369621d427ff3ecc32f3
Author: Translation commit bot 
Date:   Mon Sep 11 11:49:54 2017 +

Update translations for tails-greeter-2
---
 my/my.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my/my.po b/my/my.po
index a61e58b92..22b49d00b 100644
--- a/my/my.po
+++ b/my/my.po
@@ -35,7 +35,7 @@ msgstr ""
 
 #: ../data/greeter.ui.h:4
 msgid "Confirm"
-msgstr ""
+msgstr "အတည်ပြုရန်"
 
 #: ../data/greeter.ui.h:5
 msgid "Confirm your administration password"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-messenger-privdtd] Update translations for tor-messenger-privdtd

2017-09-11 Thread translation
commit 1be4370ed882766ab6d6d1594c32c19585255803
Author: Translation commit bot 
Date:   Mon Sep 11 11:49:30 2017 +

Update translations for tor-messenger-privdtd
---
 my/priv.dtd | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/my/priv.dtd b/my/priv.dtd
new file mode 100644
index 0..4cb4b97eb
--- /dev/null
+++ b/my/priv.dtd
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2017-09-11 Thread translation
commit 97b6a7f8b3e4711986fe4f8620a35de7d3a98e50
Author: Translation commit bot 
Date:   Mon Sep 11 11:46:29 2017 +

Update translations for tor-launcher-properties
---
 my/torlauncher.properties | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/my/torlauncher.properties b/my/torlauncher.properties
index 834a36c8b..eef9cb100 100644
--- a/my/torlauncher.properties
+++ b/my/torlauncher.properties
@@ -34,7 +34,7 @@ torlauncher.connect=ချိတ်ဆက်ရန်
 torlauncher.restart_tor=Restart Tor
 torlauncher.quit=ထွက်ရန်
 torlauncher.quit_win=ထွက်ရန်
-torlauncher.done=Done
+torlauncher.done=ပြီးပါပြီ
 
 torlauncher.forAssistance=For assistance, contact %S
 torlauncher.forAssistance2=For assistance, visit %S

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/bridgedb] Update translations for bridgedb

2017-09-11 Thread translation
commit fb8cee51540e1e43a46a2e5b7b180ed513c5041b
Author: Translation commit bot 
Date:   Mon Sep 11 11:45:06 2017 +

Update translations for bridgedb
---
 bn/LC_MESSAGES/bridgedb.po | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/bn/LC_MESSAGES/bridgedb.po b/bn/LC_MESSAGES/bridgedb.po
index 454c53dac..6a120eb9d 100644
--- a/bn/LC_MESSAGES/bridgedb.po
+++ b/bn/LC_MESSAGES/bridgedb.po
@@ -11,7 +11,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: 
'https://trac.torproject.org/projects/tor/newticket?component=BridgeDB=bridgedb-reported,msgid=isis,sysrqb=isis'\n"
 "POT-Creation-Date: 2015-07-25 03:40+\n"
-"PO-Revision-Date: 2017-04-03 08:52+\n"
+"PO-Revision-Date: 2017-09-11 11:40+\n"
 "Last-Translator: Mahmud Numan \n"
 "Language-Team: Bengali 
(http://www.transifex.com/otf/torproject/language/bn/)\n"
 "MIME-Version: 1.0\n"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties] Update translations for tor-launcher-properties

2017-09-11 Thread translation
commit cfe8a2723e32406eb70a2fd3ef390eedb51622a8
Author: Translation commit bot 
Date:   Mon Sep 11 10:16:39 2017 +

Update translations for tor-launcher-properties
---
 ru/torlauncher.properties | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ru/torlauncher.properties b/ru/torlauncher.properties
index aabbcaf44..442f81b40 100644
--- a/ru/torlauncher.properties
+++ b/ru/torlauncher.properties
@@ -16,10 +16,10 @@ torlauncher.unable_to_start_tor=Невозможно 
запустить Tor.\n\n
 torlauncher.tor_missing=Исполняемый файл Tor 
отсутствует.
 torlauncher.torrc_missing=torrc файл отсутствует и не 
может быть создан.
 torlauncher.datadir_missing=Директория данных Tor не 
существует и не может быть создана.
-torlauncher.password_hash_missing=Не удаётся получить х
эшированный пароль.
+torlauncher.password_hash_missing=Не удается получить х
эшированный пароль.
 
-torlauncher.failed_to_get_settings=Не удаётся загрузить 
настройки Tor.\n\n%S
-torlauncher.failed_to_save_settings=Не удаётся сохранить 
настройки Tor.\n\n%S
+torlauncher.failed_to_get_settings=Не удается загрузить 
настройки Tor.\n\n%S
+torlauncher.failed_to_save_settings=Не удается сохранить 
настройки Tor.\n\n%S
 torlauncher.ensure_tor_is_running=Убедитесь, что Tor 
запущен.
 
 torlauncher.error_proxy_addr_missing=Вы должны указать 
IP-адрес или имя хоста и порт, чтобы 
настроить Tor и использовать прокси для 
доступа в Интернет.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tor-launcher-properties_completed] Update translations for tor-launcher-properties_completed

2017-09-11 Thread translation
commit f4a4949fedbe6d6a36d824912baf879a7cd7b53f
Author: Translation commit bot 
Date:   Mon Sep 11 10:16:44 2017 +

Update translations for tor-launcher-properties_completed
---
 ru/torlauncher.properties | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ru/torlauncher.properties b/ru/torlauncher.properties
index aabbcaf44..442f81b40 100644
--- a/ru/torlauncher.properties
+++ b/ru/torlauncher.properties
@@ -16,10 +16,10 @@ torlauncher.unable_to_start_tor=Невозможно 
запустить Tor.\n\n
 torlauncher.tor_missing=Исполняемый файл Tor 
отсутствует.
 torlauncher.torrc_missing=torrc файл отсутствует и не 
может быть создан.
 torlauncher.datadir_missing=Директория данных Tor не 
существует и не может быть создана.
-torlauncher.password_hash_missing=Не удаётся получить х
эшированный пароль.
+torlauncher.password_hash_missing=Не удается получить х
эшированный пароль.
 
-torlauncher.failed_to_get_settings=Не удаётся загрузить 
настройки Tor.\n\n%S
-torlauncher.failed_to_save_settings=Не удаётся сохранить 
настройки Tor.\n\n%S
+torlauncher.failed_to_get_settings=Не удается загрузить 
настройки Tor.\n\n%S
+torlauncher.failed_to_save_settings=Не удается сохранить 
настройки Tor.\n\n%S
 torlauncher.ensure_tor_is_running=Убедитесь, что Tor 
запущен.
 
 torlauncher.error_proxy_addr_missing=Вы должны указать 
IP-адрес или имя хоста и порт, чтобы 
настроить Tor и использовать прокси для 
доступа в Интернет.

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/torbirdy] Update translations for torbirdy

2017-09-11 Thread translation
commit 03bf07de46cb14b096ad4596db659a611918dc93
Author: Translation commit bot 
Date:   Mon Sep 11 10:16:19 2017 +

Update translations for torbirdy
---
 ru/torbirdy.dtd | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ru/torbirdy.dtd b/ru/torbirdy.dtd
index 9ee15eecf..721d278d7 100644
--- a/ru/torbirdy.dtd
+++ b/ru/torbirdy.dtd
@@ -46,7 +46,7 @@
 
 
 
-
+
 
 
 

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


[tor-commits] [translation/tails-persistence-setup] Update translations for tails-persistence-setup

2017-09-11 Thread translation
commit 73284f49f9fc41b86e450a2421f317620c8d33ee
Author: Translation commit bot 
Date:   Mon Sep 11 10:16:07 2017 +

Update translations for tails-persistence-setup
---
 ru/ru.po | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ru/ru.po b/ru/ru.po
index a54ba3431..8b971a12e 100644
--- a/ru/ru.po
+++ b/ru/ru.po
@@ -21,7 +21,7 @@ msgstr ""
 "Project-Id-Version: The Tor Project\n"
 "Report-Msgid-Bugs-To: Tails developers \n"
 "POT-Creation-Date: 2017-05-15 13:51+0200\n"
-"PO-Revision-Date: 2017-09-11 09:45+\n"
+"PO-Revision-Date: 2017-09-11 09:47+\n"
 "Last-Translator: Andrey\n"
 "Language-Team: Russian 
(http://www.transifex.com/otf/torproject/language/ru/)\n"
 "MIME-Version: 1.0\n"
@@ -232,7 +232,7 @@ msgid ""
 "understood. Tails can't help you if you use it wrong! See Tails"
 " documentation about persistence to learn more."
-msgstr "Внимание! Использование 
постоянного хранилища влечёт за собой 
последствия, которые нужно хорошо 
понимать. Программа Tails не поможет вам, если 
пользоваться ей неправильно! См. 
дополнительную информацию в документации
 Tails по постоянным хранилищам."
+msgstr "Внимание! Использование 
постоянного хранилища влечет за собой 
последствия, которые нужно хорошо 
понимать. Программа Tails не поможет вам, если 
пользоваться ей неправильно! См. 
дополнительную информацию в документации
 Tails по постоянным хранилищам."
 
 #: ../lib/Tails/Persistence/Step/Bootstrap.pm:144
 msgid "Passphrase:"

___
tor-commits mailing list
tor-commits@lists.torproject.org
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits


  1   2   >