Re: [PATCH] Don't spam logs with "port 0 must be in range" errors

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

 



On Fri, Jul 05, 2013 at 09:46:26AM +0200, Michal Privoznik wrote:
> On 04.07.2013 21:46, Jiri Denemark wrote:
> > Whenever virPortAllocatorRelease is called with port == 0, it complains
> > that the port is not in an allowed range, which is expectable as the
> > port was never allocated. Let's make virPortAllocatorRelease ignore 0
> > ports in a similar way free() ignores NULL pointers.
> > ---
> >  src/qemu/qemu_migration.c   |  4 ++--
> >  src/qemu/qemu_process.c     | 27 +++++++++++----------------
> >  src/util/virportallocator.c |  4 ++++
> >  3 files changed, 17 insertions(+), 18 deletions(-)
> 
> Since making an application to listen on port 0 on Linux is almost
> impossible I feel confident enough to give ACK.

s/almost//

If you specify a port==0 in a listen() call, the kernel will
auto-allocate a random non-zero port for you.

Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]