From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Jun 10 03:30:52 2004 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2F4B416A4D1 for ; Thu, 10 Jun 2004 03:30:52 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1F33A43D2D for ; Thu, 10 Jun 2004 03:30:52 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i5A3URrT095453 for ; Thu, 10 Jun 2004 03:30:27 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i5A3URSu095452; Thu, 10 Jun 2004 03:30:27 GMT (envelope-from gnats) Resent-Date: Thu, 10 Jun 2004 03:30:27 GMT Resent-Message-Id: <200406100330.i5A3URSu095452@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Kensaku MASUDA Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5212316A4CE for ; Thu, 10 Jun 2004 03:27:50 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0BFAF43D45 for ; Thu, 10 Jun 2004 03:27:50 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i5A3RJHN006663 for ; Thu, 10 Jun 2004 03:27:19 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i5A3RJYI006662; Thu, 10 Jun 2004 03:27:19 GMT (envelope-from nobody) Message-Id: <200406100327.i5A3RJYI006662@www.freebsd.org> Date: Thu, 10 Jun 2004 03:27:19 GMT From: Kensaku MASUDA To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: ports/67780: Can not communicate between IGD and mapped host X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Jun 2004 03:30:52 -0000 >Number: 67780 >Category: ports >Synopsis: Can not communicate between IGD and mapped host >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 10 03:30:26 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Kensaku MASUDA >Release: >Organization: >Environment: FreeBSD apollon.greg.rim.or.jp 4.10-PRERELEASE FreeBSD 4.10-PRERELEASE #2: Wed May 19 18:22:46 JST 2004 greg@apollon.greg.rim.or.jp:/a/uzume/export/src/system-4-stable/src/sys/compile/apollon.greg.rim.or.jp i386 >Description: Linux IGD work fine on my gateway. Look no problem with Windows Messenger on XP. And install SER(SIP Express Router) for SIP client(Using Windows Messenger). By the way, My gateway host has two ethernet interface ep0 and fxp0. ep0 is outer interface that have global IP4 address, fxp0 is internal interface that have private IP4 address and global IPV6 prefix. Windows box in internal segment. At this situation, Messenger request into IGD(FreeBSD box) for global from private(UDP & TCP ports). Port mapping was successed at that time. Next, Windows Messenger regist self to SER using mapped information. SER will sent reply message into mapped address(result may be change SER settings, but working setting is only this pattern). But register can not recieve reply message. The reply message's destination is outer IGD address/port. But, reciever dose not exist on FeeeBSD box, and Do not rewrite reply packet, because it passes through lo0. I think it was no problem, if rewriting on lo0. And Try it. a problem look solved with method. >How-To-Repeat: Install linux-igd and SER on gateway box, and SIP user agent run on internal windows box. SIP client regist myself into SER. >Fix: Here is patch for linux-idg ports. Point of solution, Mapped information need outer interface and loop back interface. --- files/patch-pmlist.cpp.orig Thu Jan 23 14:28:57 2003 +++ files/patch-pmlist.cpp Wed May 26 23:56:30 2004 @@ -1,5 +1,5 @@ ---- pmlist.cpp.orig Fri Jan 3 03:14:24 2003 -+++ pmlist.cpp Mon Jan 20 20:38:16 2003 +--- linux-igd/pmlist.cpp.orig Fri Jan 3 04:14:24 2003 ++++ linux-igd/pmlist.cpp Wed May 26 10:37:36 2004 @@ -31,6 +31,8 @@ #include #include @@ -9,7 +9,7 @@ PortMapList::PortMapList() { -@@ -182,8 +184,13 @@ +@@ -182,8 +184,16 @@ { char command[255]; @@ -18,22 +18,28 @@ + FILE *ipnat = popen("/sbin/ipnat -f -", "w"); + if (ipnat == NULL) + return 0; -+ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s\n", + ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); ++ sprintf(command, "rdr lo0 %s/32 port %d -> %s port %d %s\n", ++ ExtIP, ExtPort, IntIP, IntPort, Proto); ++ fprintf(ipnat, command); + pclose(ipnat); return (1); } -@@ -218,9 +225,14 @@ +@@ -218,9 +228,17 @@ { char command[255]; + FILE *ipnat = popen("/sbin/ipnat -rf -", "w"); + if (ipnat == NULL) + return 0; -+ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s", ++ sprintf(command, "rdr %s %s/32 port %d -> %s port %d %s\n", + ExtIf, ExtIP, ExtPort, IntIP, IntPort, Proto); ++ fprintf(ipnat, command); ++ sprintf(command, "rdr lo0 %s/32 port %d -> %s port %d %s\n", ++ ExtIP, ExtPort, IntIP, IntPort, Proto); + fprintf(ipnat, command); + pclose(ipnat); And replacable patch-pmlist.cpp was here. begin 664 patch-pmlist.cpp.gz M'XL("!ZPM$`"`W!A=&-H+7!M;&ES="YC<'``[9-=;],P%(:ODU_Q*BA2NL1M M/KJNI&SJI'6HJ"O5M(D+X")KDLTH<2S'$9T0_QW;M*B":H!`7'%CZWSY/*^/ M30A!15FW(?0^'_"ZHJWLKSGO-X+>6Y>"XE7&@`3A,(V&:3Q$'(:)[?O^P3+K M39'C*GM$/$(4ILE)FHQTQ=">3D&2*!C!5^L8TZF-9Y2MJRXO\*)CJC[O/YSM M.VG32E%DM7+:?K&1A6!8/V0"1[.-G)<3V[>Q:H2\ROA"E:?IGN'U;'Q2=;IK M-(Y50S\:#X-H9!JKB&5.6C=UG;'\;7Q\_'ZBTHG5%;,V&K3=F^B<1Y;6=0[&N7RKOI98'==7J3MS^99Q=$X>`X_CL=!=/+DL[)^:6KB_]C^\MC(`:XGOO/%O__. .UH]/"_87A#-&HI,%```` ` end >Release-Note: >Audit-Trail: >Unformatted: