Small port update.
State Changed From-To: open->feedback Could you please provide the update in the form of a unified diff as described in the Porters Handbook?
>Submitter-Id: current-users >Originator: SeaD >Organization: >Confidential: no >Synopsis: port update: net/bounce . bind outgoing connection >Severity: non-critical >Priority: low >Category: ports >Class: update >Release: FreeBSD 6.0-RELEASE-p3 i386 >Environment: System: FreeBSD newcom.perm.ws 6.0-RELEASE-p3 FreeBSD 6.0-RELEASE-p3 #2: Mon Feb 27 19:34:42 YEKT 2006 sead@newcom.perm.ws:/usr/obj/usr/src/sys/KNEWCOM i386 >Description: Small port update. Added file: bounce/files/patch-02 >How-To-Repeat: >Fix: diff -ruN bounce.old/files/patch-02 bounce/files/patch-02 --- bounce.old/files/patch-02 Thu Jan 1 03:00:00 1970 +++ bounce/files/patch-02 Fri Apr 28 14:48:27 2006 @@ -0,0 +1,21 @@ +--- bounce.c.orig Wed Mar 15 13:21:58 2006 ++++ bounce.c Fri Mar 31 17:58:08 2006 +@@ -220,6 +220,7 @@ + exit(-1); + } + listen(srv_fd,QLEN); ++ srv_addr.sin_port=0; + + signal(SIGCHLD, sigchld); + printf("Ready to bounce connections from port %i to %s on port %i\n", +@@ -252,6 +253,10 @@ + default: /* parent process */ + close(srv_fd); /* close original socket */ + if ((cl_fd=socket(PF_INET, SOCK_STREAM, 0))<0) { ++ close(rem_fd); ++ exit(-1); ++ } ++ if (bind(cl_fd,(struct sockaddr *)&srv_addr,sizeof(srv_addr))<0) { + close(rem_fd); + exit(-1); + }
State Changed From-To: feedback->open Feedback recvd
State Changed From-To: open->feedback Can you briefly describe, what this new patch file is changing?
Responsible Changed From-To: freebsd-ports-bugs->pav Track
Its just simple bind() for outgoing connection. Nothing more. Previous patch from scot@poptart.org added -a option for listen on single local address and my patch adds bind() to outgoing redirected connection too. So you can make redirect from one specified address. -- SeaD <sead@deep.perm.ru> fp: DC8C 6973 59DE 5580 FDF6 3153 005C 0156
State Changed From-To: feedback->closed Committed, thanks!
>Submitter-Id: current-users >Originator: SeaD >Organization: >Confidential: no >Synopsis: port update: net/bounce . bind outgoing connection/update >Severity: non-critical >Priority: low >Category: ports >Class: update >Release: FreeBSD 6.0-RELEASE-p3 i386 >Environment: System: FreeBSD newcom.perm.ws 6.0-RELEASE-p3 FreeBSD 6.0-RELEASE-p3 #2: Mon Feb 27 19:34:42 YEKT 2006 sead@newcom.perm.ws:/usr/obj/usr/src/sys/KNEWCOM i386 >Description: Update for update. Added new option -b for outgoing binding. -a option works as before my patch. Suggested by Alexander Logvinov >How-To-Repeat: >Fix: diff -ruN bounce.orig/Makefile bounce/Makefile --- bounce.orig/Makefile Fri Jun 2 13:51:12 2006 +++ bounce/Makefile Fri Jun 2 14:08:05 2006 @@ -8,7 +8,7 @@ PORTNAME= bounce PORTVERSION= 1.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= net security MASTER_SITES= http://www.iagora.com/~espel/ \ ${MASTER_SITE_LOCAL} diff -ruN bounce.orig/files/patch-02 bounce/files/patch-02 --- bounce.orig/files/patch-02 Tue May 2 14:31:07 2006 +++ bounce/files/patch-02 Fri Jun 2 13:25:36 2006 @@ -1,6 +1,35 @@ ---- bounce.c.orig Tue May 2 10:14:42 2006 -+++ bounce.c Tue May 2 10:16:02 2006 -@@ -220,6 +220,7 @@ +--- bounce.c.orig Fri Jun 2 12:58:37 2006 ++++ bounce.c Fri Jun 2 13:25:28 2006 +@@ -138,7 +138,7 @@ + } + + int main(int argc,char *argv[]) { +- int srv_fd, rem_fd, len, cl_fd, on=1; ++ int srv_fd, rem_fd, len, cl_fd, on=1, b=0; + int myport=DEFAULT_PORT, remoteport; + struct sockaddr_in rem_addr, srv_addr, cl_addr; + char *myname; +@@ -153,8 +153,9 @@ + + /* Process arguments */ + +- while( (ch = getopt(argc, argv, "p:a:")) != -1 ) { ++ while( (ch = getopt(argc, argv, "p:a:b:")) != -1 ) { + switch(ch) { ++ case 'b': b = 1; + case 'a': + hostname = malloc( strlen(optarg) + 1); + if( !hostname ) { +@@ -177,7 +178,7 @@ + argv += optind; + + if (argc!=2) { +- fprintf(stderr,"Use: %s [-a localaddr] [-p localport] machine port \n",myname); ++ fprintf(stderr,"Use: %s [-a localaddr | -b localaddr] [-p localport] machine port \n",myname); + exit(-1); + } + if ((remoteport=atoi(argv[1]))<=0) { +@@ -220,6 +221,7 @@ exit(-1); } listen(srv_fd,QLEN); @@ -8,14 +37,16 @@ signal(SIGCHLD, sigchld); printf("Ready to bounce connections from port %i to %s on port %i\n", -@@ -252,6 +253,10 @@ - default: /* parent process */ - close(srv_fd); /* close original socket */ +@@ -254,6 +256,12 @@ if ((cl_fd=socket(PF_INET, SOCK_STREAM, 0))<0) { + close(rem_fd); + exit(-1); ++ } ++ if (b) { ++ if (bind(cl_fd,(struct sockaddr *)&srv_addr,sizeof(srv_addr))<0) { + close(rem_fd); + exit(-1); + } -+ if (bind(cl_fd,(struct sockaddr *)&srv_addr,sizeof(srv_addr))<0) { - close(rem_fd); - exit(-1); } + if (connect(cl_fd, (struct sockaddr *)&cl_addr, + sizeof(cl_addr))<0) {
State Changed From-To: closed->open Reopen
Dear maintainer of FreeBSD port net/bounce, please take a look at http://www.freebsd.org/cgi/query-pr.cgi?q=96263 on the followup sent on Friday, June the 2nd. Do you approve this update? -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Cats happen.
State Changed From-To: open->feedback Asked maintainer for approval
Yes, looks good to me.. Thanks matt -----Original Message----- From: Pav Lucistnik [mailto:pav@FreeBSD.org] Sent: Sunday, June 04, 2006 7:55 AM To: bug-followup@FreeBSD.org; matt@efs.org Subject: Re: ports/96263: port update: net/bounce . bind outgoing connection Dear maintainer of FreeBSD port net/bounce, please take a look at http://www.freebsd.org/cgi/query-pr.cgi?q=96263 on the followup sent on Friday, June the 2nd. Do you approve this update? -- Pav Lucistnik <pav@oook.cz> <pav@FreeBSD.org> Cats happen.
State Changed From-To: feedback->open Approved
State Changed From-To: open->feedback Does not patch; can you resend?