Date: Sat, 11 Aug 2007 19:18:56 +0600 From: SeaD <sead@mail.ru> To: "=?koi8-r?Q?freebsd-gnats-submit=40freebsd.org?=" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/115420: port update: net/bounce . timer made optional Message-ID: <E1IJqro-0009IJ-00.sead-mail-ru@f66.mail.ru> Resent-Message-ID: <200708111340.l7BDeAJu002497@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 115420 >Category: ports >Synopsis: port update: net/bounce . timer made optional >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Sat Aug 11 13:40:09 GMT 2007 >Closed-Date: >Last-Modified: >Originator: SeaD >Release: FreeBSD 6.2-RELEASE-p3 i386 >Organization: >Environment: System: FreeBSD deep.freeznet 4.11-RELEASE-p18-pp FreeBSD 4.11-RELEASE-p18-pp #1: Sun Jan 2 05:10:54 YEKT 2000 sead@deep.freeznet:/usr/local/src/obj/usr/local/src/system/sys/KDEEP i386 >Description: Small port update. >How-To-Repeat: >Fix: diff -ruN bounce.old/Makefile bounce/Makefile --- bounce.old/Makefile Fri Mar 9 10:58:16 2007 +++ bounce/Makefile Sat Aug 11 19:04:10 2007 @@ -8,7 +8,7 @@ PORTNAME= bounce PORTVERSION= 1.0 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net security MASTER_SITES= http://www.iagora.com/~espel/ \ ${MASTER_SITE_LOCAL} diff -ruN bounce.old/files/patch-02 bounce/files/patch-02 --- bounce.old/files/patch-02 Tue Oct 3 16:43:35 2006 +++ bounce/files/patch-02 Sat Aug 11 16:33:16 2007 @@ -1,6 +1,30 @@ ---- bounce.c.orig Fri Jun 2 12:58:37 2006 -+++ bounce.c Fri Jun 2 13:25:28 2006 -@@ -138,7 +138,7 @@ +--- bounce.c.orig Sat Aug 11 15:46:54 2007 ++++ bounce.c Sat Aug 11 15:59:20 2007 +@@ -31,6 +31,7 @@ + #define DEFAULT_PORT 1523 + + char sbuf[16384], cbuf[16384]; ++int t=0; + + void sigchld() { + signal(SIGCHLD, sigchld); +@@ -46,12 +47,14 @@ + + struct itimerval itime; + ++ if (t) { + itime.it_interval.tv_sec=0; + itime.it_interval.tv_usec=0; +- itime.it_value.tv_sec=21600; ++ itime.it_value.tv_sec=t; + itime.it_value.tv_usec=0; + setitimer(ITIMER_REAL,&itime,NULL); + /* arbitrary connection time limit: 6 hours (in case the client hangs) */ ++ } + + chead=ctail=cbuf; + cpos=0; +@@ -138,7 +141,7 @@ } int main(int argc,char *argv[]) { @@ -9,27 +33,40 @@ int myport=DEFAULT_PORT, remoteport; struct sockaddr_in rem_addr, srv_addr, cl_addr; char *myname; -@@ -153,8 +153,9 @@ +@@ -153,8 +156,9 @@ /* Process arguments */ - while( (ch = getopt(argc, argv, "p:a:")) != -1 ) { -+ while( (ch = getopt(argc, argv, "p:a:b:")) != -1 ) { ++ while( (ch = getopt(argc, argv, "p:a:b:t:")) != -1 ) { switch(ch) { + case 'b': b = 1; case 'a': hostname = malloc( strlen(optarg) + 1); if( !hostname ) { -@@ -177,7 +178,7 @@ +@@ -170,6 +174,12 @@ + exit(-1); + } + break; ++ case 't': ++ if ((t=atoi(optarg))==0) { ++ fprintf(stderr,"Bad timer.\n"); ++ exit(-1); ++ } ++ break; + } + } + +@@ -177,7 +187,7 @@ argv += optind; if (argc!=2) { - fprintf(stderr,"Use: %s [-a localaddr] [-p localport] machine port \n",m yname); -+ fprintf(stderr,"Use: %s [-a localaddr | -b localaddr] [-p localport] machine port \n",myname); ++ fprintf(stderr,"Use: %s [-a localaddr | -b localaddr] [-p localport] [-t timer] addr port \n",myname); exit(-1); } if ((remoteport=atoi(argv[1]))<=0) { -@@ -220,6 +221,7 @@ +@@ -220,6 +230,7 @@ exit(-1); } listen(srv_fd,QLEN); @@ -37,7 +74,7 @@ signal(SIGCHLD, sigchld); printf("Ready to bounce connections from port %i to %s on port %i\n", -@@ -254,6 +256,12 @@ +@@ -254,6 +265,12 @@ if ((cl_fd=socket(PF_INET, SOCK_STREAM, 0))<0) { close(rem_fd); exit(-1); >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1IJqro-0009IJ-00.sead-mail-ru>