Article delegate-en/4343 of [1-5113] on the server localhost:119
  upper oldest olders older1 this newer1 newers latest
search
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
[Reference:]  
Re: Few questions about transparent proxy & srcif
Sun, 11 Jan 2009     Master NoSFeRaTU

2009/1/10 Master NoSFeRaTU :
> 2009/1/8 Yutaka Sato :
>> In message  on 01/09/09(02:11:58) I wrote:
> PS. Seems you miss my second question about SRCIF and disabling
> default gateway routing (Q2 in first mail).
I added what I want with patch like this:

diff -ur delegate9.9.0.orig/src/inets.c delegate9.9.0/src/inets.c
--- delegate9.9.0.orig/src/inets.c      2008-11-12 01:57:27.000000000 +0300
+++ delegate9.9.0/src/inets.c   2009-01-10 22:50:19.000000000 +0300
@@ -2187,11 +2187,14 @@

        gethostName(sock,AVStr(sockname),"%A:%P");
        sv1log("[%d] source port = %s:%d = %s\n",sock,SRCHOST,SRCPORT,sockname);
-       /*
-       int on = 1;
-       rcode = SETsockopt(sock, SOL_SOCKET, SO_DONTROUTE, &on, sizeof(on));
-       Verbose("#### [%s] dontroute = %d\n",sockname,rcode);
-       */
+
+       if (strcmp(sockname,"0.0.0.0:0") == 0)
+       {
+               int on = 1;
+               int rcode;
+               rcode = SETsockopt(sock, SOL_SOCKET, SO_DONTROUTE,
&on, sizeof(on));
+               sv1log("#### [%s] dontroute = %d\n",sockname,rcode);
+       }
 }
 double SVHELLO_TIMEOUT;
  search upper oldest olders older1 this newer1 newers latest
[Top/Up] [oldest] - [Older+chunk] - [Newer+chunk] - [newest + Check]
@_@V