From nobody@FreeBSD.org  Fri Jul 24 18:30:53 2009
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 46A3B106564A
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Jul 2009 18:30:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21])
	by mx1.freebsd.org (Postfix) with ESMTP id 298008FC22
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Jul 2009 18:30:53 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from www.freebsd.org (localhost [127.0.0.1])
	by www.freebsd.org (8.14.3/8.14.3) with ESMTP id n6OIUqdF094704
	for <freebsd-gnats-submit@FreeBSD.org>; Fri, 24 Jul 2009 18:30:52 GMT
	(envelope-from nobody@www.freebsd.org)
Received: (from nobody@localhost)
	by www.freebsd.org (8.14.3/8.14.3/Submit) id n6OIUqkE094703;
	Fri, 24 Jul 2009 18:30:52 GMT
	(envelope-from nobody)
Message-Id: <200907241830.n6OIUqkE094703@www.freebsd.org>
Date: Fri, 24 Jul 2009 18:30:52 GMT
From: Alex Hayward <xelah-freebsdpr@xelah.com>
To: freebsd-gnats-submit@FreeBSD.org
Subject: lagg falsely triggers IPv6 duplicate address detection
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         137089
>Category:       kern
>Synopsis:       [lagg] lagg falsely triggers IPv6 duplicate address detection
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    freebsd-net
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Fri Jul 24 18:40:01 UTC 2009
>Closed-Date:    
>Last-Modified:  Sat Jul 25 01:08:50 UTC 2009
>Originator:     Alex Hayward
>Release:        7.2-RC2
>Organization:
>Environment:
FreeBSD db2.xxxxxxxxxxx 7.2-RC2 FreeBSD 7.2-RC2 #6: Tue Apr 28 20:43:30 BST 2009     alex@db2.xxxxxxxxx:/usr/obj/usr/src/sys/DB2  amd64

>Description:
When an IPv6 alias is added to a lagg interface one duplicate address detection ICMP neighbour solicitation message is sent from each interface forming the link. The kernel then thinks that the address is a duplicate when it isn't. This does not happen when only one physical interface is being used.

>How-To-Repeat:
[root@db2 /usr/home/alex]# jobs
[2]-  Running                 tail -f /var/log/messages &
[3]+  Running                 tcpdump -vnpi lagg1 icmp6 &
[root@db2 /usr/home/alex]# ifconfig lagg1
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:15:60:0a:4d:9a
        inet6 fe80::214:38ff:fe51:5da0%lagg1 prefixlen 64 scopeid 0x6
        inet 10.10.10.11 netmask 0xffffff00 broadcast 10.10.10.255
        inet6 fda8:48b8:b52c:1::b prefixlen 120
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: bge3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]# ifconfig lagg1 inet6 fda8:48b8:b52c:3::b prefixlen 120 alias
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]# 19:06:54.716072 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff00:b: [icmp6 sum ok] ICMP6, neighbor so
licitation, length 24, who has fda8:48b8:b52c:3::b

[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]# ifconfig lagg1
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:15:60:0a:4d:9a
        inet6 fe80::214:38ff:fe51:5da0%lagg1 prefixlen 64 scopeid 0x6
        inet 10.10.10.11 netmask 0xffffff00 broadcast 10.10.10.255
        inet6 fda8:48b8:b52c:1::b prefixlen 120
        inet6 fda8:48b8:b52c:3::b prefixlen 120
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: bge3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>


[root@db2 /usr/home/alex]# ifconfig lagg1 inet6 fda8:48b8:b52c:3::b prefixlen 120 -alias
[root@db2 /usr/home/alex]# ifconfig lagg1 laggport bge1
[root@db2 /usr/home/alex]# ifconfig lagg1
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:15:60:0a:4d:9a
        inet6 fe80::214:38ff:fe51:5da0%lagg1 prefixlen 64 scopeid 0x6
        inet 10.10.10.11 netmask 0xffffff00 broadcast 10.10.10.255
        inet6 fda8:48b8:b52c:1::b prefixlen 120
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: bge1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: bge3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
[root@db2 /usr/home/alex]# ifconfig lagg1 inet6 fda8:48b8:b52c:3::b prefixlen 120 alias
[root@db2 /usr/home/alex]# 19:12:04.364760 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff00:b: [icmp6 sum ok] ICMP6, neighbor so
licitation, length 24, who has fda8:48b8:b52c:3::b
19:12:04.364826 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 24) :: > ff02::1:ff00:b: [icmp6 sum ok] ICMP6, neighbor solicitation, length 24, who
has fda8:48b8:b52c:3::b
Jul 24 19:12:05 db2 kernel: lagg1: DAD detected duplicate IPv6 address fda8:48b8:b52c:3::b: NS in/out=1/1, NA in=0
Jul 24 19:12:05 db2 kernel: lagg1: DAD complete for fda8:48b8:b52c:3::b - duplicate found
Jul 24 19:12:05 db2 kernel: lagg1: manual intervention required
[root@db2 /usr/home/alex]# ifconfig lagg1
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:15:60:0a:4d:9a
        inet6 fe80::214:38ff:fe51:5da0%lagg1 prefixlen 64 scopeid 0x6
        inet 10.10.10.11 netmask 0xffffff00 broadcast 10.10.10.255
        inet6 fda8:48b8:b52c:1::b prefixlen 120
        inet6 fda8:48b8:b52c:3::b prefixlen 120 duplicated
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: bge1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: bge3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>

>Fix:
Not really a fix, of course:

[root@db2 /usr/home/alex]# ifconfig lagg1 inet6 fda8:48b8:b52c:3::b prefixlen 120 -alias
[root@db2 /usr/home/alex]# ipfw add 50 deny icmp6 from any to any
00050 deny ipv6-icmp from any to any
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]# ifconfig lagg1 inet6 fda8:48b8:b52c:3::b prefixlen 120 alias
[root@db2 /usr/home/alex]# ipfw delete 50
[root@db2 /usr/home/alex]#
[root@db2 /usr/home/alex]# ifconfig lagg
lagg1: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
        options=9b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM>
        ether 00:15:60:0a:4d:9a
        inet6 fe80::214:38ff:fe51:5da0%lagg1 prefixlen 64 scopeid 0x6
        inet 10.10.10.11 netmask 0xffffff00 broadcast 10.10.10.255
        inet6 fda8:48b8:b52c:1::b prefixlen 120
        inet6 fda8:48b8:b52c:3::b prefixlen 120
        media: Ethernet autoselect
        status: active
        laggproto lacp
        laggport: bge1 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>
        laggport: bge3 flags=1c<ACTIVE,COLLECTING,DISTRIBUTING>


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->freebsd-net 
Responsible-Changed-By: linimon 
Responsible-Changed-When: Sat Jul 25 01:08:36 UTC 2009 
Responsible-Changed-Why:  
Over to maintainer(s). 

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