summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changes/bug40256_0453
-rw-r--r--changes/bug403155
-rw-r--r--doc/man/tor.1.txt5
-rw-r--r--src/lib/meminfo/.may_include1
-rw-r--r--src/lib/meminfo/meminfo.c3
5 files changed, 14 insertions, 3 deletions
diff --git a/changes/bug40256_045 b/changes/bug40256_045
new file mode 100644
index 0000000000..14e67659e0
--- /dev/null
+++ b/changes/bug40256_045
@@ -0,0 +1,3 @@
+ o Minor bugfixes (documentation):
+ - Fix a formatting error on the documentation for
+ VirtualAddrNetworkIPv6. Fixes bug 40256; bugfix on 0.2.9.4-alpha.
diff --git a/changes/bug40315 b/changes/bug40315
new file mode 100644
index 0000000000..9e9c740d96
--- /dev/null
+++ b/changes/bug40315
@@ -0,0 +1,5 @@
+ o Minor bugfixes (Linux, relay):
+ - Fix a bug in determining total available system memory that would have
+ been triggered if the format of /proc/meminfo had ever changed
+ to include "MemTotal:" in the middle of a line. Fixes bug 40315;
+ bugfix on 0.2.5.4-alpha.
diff --git a/doc/man/tor.1.txt b/doc/man/tor.1.txt
index 58774e555f..b57c6ec70a 100644
--- a/doc/man/tor.1.txt
+++ b/doc/man/tor.1.txt
@@ -1797,8 +1797,9 @@ The following options are useful only for clients (that is, if
The default **VirtualAddrNetwork** address ranges on a
properly configured machine will route to the loopback or link-local
interface. The maximum number of bits for the network prefix is set to 104
- for IPv6 and 16 for IPv4. However, a wider network - smaller prefix length
- - is preferable since it reduces the chances for an attacker to guess the
+ for IPv6 and 16 for IPv4. However, a larger network
+ (that is, one with a smaller prefix length)
+ is preferable, since it reduces the chances for an attacker to guess the
used IP. For local use, no change to the default VirtualAddrNetwork setting
is needed.
diff --git a/src/lib/meminfo/.may_include b/src/lib/meminfo/.may_include
index 9e4d25fd6a..12fe36d134 100644
--- a/src/lib/meminfo/.may_include
+++ b/src/lib/meminfo/.may_include
@@ -5,4 +5,5 @@ lib/fs/*.h
lib/log/*.h
lib/malloc/*.h
lib/meminfo/*.h
+lib/string/*.h
lib/testsupport/*.h
diff --git a/src/lib/meminfo/meminfo.c b/src/lib/meminfo/meminfo.c
index b7d991e410..77da579f99 100644
--- a/src/lib/meminfo/meminfo.c
+++ b/src/lib/meminfo/meminfo.c
@@ -17,6 +17,7 @@
#include "lib/fs/files.h"
#include "lib/log/log.h"
#include "lib/malloc/malloc.h"
+#include "lib/string/util_string.h"
#ifdef HAVE_FCNTL_H
#include <fcntl.h>
@@ -65,7 +66,7 @@ get_total_system_memory_impl(void)
s = read_file_to_str_until_eof(fd, 65536, &file_size);
if (!s)
goto err;
- cp = strstr(s, "MemTotal:");
+ cp = find_str_at_start_of_line(s, "MemTotal:");
if (!cp)
goto err;
/* Use the system sscanf so that space will match a wider number of space */