public inbox for developer@lists.illumos.org (since 2011-08)
 help / color / mirror / Atom feed
* [developer] [REVIEW] 16841 in.ndpd sometimes loses interface id on restart
@ 2024-10-19 18:58 Bill Sommerfeld via illumos-developer
  0 siblings, 0 replies; only message in thread
From: Bill Sommerfeld via illumos-developer @ 2024-10-19 18:58 UTC (permalink / raw)
  To: developer

Issue: https://www.illumos.org/issues/16841
CR: https://code.illumos.org/c/illumos-gate/+/3741
Diff: 
https://code.illumos.org/~diff/9ccc0daeed048cc5d86a311d9b68fb6bccb01479

The low order 64 bits of IPv6 unicast addresses come from an interface
identifier which is, by default, derived from the interface's MAC
address.  The "ipadm create-addr -T autoconf" command lets you specify
an alternate value for the interface identifier, but it turns out that
if you use this option, in.ndpd will sometimes ignore it and use the
default, leading to unstable ipv6 addresses.

I've been using this configuration for a few years and have been
bothered with the instability.  I believe I've finally found the cause
and have a fix.

There are multiple paths to creating a "struct phyint" inside in.ndpd,
and there were inconsistancies in what they did and how they set the
interface id-related fields of the "struct phyint".

There are two parts to the change:

1) phyint_check_ipadm_intfid() was only called if the "struct phyint"
was newly created in if_process(); if it was created earlier (for
instance, if it was mentioned by name in ndpd.conf), ndpd wouldn't use
the configured interface id in newly-created addresses.

2) When an address is set up by ndpd_create_addrs() with a configured
interface id, the "pi->pi_default_token" boolean is cleared, but when
phyint_check_ipadm_intfid() is called, pi->pi_default_token is left
unchanged.  If pi->pi_default_token is left set, the interface id will
be overwritten the next time phyint_init_from_k() is called.

I'd like to thank Andy Fiddaman for creating and integrating the
link-local test in https://www.illumos.org/issues/16251; it turned out
to be a reliable way to provoke address instability.

Thanks in advance for your review.

                                        - Bill




------------------------------------------
illumos: illumos-developer
Permalink: https://illumos.topicbox.com/groups/developer/T9d2d278184764632-M0cdefe608f1f4d20bd381f93
Delivery options: https://illumos.topicbox.com/groups/developer/subscription

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-19 19:00 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-19 18:58 [developer] [REVIEW] 16841 in.ndpd sometimes loses interface id on restart Bill Sommerfeld via illumos-developer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).