[zorp-hu] eredeti port (DirectedRouter)

Balazs Scheidler bazsi@balabit.hu
Wed, 21 Aug 2002 15:54:19 +0200


hali,

ez a patch lehetove teszi azt, hogy 0-t adjunk meg celportkent, es az az
eredeti celt fogja jelenteni. valoszinuleg a kovetkezo zorp release-ben benne lesz.

diff -u -r1.5.2.4 Router.py
--- pylib/Zorp/Router.py	25 Jun 2002 14:14:18 -0000	1.5.2.4
+++ pylib/Zorp/Router.py	21 Aug 2002 13:51:09 -0000
@@ -84,9 +84,11 @@
 		  
 		  session -- session we belong to
 		"""
-		session.setServer(SockAddrInet(session.client_dest.ip_s, session.client_dest.port))
 		if self.forced_port:
-			session.server_address.port = self.forced_port
+			addr = SockAddrInet(session.client_dest.ip_s, self.forced_port)
+		else:
+			addr = SockAddrInet(session.client_dest.ip_s, session.client_dest.port)
+		session.setServer(addr)
 		session.server_address_inband = self.overrideable
 
 class DirectedRouter:


-- 
Bazsi
PGP info: KeyID 9AF8D0A9 Fingerprint CD27 CFB0 802C 0944 9CFD 804E C82C 8EB1