Ticket #9390: 0014-Bug-9390-Check-for-public-relay-added.patch

File 0014-Bug-9390-Check-for-public-relay-added.patch, 859 bytes (added by aruna1234, 15 months ago)
  • src/common/compat.c

    From 39b65688d1cb982b7acc48256241e84716518c55 Mon Sep 17 00:00:00 2001
    From: ArunaMaurya221B <aruna.maurya12@gmail.com>
    Date: Sat, 23 Dec 2017 17:01:39 +0530
    Subject: [PATCH 14/14] Bug-9390 Check for public relay added
    
    ---
     src/common/compat.c | 8 +++++++-
     1 file changed, 7 insertions(+), 1 deletion(-)
    
    diff --git a/src/common/compat.c b/src/common/compat.c
    index 8194e7f..cb38df3 100644
    a b set_max_file_descriptors(rlim_t limit, int *max_out) 
    17791779    limit = INT_MAX;
    17801780  tor_assert(max_out);
    17811781  *max_out = max_sockets = (int)limit - ULIMIT_BUFFER;
    1782    
     1782   if(public_server_mode(get_options())){
     1783      if(limit < 8192){
     1784        log_warn(LD_CONFIG,
     1785               "Public Relay having too-low file descriptor limit");
     1786        return -1;
     1787      }
     1788    }
    17831789  return 0;
    17841790}
    17851791