tools: next_unused_port: use IPPROTO_TCP explicitly
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 30 May 2017 13:30:10 +0000 (15:30 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 31 May 2017 05:34:14 +0000 (07:34 +0200)
commita0ecb15991e5faf6aeaa221a7502d60f9eb45d51
treed360d5877bd7598dbfb07877195f482c085073da
parentc14960cc1d2dc3bf648f4c5a7eb22e7e4cbf4288
tools: next_unused_port: use IPPROTO_TCP explicitly

Otherwise perl tries to bind+listen on a UDP socket if the
TCP socket fails - which is a waste since we're looking for
TCP ports.
Additionall since UDP doesn't support listen(), perl will
return EOPNOTSUPP instead of, say, EADDRINUSE. (We don't
care about the error in this code though.)
src/PVE/Tools.pm