Re: [PATCH v2 01/10] SUNRPC: add AF_VSOCK support to addr.[ch]

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

 



On Mon, 2017-05-22 at 13:21 +0100, Stefan Hajnoczi wrote:
> On Thu, May 18, 2017 at 10:04:24AM -0400, Jeff Layton wrote:
> > On Fri, 2016-10-07 at 11:01 +0100, Stefan Hajnoczi wrote:
> > > @@ -249,6 +302,10 @@ size_t rpc_pton(struct net *net, const char *buf, const size_t buflen,
> > >  {
> > >  	unsigned int i;
> > >  
> > > +	/* TODO is there a nicer way to distinguish vsock addresses? */
> > > +	if (strncmp(buf, "vsock:", 6) == 0)
> > > +		return rpc_pton_vsock(buf, buflen, sap, salen);
> > > +
> > 
> > Ick, what if I have a host on the network named "vsock"? I think you'll
> > need to come up with a different way to do this.
> 
> There is no collision.  This function doesn't do name resolution and no
> valid IPv4/IPv6 address starts with "vsock:".
> 

Doh! Of course... :)

> I am open to suggestions for a cleaner way of doing it though :).

Does lsof recognize vsock sockets? How does it format them?
-- 
Jeff Layton <jlayton@xxxxxxxxxx>
--
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