[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[or-cvs] make the default default options.FirewallPorts be the default



Update of /home/or/cvsroot/src/or
In directory moria.mit.edu:/home2/arma/work/onion/cvs/src/or

Modified Files:
	circuitbuild.c config.c directory.c hibernate.c or.h 
	routerlist.c 
Log Message:
make the default default options.FirewallPorts be the default


Index: circuitbuild.c
===================================================================
RCS file: /home/or/cvsroot/src/or/circuitbuild.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -u -d -r1.49 -r1.50
--- circuitbuild.c	4 Nov 2004 10:23:29 -0000	1.49
+++ circuitbuild.c	4 Nov 2004 23:39:57 -0000	1.50
@@ -1144,8 +1144,7 @@
     for(i=0; i < smartlist_len(rl->routers); i++) {
       r = smartlist_get(rl->routers, i);
       tor_snprintf(buf, sizeof(buf), "%d", r->or_port);
-      if (!smartlist_string_isin(options.FirewallPorts ?
-          options.FirewallPorts : config_get_default_firewallports(), buf))
+      if (!smartlist_string_isin(options.FirewallPorts, buf))
          smartlist_add(excluded, r);
     }
   }

Index: config.c
===================================================================
RCS file: /home/or/cvsroot/src/or/config.c,v
retrieving revision 1.205
retrieving revision 1.206
diff -u -d -r1.205 -r1.206
--- config.c	4 Nov 2004 22:31:50 -0000	1.205
+++ config.c	4 Nov 2004 23:39:57 -0000	1.206
@@ -105,7 +105,7 @@
   VAR("ExitPolicy",          LINELIST, ExitPolicy,           NULL),
   VAR("ExcludeNodes",        STRING,   ExcludeNodes,         NULL),
   VAR("FascistFirewall",     BOOL,     FascistFirewall,      "0"),
-  VAR("FirewallPorts",       CSV,      FirewallPorts,        NULL),
+  VAR("FirewallPorts",       CSV,      FirewallPorts,        "80,443"),
   VAR("MyFamily",            STRING,   MyFamily,             NULL),
   VAR("NodeFamily",          LINELIST, NodeFamilies,         NULL),
   VAR("Group",               STRING,   Group,                NULL),
@@ -831,17 +831,6 @@
   return r;
 }
 
-smartlist_t *config_get_default_firewallports(void) {
-  static smartlist_t *answer;
-
-  if(!answer) {
-    answer = smartlist_create();
-    smartlist_add(answer, tor_strdup("80"));
-    smartlist_add(answer, tor_strdup("443"));
-  }
-  return answer;
-}
-
 static int
 validate_options(or_options_t *options)
 {

Index: directory.c
===================================================================
RCS file: /home/or/cvsroot/src/or/directory.c,v
retrieving revision 1.158
retrieving revision 1.159
diff -u -d -r1.158 -r1.159
--- directory.c	4 Nov 2004 10:23:29 -0000	1.158
+++ directory.c	4 Nov 2004 23:39:57 -0000	1.159
@@ -132,8 +132,7 @@
       if (options.FascistFirewall && purpose == DIR_PURPOSE_UPLOAD_DIR &&
           !options.HttpProxy) {
         tor_snprintf(buf,sizeof(buf),"%d",ds->dir_port);
-        if (!smartlist_string_isin(options.FirewallPorts ?
-            options.FirewallPorts : config_get_default_firewallports(), buf))
+        if (!smartlist_string_isin(options.FirewallPorts, buf))
           continue;
       }
       directory_initiate_command_trusted_dir(ds, purpose, payload, payload_len);

Index: hibernate.c
===================================================================
RCS file: /home/or/cvsroot/src/or/hibernate.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- hibernate.c	4 Nov 2004 22:33:06 -0000	1.3
+++ hibernate.c	4 Nov 2004 23:39:57 -0000	1.4
@@ -5,7 +5,9 @@
 /**
  * \file hibernate.c
  * \brief Functions to close listeners, stop allowing new circuits,
- * etc in preparation for closing down or going dormant.
+ * etc in preparation for closing down or going dormant; and to track
+ * bandwidth and time intervals to know when to hibernate and when to
+ * stop hibernating.
  **/
 
 /*

Index: or.h
===================================================================
RCS file: /home/or/cvsroot/src/or/or.h,v
retrieving revision 1.461
retrieving revision 1.462
diff -u -d -r1.461 -r1.462
--- or.h	4 Nov 2004 22:33:06 -0000	1.461
+++ or.h	4 Nov 2004 23:39:57 -0000	1.462
@@ -1088,7 +1088,6 @@
 
 int config_assign_default_dirservers(void);
 int resolve_my_address(const char *address, uint32_t *addr);
-smartlist_t *config_get_default_firewallports(void);
 int getconfig(int argc, char **argv, or_options_t *options);
 int config_init_logs(or_options_t *options);
 void config_parse_exit_policy(struct config_line_t *cfg,

Index: routerlist.c
===================================================================
RCS file: /home/or/cvsroot/src/or/routerlist.c,v
retrieving revision 1.175
retrieving revision 1.176
diff -u -d -r1.175 -r1.176
--- routerlist.c	4 Nov 2004 10:23:30 -0000	1.175
+++ routerlist.c	4 Nov 2004 23:39:57 -0000	1.176
@@ -178,8 +178,7 @@
       continue;
     if(fascistfirewall) {
       tor_snprintf(buf,sizeof(buf),"%d",router->dir_port);
-      if (!smartlist_string_isin(options.FirewallPorts ?
-          options.FirewallPorts : config_get_default_firewallports(), buf))
+      if (!smartlist_string_isin(options.FirewallPorts, buf))
         continue;
     }
     smartlist_add(sl, router);
@@ -214,8 +213,7 @@
         continue;
       if (fascistfirewall) {
         tor_snprintf(buf,sizeof(buf),"%d",d->dir_port);
-        if (!smartlist_string_isin(options.FirewallPorts ?
-            options.FirewallPorts : config_get_default_firewallports(), buf))
+        if (!smartlist_string_isin(options.FirewallPorts, buf))
           continue;
       }
       smartlist_add(sl, d);