From martti.kuparinen@nomadiclab.com  Thu Nov  9 04:13:59 2000
Return-Path: <martti.kuparinen@nomadiclab.com>
Received: from ws130.nomadiclab.com (ws130.nomadiclab.com [195.165.196.130])
	by hub.freebsd.org (Postfix) with ESMTP id A7E7237B479
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  9 Nov 2000 04:13:58 -0800 (PST)
Received: by ws130.nomadiclab.com (Postfix, from userid 2000)
	id 035CA72504; Thu,  9 Nov 2000 14:13:47 +0200 (EET)
Message-Id: <20001109121347.035CA72504@ws130.nomadiclab.com>
Date: Thu,  9 Nov 2000 14:13:47 +0200 (EET)
From: martti.kuparinen@piuha.net
Sender: martti.kuparinen@nomadiclab.com
Reply-To: martti.kuparinen@piuha.net
To: FreeBSD-gnats-submit@freebsd.org
Subject: IPv6 prefixlen problem
X-Send-Pr-Version: 3.2

>Number:         22715
>Category:       conf
>Synopsis:       IPv6 prefixlen problem
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    ume
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Nov 09 04:20:00 PST 2000
>Closed-Date:    Tue Nov 14 08:05:16 PST 2000
>Last-Modified:  Tue Nov 14 08:08:12 PST 2000
>Originator:     Martti Kuparinen
>Release:        FreeBSD 4.2-BETA i386
>Organization:
piuha.net
>Environment:

	

>Description:

I have a problem with my FreeBSD 4.2-BETA hosts. One is configured as host
and one as a router. The problem described below appeared after upgrading
from 4.1.1-RELEASE to 4.2-BETA.

PROBLEM
=======
This appears on my console:

    Nov  9 13:29:51 ws140 /kernel: in6_ifadd: wrong prefixlen for de0(prefix=10 ifid=64)
    Nov  9 13:29:51 ws140 /kernel: prelist_update: failed to add a new address

    ROOT ws140:~> tcpdump icmp6
    tcpdump: listening on de0
    13:29:51.225298 fe80::210:5aff:fe69:df83 > ff02::1: icmp6: router advertisement

This is from my host:

    ws140:~> ifconfig -a inet6
    de0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            inet6 fe80::280:c8ff:fe4c:67b8%de0 prefixlen 64 scopeid 0x1 
            inet6 3ffe:xxx:x:3f01:280:c8ff:fe4c:67b8 prefixlen 64 
    gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    ifconfig: gif0 has no inet6 interface address!
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
            inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 
            inet6 ::1 prefixlen 128 

And this is from the router:

    router:~> ifconfig -a inet6
    xl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
            inet6 fe80::210:5aff:fe69:df83%xl0 prefixlen 64 scopeid 0x1 
            inet6 3ffe:xxx:x:3f01:210:5aff:fe69:df83 prefixlen 64 
            inet6 3ffe:xxx:x:3f01:: prefixlen 64 anycast 
            inet6 3ffe:xxx:x:3f01::1 prefixlen 64 
    gif0: flags=8111<UP,POINTOPOINT,PROMISC,MULTICAST> mtu 1280
            inet6 fe80::210:5aff:fe69:df83%gif0 --> :: prefixlen 64 scopeid 0x2 
    gif1: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    ifconfig: gif1 has no inet6 interface address!
    gif2: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    ifconfig: gif2 has no inet6 interface address!
    gif3: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
    ifconfig: gif3 has no inet6 interface address!
    lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
            inet6 fe80::1%lo0 prefixlen 64 scopeid 0x6 
            inet6 ::1 prefixlen 128 
    faith0: flags=8000<MULTICAST> mtu 1500
    ifconfig: faith0 has no inet6 interface address!

    router:~> ps ax | grep -e route -e rtadvd
      132  ??  Ss     0:00.48 /usr/sbin/route6d
      134  ??  Ss     0:00.07 rtadvd xl0

    router:~> grep ipv6 /etc/rc.conf 
    ipv6_enable="YES"
    ipv6_gateway_enable="YES"
    ipv6_network_interfaces="xl0"
    ipv6_prefix_xl0="3ffe:xxx:x:3f01"
    ipv6_ifconfig_xl0="3ffe:xxx:x:3f01::1"
    ipv6_router_enable="YES"
    ipv6_router_flags=""

    ROOT router:~> killall -SIGUSR1 rtadvd
    ROOT router:~> cat /var/run/rtadvd.dump
    xl0:
      Status: UP
      Last RA sent: Thu Nov  9 13:49:16 2000
      Next RA will be sent: Thu Nov  9 13:55:44 2000
      waits: 0, initcount: 3
      statistics: RA(out/in/inconsistent): 75/75/0, RS(input): 21
      Link-layer address: 0:10:5a:69:df:83
      MTU: 1500
      DefaultLifetime: 1800, MaxAdvInterval: 600, MinAdvInterval: 200
      Flags:  MTU: 0
      ReachableTime: 0, RetransTimer: 0, CurHopLimit: 64
      Prefixes:
!!! ==> fec0::/10(KERNEL, vltime: 2592000, pltime: 604800, flags: LA)
        3ffe:200:8:3f01::/64(KERNEL, vltime: 2592000, pltime: 604800, flags: LA)

REASON
======
Looks like this routing table entry is the reason:

fec0::/10                         link#1                        UCS         xl0

What am I doing wrong? Or is there an error in FreeBSD's rc.network6?
There was a change (1.5.2.7 -> 1.5.2.8) which might be the reason...

>How-To-Repeat:

	

>Fix:

	


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->ume 
Responsible-Changed-By: ume 
Responsible-Changed-When: Mon Nov 13 08:34:55 PST 2000 
Responsible-Changed-Why:  
I'll take a look. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22715 
State-Changed-From-To: open->closed 
State-Changed-By: ume 
State-Changed-When: Tue Nov 14 08:05:16 PST 2000 
State-Changed-Why:  
It was a bug that ff02::/16 was wrongly replaced to fec0::/10 by my 
previous commit.  I did backout this part. 
Thanks for your report. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=22715 
>Unformatted:
