Re: [PATCH 0/3] nfs-utils: Enabling TCP wrappers

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Chuck Lever wrote:
> Hi Steve-
> 
> On Dec 18, 2008, at Dec 18, 2008, 3:49 PM, Steve Dickson wrote:
>> Chuck Lever wrote:
>>>> @@ -72,12 +74,29 @@ mount_dispatch(struct svc_req *rqstp, SVCXPRT
>>>> *transp)
>>>>    union mountd_results    result;
>>>>
>>>> #ifdef HAVE_TCP_WRAPPER
>>>> +#ifdef IPV6_SUPPORTED
>>>> +    static int once = 0;
>>>> +
>>>> +    if (svc_getcaller(transp)->sin_family != AF_INET) {
>>>
>>> It's not clear to me that svc_getcaller() will ever return a non-AF_INET
>>> address.
>>>
>>> Should we use svc_getcaller_netbuf() here instead?
>> I would if I could but there is no svc_getcaller_netbuf() in the
>> glibc version of RPC...
> 
> If IPV6_SUPPORTED is set than libtirpc is required to be available. 
> nfs-utils won't build with --enable-ipv6 if there's no libtirpc.
Ah... good point! So something like this should work:

    sa = (struct sockaddr *)svc_getcaller_netbuf(transp)->buf;

    if (sa->sa_family != AF_INET) {

        if (!once) {

            syslog(LOG_WARNING,

                "No IPv6 support in Access Control Library (TCP
Wrappers)");

            once++;

        }

        goto skipcheck;

    }


steved.

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux