rpc.statd already ipv6 clean?

Mihir Luthra luthramihir708 at gmail.com
Fri Sep 27 21:30:52 UTC 2019


>
>
>  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


More information about the freebsd-net mailing list