Subject: pkg/14647: 6to4 pkg doesn't support RFC 3068
To: None <gnats-bugs@gnats.netbsd.org>
From: Keith Moore <moore@cs.utk.edu>
List: netbsd-bugs
Date: 11/19/2001 18:23:33
>Number:         14647
>Category:       pkg
>Synopsis:       6to4 pkg doesn't support RFC 3068
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 19 15:24:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     
>Release:        NetBSD 1.5.1
>Organization:
>Environment:
System: NetBSD astro 1.5.2 NetBSD 1.5.2 (ASTRO) #1: Sat Oct 13 17:56:10 EDT 2001 sysbkm@astro:/usr/src/sys/arch/i386/compile/ASTRO i386


>Description:
	the 6to4 package doesn't support use of the multicast addresses
  	defined in RFC 3068 for default routes to non-6to4 destinations.

	also, some of the relay routers suggested in 6to4.conf don't
	seem to work reliably.  the rfc 3068 default route seems to 
        work much better.

>How-To-Repeat:
	try to edit /usr/pkg/etc/6to4.conf to tell it to use the RFC 3068
	multicast address.  since it uses 'host' for name to address 
	translation, it won't work unless you define your own DNS name 
	to point to 2002:c058:6301::

>Fix:

here's a somewhat lame patch (it uses a magic token in 6to4.conf
in place of a domain name of a relay router). but it does seem to work:

*** /usr/pkg/etc/6to4.conf-example.ORIG Mon Nov 19 18:10:11 2001
--- /usr/pkg/etc/6to4.conf-example      Mon Nov 19 18:10:56 2001
***************
*** 10,16 ****
  $hostbits6=":1";              # should be determined via MAC of $in_if
  
  # Possible remote 6to4 routers:
! $peer="6to4.ipv6.fh-regensburg.de"; # Germany, Europe
  #$peer="asterix.ipv6.bt.com";     # Great Britain, Europe
  #$peer="6to4.kfu.com";                    # USA, West coast
  #$peer="6to4.ipv6.microsoft.com";   # USA, West coast
--- 10,17 ----
  $hostbits6=":1";              # should be determined via MAC of $in_if
  
  # Possible remote 6to4 routers:
! $peer="6to4-anycast"          # use RFC 3068 magic values
! #$peer="6to4.ipv6.fh-regensburg.de"; # Germany, Europe
  #$peer="asterix.ipv6.bt.com";     # Great Britain, Europe
  #$peer="6to4.kfu.com";                    # USA, West coast
  #$peer="6to4.ipv6.microsoft.com";   # USA, West coast
*** /usr/pkg/sbin/6to4.ORIG     Mon Nov 19 18:05:57 2001
--- /usr/pkg/sbin/6to4  Mon Nov 19 18:08:43 2001
***************
*** 64,74 ****
        
  $localadr6 = sprintf("$prefix:%04x", $v6_net);
  
! chomp($remoteadr4 = `host $peer`);
! $remoteadr4 =~ s/^.*address //;
  
! chomp($remoteadr6 = `host -t AAAA $peer`);
! $remoteadr6 =~ s/^.*address //;
  
  
  if ($verbose) {
--- 64,81 ----
        
  $localadr6 = sprintf("$prefix:%04x", $v6_net);
  
! if ($peer eq "6to4-anycast") {
!     # magic values from rfc 3068
!     $remoteadr4 =  "192.88.99.1";
!     $remoteadr6 =  "2002:c058:6301::";
! } 
! else {
!     chomp($remoteadr4 = `host $peer`);
!     $remoteadr4 =~ s/^.*address //;
  
!     chomp($remoteadr6 = `host -t AAAA $peer`);
!     $remoteadr6 =~ s/^.*address //;
! }
  
  
  if ($verbose) {

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