Subject: kern/34180: ping to deprecated IPv6 address is replied to with wrong source address
To: None <kern-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: None <jandres@gmx.net>
List: netbsd-bugs
Date: 08/10/2006 16:50:00
>Number:         34180
>Category:       kern
>Synopsis:       ping to deprecated IPv6 address is replied to with wrong source address
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Aug 10 16:50:00 +0000 2006
>Originator:     Jan Andres
>Release:        4.0_BETA
>Organization:
>Environment:
NetBSD delta.home.jan 4.0_BETA NetBSD 4.0_BETA (DELTA_PF) #2: Wed Aug  9 06:39:28 MEST 2006  jan@pitr.home.jan:/xfs/0/jan/nb/obj-alpha/sys/arch/alpha/compile/DELTA_PF alpha

>Description:
Hi!

The machine has an interface with an IPv6 address assigned for which the "deprecated" flag is set. When I send ping to that address from another machine, the echo reply's source address is different from the echo request's destination address: it's another, non-deprecated address assigned to the interface in question. If the deprecated address is the only global-scope address on the interface, the reply even originates from the interface's link-local address.

I'd expect the reply to come from the same address that the request was sent to, and that's also the behavior I observe on another machine running NetBSD 3.0.1.
>How-To-Repeat:
1. Assign a deprecated IPv6 address to some interface.
2. Ping that address from another machine.

>Fix: