[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[minion-cvs] Support listening on an address other than the publishe...



Update of /home/minion/cvsroot/src/minion/lib/mixminion/server
In directory moria.mit.edu:/tmp/cvs-serv12357/lib/mixminion/server

Modified Files:
	MMTPServer.py ServerConfig.py 
Log Message:
Support listening on an address other than the published address

Index: MMTPServer.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/MMTPServer.py,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- MMTPServer.py	5 Jan 2003 13:19:54 -0000	1.9
+++ MMTPServer.py	6 Jan 2003 12:57:48 -0000	1.10
@@ -735,8 +735,18 @@
         self.context = tls
         # FFFF Don't always listen; don't always retransmit!
         # FFFF Support listening on specific IPs
-        self.listener = ListenConnection(config['Incoming/MMTP']['IP'],
-                                         config['Incoming/MMTP']['Port'],
+
+        if config['Incoming/MMTP'].get('ListenIP',None) is not None:
+            IP = config['Incoming/MMTP']['ListenIP']
+        else:
+            IP = config['Incoming/MMTP']['IP']
+
+        if config['Incoming/MMTP'].get('ListenPort',None) is not None:
+            port = config['Incoming/MMTP']['ListenPort']
+        else:
+            port = config['Incoming/MMTP']['Port']
+            
+        self.listener = ListenConnection(IP, port,
                                          LISTEN_BACKLOG,
                                          self._newMMTPConnection)
         #self.config = config

Index: ServerConfig.py
===================================================================
RCS file: /home/minion/cvsroot/src/minion/lib/mixminion/server/ServerConfig.py,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- ServerConfig.py	6 Jan 2003 05:40:46 -0000	1.13
+++ ServerConfig.py	6 Jan 2003 12:57:48 -0000	1.14
@@ -185,8 +185,10 @@
         # FFFF Generic multi-port listen/publish options.
         'Incoming/MMTP' : { 'Enabled' : ('REQUIRE', C._parseBoolean, "no"),
                             'IP' : ('ALLOW', C._parseIP, "0.0.0.0"),
-                            'Port' : ('ALLOW', C._parseInt, "48099"),
-			  'Allow' : ('ALLOW*', C._parseAddressSet_allow, None),
+                          'Port' : ('ALLOW', C._parseInt, "48099"),
+                          'ListenIP' : ('ALLOW', C._parseIP, None),
+                          'ListenPort' : ('ALLOW', C._parseInt, None),
+  		          'Allow' : ('ALLOW*', C._parseAddressSet_allow, None),
                           'Deny' : ('ALLOW*', C._parseAddressSet_deny, None)
 			 },
         'Outgoing/MMTP' : { 'Enabled' : ('REQUIRE', C._parseBoolean, "no"),