Subject: pkg/18999: net/6to4 confused by IPv4 aliases
To: None <gnats-bugs@gnats.netbsd.org>
From: Ed Gould <ed@left.wing.org>
List: netbsd-bugs
Date: 11/09/2002 16:40:07
>Number:         18999
>Category:       pkg
>Synopsis:       net/6to4 confused by IPv4 aliases
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Nov 09 16:41:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ed Gould
>Release:        pkgsrc as of 11 Nov 02
>Organization:
--
Left Wing Computing
>Environment:
	
System: NetBSD left.wing.org 1.5.2 NetBSD 1.5.2 (LEFT) #1: Sat Nov 9 00:31:47 PST 2002 ed@left.wing.org:/usr/src/sys/arch/i386/compile/LEFT i386


>Description:
	If there is an IPv4 alias on the outside interface, 6to4 does
	not properly calculate the IPv6 address.
>How-To-Repeat:
	Run 6to4 on such an interface.
>Fix:

--- /usr/pkg/sbin/6to4  Sat Nov  9 14:35:58 2002
+++ work/6to4   Sat Nov  9 16:31:56 2002
@@ -57,7 +57,7 @@
 #
 # Figure out IP#s etc.
 #
-$localadr4 = `ifconfig $out_if inet | grep inet`;
+$localadr4 = `ifconfig $out_if inet | grep inet | grep -v alias`;
 $localadr4 =~ s/^.*inet\s*//;
 $localadr4 =~ s/\s.*$//;
 chomp($localadr4);

>Release-Note:
>Audit-Trail:
>Unformatted: