Re: [PATCH] sunrpc: Add scope id to svc_addr_u for IPv6 LINKLOCAL address

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

 



On Aug 22, 2011, at 3:26 PM, J. Bruce Fields wrote:

> On Sat, Aug 20, 2011 at 06:24:29PM +0800, Mi Jinlong wrote:
>> +/* 
>> + * Add scope id for LINKLOCAL address
>> + */
>> +struct in6_addr_scopeid{
>> +	struct in6_addr	sin6_addr;
>> +	__u32		sin6_scope_id;
>> +};
>> +
>> union svc_addr_u {
>> -    struct in_addr	addr;
>> -    struct in6_addr	addr6;
>> +	struct in_addr		addr;
>> +	struct in6_addr_scopeid	addr6;
> 
> By the way, is there any reason why nfsd really needs its own address
> structure?  Shouldn't we use sockaddr_storage or something?  I feel like
> we've got a little too much one-off address handling in nfsd.

That would be my only complaint about the patch.

I think we chose a smaller struct here to save space, and we could do that because we didn't need a port number or scope ID.  If a scope ID is indeed required, then we should consider something larger like a struct sockaddr_storage, IMO.

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com




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