Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Sep 2019 03:00:38 +0530
From:      Mihir Luthra <luthramihir708@gmail.com>
To:        Hiroki Sato <hrs@allbsd.org>
Cc:        freebsd-net <freebsd-net@freebsd.org>, hrs@freebsd.org
Subject:   Re: rpc.statd already ipv6 clean?
Message-ID:  <CAEa=dYASgwbBm=ZAwxv7jPzcZb5qid5010GN7QT4sa7rD%2BApdA@mail.gmail.com>
In-Reply-To: <20190927.023152.1179355129866318906.hrs@allbsd.org>
References:  <CAEa=dYAnwxPjwZozU6K3GE7-Cjwx0rSemVd0ihrbUAUQw3jOLg@mail.gmail.com> <20190926.054603.242590258844901628.hrs@allbsd.org> <CAEa=dYCv=b7JxW4Ajc%2BgBNaC7z_SEiUhwyPz5vxjUNdkzvVmHQ@mail.gmail.com> <20190927.023152.1179355129866318906.hrs@allbsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>
>
>  clnt_create() checks /etc/netconfig and tries all of the transport
>  protocols with the specified class which are listed there, and then
>  chooses the first usable one.  So if IPv6 is available, "udp6" will
>  be used because it is before "udp".
>
>  statd.c handles the bind addresses on the server (service) side while
>  file.c and procs.c handle the client calls.  They are different.
>

Thank you. I read more about it and I can relate it more now. Although, I
was thinking if the transport is being selected at runtime through
netconfig, aren't they already transport independent?

>
> lu> Also, while looking at the code, I think it always assumes ipv4 is
> always
> lu> present. Like `127.0.0.1` is added to host list always. On ipv6 only
> lu> machine this may fail.
>
>  Yes.  We should fix this kind of hardcoded loopback addresses and
>  make userland utilities transport-independent wherever possible.  It
>  can be replaced with getaddrinfo() with AF_UNSPEC for all available
>  address families.
>
>
Yes I did fix that hardcoded thing and some code in rwhod too which I
pushed to phabricator.

Kind Regards,
Mihir



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAEa=dYASgwbBm=ZAwxv7jPzcZb5qid5010GN7QT4sa7rD%2BApdA>