aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-25 19:39:55 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-02-25 19:39:55 +0000
commita0b5db928fa1e0a6653d97569ee0485093ac6d72 (patch)
tree1d5795e2106299c0e261984eb5ccbf72c27826ed /src
parent784bd1c3e3a30d6b89b832af2861b0efb11f2245 (diff)
downloadrspamd-a0b5db928fa1e0a6653d97569ee0485093ac6d72.tar.gz
rspamd-a0b5db928fa1e0a6653d97569ee0485093ac6d72.zip
[Fix] Do not trust stat(2) it lies
Issue: #3254
Diffstat (limited to 'src')
-rw-r--r--src/libutil/addr.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/libutil/addr.c b/src/libutil/addr.c
index 4a540fefc..1beeb421e 100644
--- a/src/libutil/addr.c
+++ b/src/libutil/addr.c
@@ -162,13 +162,7 @@ rspamd_ip_check_ipv6 (void)
if (stat ("/proc/net/dev", &st) != -1) {
if (stat ("/proc/net/if_inet6", &st) != -1) {
- if (st.st_size != 0) {
- ipv6_status = RSPAMD_IPV6_SUPPORTED;
- }
- else {
- /* Empty file, no ipv6 configuration at all */
- ipv6_status = RSPAMD_IPV6_UNSUPPORTED;
- }
+ ipv6_status = RSPAMD_IPV6_SUPPORTED;
}
else {
ipv6_status = RSPAMD_IPV6_UNSUPPORTED;