Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Sep 2019 15:55:13 +0000
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        "Rick Macklem" <rmacklem@uoguelph.ca>
Cc:        "Mihir Luthra" <luthramihir708@gmail.com>, "Hiroki Sato" <hrs@allbsd.org>,  freebsd-net <freebsd-net@freebsd.org>, hrs@freebsd.org
Subject:   Re: rpc.statd already ipv6 clean?
Message-ID:  <4D750DC4-B2D6-4561-8335-99413F419762@FreeBSD.org>
In-Reply-To: <YTOPR0101MB1163687D58A2AEED58AECE21DD860@YTOPR0101MB1163.CANPRD01.PROD.OUTLOOK.COM>
References:  <CAEa=dYAEKph9qOcegtEB%2BFXCMqdQpmbrbzOA548cvjk0L3KK4A@mail.gmail.com> <20190925.085753.1800759957383540219.hrs@allbsd.org> <CAEa=dYAnwxPjwZozU6K3GE7-Cjwx0rSemVd0ihrbUAUQw3jOLg@mail.gmail.com> <20190926.054603.242590258844901628.hrs@allbsd.org> <CAEa=dYCv=b7JxW4Ajc%2BgBNaC7z_SEiUhwyPz5vxjUNdkzvVmHQ@mail.gmail.com> <YTOPR0101MB1163687D58A2AEED58AECE21DD860@YTOPR0101MB1163.CANPRD01.PROD.OUTLOOK.COM>

next in thread | previous in thread | raw e-mail | index | archive | help
On 26 Sep 2019, at 15:25, Rick Macklem wrote:

> Mihir Luthra wrote:
>> Hiroki Sato wrote:
>>>
>>>
>>>  I think you should learn TI-RPC API first.  The nettype specifies a
>>>  class of transport protocol, not address family.
>>>
>>> Thanks, I did some more research on TI-RPC today.
>> In `statd.c` what I see is in 
>> `create_service()`/`complete_service()`,
>> transport info is being fetched through getnetconfig(), which makes 
>> it
>> listen on all transports. I guess its clean in `statd.c` but same can 
>> also
>> be done in `procs.c`/`file.c`. Maybe trying all transports until it 
>> finds
>> one which is connectionless? Apologies if I got something wrong, new 
>> to
>> this topic.
>>
>> Also, while looking at the code, I think it always assumes ipv4 is 
>> always
>> present. Like `127.0.0.1` is added to host list always. On ipv6 only
>> machine this may fail.
> Although I'll admit it isn't something I am particularily fond of, 
> FreeBSD likes
> utilities to build/work with only one of ipv4/ipv6.
> To do this, "#ifdef INET" and "#ifdef INET6" is applied to the code 
> and the
> Makefile is tweaked to define one or both of these.
> (You can look at usr.sbin/nfsuserd for an example of this.)

I am not sure if this is entirely on-topic but here’s a diff from a 
work-tree of mine from sometime earlier this year:

https://people.freebsd.org/~bz/20190926-01-golegacy.diff

This is a lot of resolver and rpc (libc) code.  I think this did compile 
but I am almost certain that a few changes are not doing the right thing 
and need review and testing.

I might have upstreamed 2 or 3 lines of this already in case the patch 
doesn’t apply cleanly anymore.

I’ll be more than happy to work with someone going through this as 
well and reviewing/updating it.  I can also put it into Phabricator; at 
the moment it only collects dust as I didn’t have time to work on this 
hobby project lately.

/bz



>
> Btw, these protocols are old Sun Microsystems ones without any 
> published
> RFC, so what is "correct" is difficult to determine. I suppose the 
> Open
> Solaris sources is the best protocol specification. (Interop. testing 
> with Linux
> would be nice, since Linux is the "defacto standard" now.)
>
> Good luck with it, rick
>
> Kind Regards,
> Mihir
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"
> _______________________________________________
> freebsd-net@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D750DC4-B2D6-4561-8335-99413F419762>