[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 1/3] qemu-sockets: add abstract UNIX domain socket support
From: |
Daniel P . Berrangé |
Subject: |
Re: [PULL 1/3] qemu-sockets: add abstract UNIX domain socket support |
Date: |
Wed, 20 May 2020 15:33:35 +0100 |
User-agent: |
Mutt/1.13.4 (2020-02-15) |
On Wed, May 20, 2020 at 04:23:50PM +0200, Markus Armbruster wrote:
> I apologize for chiming in so late...
>
> Daniel P. Berrangé <address@hidden> writes:
>
> > From: xiaoqiang zhao <address@hidden>
> >
> > unix_listen/connect_saddr now support abstract address types
> >
> > two aditional BOOL switches are introduced:
> > tight: whether to set @addrlen to the minimal string length,
> > or the maximum sun_path length. default is TRUE
>
> When and why would anyone pass 'tight': false?
In the abstract namespace the length of the socket is critical
information. ie
"\0foo" (length == 4, tight=true)
is a completely different socket from
"\0foo\0..repeated...\0" (length == sizeof(sun_path), tight=false)
In theory you can have any length in between those extremes,
each being a different socket, but in practice no one is that
insane. Apps either use the full length, or the minimal
length. The "tight" terminology is copied from "socat" which
uses this same option name
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|