develooper Front page | perl.perl5.porters | Postings from May 2013

Re: [perl #116433] Get IO::Socket::IP into core for seemless v4/v6 support

Thread Previous | Thread Next
Craig A. Berry
May 1, 2013 00:23
Re: [perl #116433] Get IO::Socket::IP into core for seemless v4/v6 support
Message ID:
On Tue, Apr 30, 2013 at 9:30 AM, Matthew Horsfall (alh)

> On Thu, Apr 25, 2013 at 5:04 PM, Craig A. Berry <>wrote:
>> I believe everything that goes wrong does so somewhere
>> in IO::Socket::IP::_configure, but haven't really had time to dig very deep
>> yet.
> Craig,
> Any chance I or LeoNerd could get access to one of the failing systems so
> we can do some playing around?
I'm not against the idea but it would take quite a bit of my time and yours
to get you set up and teach you enough about VMS to do any debugging.

I did more or less get to the bottom of the 11sockopts.t failure, which is
that the failing tests requires elevated privileges.  Here's a snippet of a
debug session showing where things go south:

  DB<4> s
314:    setsockopt($_[0],$_[1],$_[2],$_[3]);
  DB<4> T
@ = DB::DB called from file '/perl_root/lib/IO/' line 314
$ = IO::Socket::setsockopt(ref(IO::Socket::IP), 65535, 32, '^A^@^@^@')
called from file '/perl_root/lib/IO/Socket/' line 561
$ = IO::Socket::IP::setup(ref(IO::Socket::IP)) called from file
'/perl_root/lib/IO/Socket/' line 540
$ = IO::Socket::IP::_configure(ref(IO::Socket::IP), ref(HASH)) called from
file '/perl_root/lib/IO/Socket/' line 364
$ = IO::Socket::IP::configure(ref(IO::Socket::IP), ref(HASH)) called from
file '/perl_root/lib/IO/' line 49
$ = IO::Socket::new('IO::Socket::IP', 'LocalHost',, 'Broadcast',
1, 'Type', 2) called from file '/perl_root/lib/IO/Socket/' line 331
$ = IO::Socket::IP::new('IO::Socket::IP', 'LocalHost',, 'Type',
2, 'Broadcast', 1) called from file 't/11sockopts.t' line 43
  DB<4> s
Cannot socket() - permission denied at t/11sockopts.t line 43, <DATA> line
2502:    $Test->_ending if defined $Test;

If you put "setsockopt broadcast privilege" into your favorite search
engine, you'll see that broadcast has been a privileged operation for
various systems at various times.  We could put in a skip for this test,
but I don't know how necessary this feature is to the functioning of

Side note: it seems wrong to me that IO::Socket::setsockopt does not check
the return value of the core setsockopt, but I don't think it makes any
difference in this case.

I will try to get to the nonblocking failures soonish.

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About