lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <4831E3E4.5060700@hp.com>
Date:	Mon, 19 May 2008 16:32:36 -0400
From:	Brian Haley <brian.haley@...com>
To:	Chuck Lever <chuck.lever@...cle.com>
Cc:	Jeff Garzik <jeff@...zik.org>, netdev@...r.kernel.org
Subject: Re: [PATCH 0/4] RFC: raw IPv6 address parsing in NFS client

Chuck Lever wrote:
>>>> 2) an interface name rather than index should be used
>>> If you give a raw IPv6 address with an interface name to mount.nfs, 
>>> it passes the whole thing to getaddrinfo(3) which maps the name to an 
>>> index. The address with index is then passed on to the kernel via 
>>> mount(2) via the normal "addr=" mount option.
>>> Is there a way the kernel can do that mapping for itself?
>>
>> The kernel certainly knows the interface names...  IMO that is a bit 
>> more natural than interface index.
>>
>> You certainly do not want to _store_ interface index or encourage its 
>> use, since it might change during runtime if network interfaces change.
> 
> We are storing the address of the server in a struct sockaddr_storage, 
> and that would include a scope ID if it were an AF_INET6 address.  We 
> are also storing the server hostname in /etc/mtab for umount.nfs to use 
> later, and that hostname may be a raw IPv6 address.
> 
> So it sounds like we need to store the device name separately in the 
> kernel's NFS and RPC data structures and do the devname to scope_id 
> conversion during the transport's socket connect.  Oy.

Hmm, the kernel already stores interface indexes in structures today, 
for example if you use SO_BINDTODEVICE, or join a Multicast group. 
Seems to me that's perfectly valid to do, with the caveat that the 
device might change it's index.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ