IPv6 and commit d882add695bbd5ea03961c08ac2c0380fbf2947b

Nathaniel W. Turner nathanielwyliet at gmail.com
Wed Sep 21 02:53:04 UTC 2022


Hi Jeremy,

On Fri, Sep 16, 2022 at 5:17 PM Jeremy Allison <jra at samba.org> wrote:

> On Fri, Sep 16, 2022 at 01:33:26PM -0700, Jeremy Allison via
> samba-technical wrote:
> >On Fri, Sep 16, 2022 at 04:17:46PM -0400, Nathaniel W. Turner via
> samba-technical wrote:
> >>Hi folks,
> >>
> >>I'm investigating an apparent regression in IPv6 support in the "net"
> >>command, and I have some questions about commit
> >>d882add695bbd5ea03961c08ac2c0380fbf2947b.
> >>
> >>It looks like it was intended to improve and simplify DNS lookups, but
> >>unless I'm reading it wrong, it seems to have introduced the assumption
> >>that if a DC has IPv4 addresses, all clients will too.
> >>
> >>If a DC is configured to support both IPv4 and IPv6, and a client in that
> >>environment is configured IPv6-only (e.g. as part of a transition to
> >>all-IPv6), it looks like the logic will pick one of the DC's IPv4
> addresses
> >>and ignore it's IPv6 addresses.
> >>
> >>Am I missing something?
> >
> >No that's probably correct. I didn't think I'd
> >changed the logic here, but it seems I did.
> >
> >If you'd like to log a bug and send a fix for this
> >to gitlab, I'm happy to review and get it into
> >the supported trees.
>
> This is internal to discover_dc_dns(), so you
> could probably add an extra flag here to tell
> discover_dc_dns() to return IPv6-only, and
> have it skip that DC if it doesn't have an
> IPv6 address returned.
>

Thanks for taking a look at this! I'll work on a patch.

What's the right behavior here? In the case where the local server has no
routable IPv6 addresses (e.g. link local IPv6 addresses only), we might
infer that we're only interested in IPv4 addresses for the DC, and vice
versa.

If we don't have easy access to the set of local addresses in this code
path, a simpler alternative might be to pick up to 1 IPv4 address and up to
1 IPv6 address, and potentially try them both. If the test connection fails
quickly in the case of an unusable address, this might be OK. Thoughts?

n


More information about the samba-technical mailing list