http://defect.opensolaris.org/bz/show_bug.cgi?id=14504
Summary: IPv6 addrconf addresses interfere with configuration
process
Classification: Development
Product: nwam
Version: nwam1_133.1
Platform: ANY/Generic
OS/Version: All
Status: ACCEPTED
Severity: minor
Priority: P3
Component: ON daemon
AssignedTo: alan.maguire at sun.com
ReportedBy: alan.maguire at sun.com
QAContact: nwam-dev at opensolaris.org
--- Comment #0 from amaguire <alan.maguire at sun.com> 2010-02-10 21:56:56 UTC
---
When IPv6 stateless addresses are supplied by a router, we see a lot of
unplumbing/replumbing (1/sec for a number of seconds on each interface) before
things settle out. I believe we've found the cause of this - when we get a
spurious RTM_DELADDR for stateless autoconf addresses, we do the following:
/*
* Figure out the ifname that had the address that was
* removed. The address is already gone from the
* interface, so cannot walk the interface list.
*/
struct nwamd_if_address *n;
if ((n = find_static_address(addr, ncu)) == NULL &&
(n = find_nonstatic_address(ncu, family, B_TRUE))
== NULL &&
(n = find_nonstatic_address(ncu, family, B_FALSE))
== NULL) {
nlog(LOG_ERR,
"nwamd_ncu_handle_if_state_event: "
"could not find nwamd_if_address for %s",
addrstr);
nwamd_event_do_not_send(event);
goto exit;
}
(void) strlcpy(ifname, n->ifname, sizeof (ifname));
The problem is find_nonstatic_address(ncu, family, B_TRUE) will always return a
non-NULL nwamd_if_address * - it simply returns the pointer to the DHCPv6
nwamd_if_address regardless of whether the address has been configured or not.
So if the address has not been configured, we strlcpy() an empy ifname, and as
a consequence icfg_get_flags() fails, etc. You can see this in logs if you see
messages like this:
Feb 10 18:11:19 whitestar3-0.East.Sun.COM nwamd[26497]: [ID 621297 daemon.debug
] 1: nwamd_ncu_handle_if_state_event: ifname for 2002:a08:39f0:3:acb0:7912:8626
:caa2 is
Feb 10 18:11:19 whitestar3-0.East.Sun.COM nwamd[26497]: [ID 750221 daemon.info]
1: nwamd_ncu_handle_if_state_event: can't get flags for
With the fix, this problem goes away, but without it we erroneously call
interface_ncu_down() and unplumb everything. This will only happen if you're
getting stateless v6 addresses, but it's a major pain. The basic idea of the
fix is to only return an nwamd_if_address * from find_nonstatic_address() if
the relevant nonstatic address has been configured (e.g. DHCP if
u_if->nwamd_if_dhcp_configured, DHCPv6 if u_if->nwamd_if_stateful_configured,
stateless if u_if->nwamd_if_stateless_configured. The other part of
the fix is to ensure we then set these booleans before calling
find_nonstatic_address() later (after the comment "Figure out if we want to
keep this address").
I'll continue work on this in the morning, but if someone else wants to grab
this bug and fix it in the interim, feel free.
--
Configure bugmail: http://defect.opensolaris.org/bz/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.