Hi, In message <_A2561@delegate-en.ML_> on 03/07/04(12:25:18) you Gong Su <p7qeqbdyi-mxhgu4z6q73w.ml@delegate.org> wrote: |> If you need port mapping to relay multiple ports in a single DeleGate |> server, it seems to need to be fixed as enclosed patch. | |Hi Yutaka, thank you very much! Using the udprelay I got around |460 transactions per second which is on par with other proxies! |I used two separate delegate daemons for mapping two ports to |(also the same) _two_ ports on the server; since udprelay didn't |seem to understand the "-" port: | |-P1234/tcp,1235/tcp SERVER=udprelay://host:- CONNECT=tcp | |and the patch you gave me seems to map two ports to _one_ port |on the server? I see, the previous patch did not care the port mapping -N where N==0. I'll fix it as the enclosed patch. Cheers, Yutaka -- D G Yutaka Sato <pfqcabdyi-mxhgu4z6q73w.ml@delegate.org> http://delegate.org/y.sato/ ( - ) National Institute of Advanced Industrial Science and Technology _< >_ 1-1-4 Umezono, Tsukuba, Ibaraki, 305-8568 Japan Do the more with the less -- B. Fuller diff -cr dist/delegate8.9.2/src/service.c ./src/service.c *** dist/delegate8.9.2/src/service.c Wed Jan 14 17:49:10 2004 --- ./src/service.c Sun Mar 7 13:12:07 2004 *************** *** 797,802 **** --- 797,806 ---- Conn->sv_portmap = atoi(portspec); break; } + if( Conn->sv_portmap == 0 ) + if( portspec[0] == '-' || portspec[0] == '+' ) + Conn->sv_portmap |= 0x40000000; + if( portspec[0] == '+' ) port = atoi(portspec+1); else port = atoi(portspec); diff -cr dist/delegate8.9.2/src/udprelay.c ./src/udprelay.c *** dist/delegate8.9.2/src/udprelay.c Mon Oct 13 16:17:51 2003 --- ./src/udprelay.c Sun Mar 7 13:47:10 2004 *************** *** 307,312 **** --- 307,313 ---- /* get port numbers of incoming ports ... */ for( csi = 0; csi < csc; csi++ ){ portnumv[csi] = sockPort(csv[csi]) + svportmap; + portnumv[csi] &= ~0x40000000; } } *************** *** 376,381 **** --- 377,385 ---- if( clsk <= 0 || iport <= 0 ){ sv1log("UDPRELAY: accept() errno=%d\n",errno); continue; + } + if( svportmap ){ + svport = portnumv[sx]; } ua = newUA(Conn,uassocv,ihost,iport,svhost,svport); ua->ua_clsock = clsk;