| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
The API calls are equivalent, but the object code is slightly smaller.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Attached are two small bugfixes to getaddrinfo()
Please apply,
Thanks.
--
Paul "LeoNerd" Evans
leonerd@leonerd.org.uk
ICQ# 4135350 | Registered Linux# 179460
http://www.leonerd.org.uk/
From 61fdece8ab9a729206f2633f47e25afd6f05af6a Mon Sep 17 00:00:00 2001
From: Paul "LeoNerd" Evans <leonerd@leonerd.org.uk>
Date: Mon, 24 Jan 2011 18:58:40 +0000
Subject: [PATCH 2/3] canonname should only be present on the first returned result
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
|
|
|
| |
Signed-off-by: Ævar Arnfjörð Bjarmason <avar@cpan.org>
|
|
|
|
| |
machines that can't support it
|
| |
|
|
|
|
| |
constants
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
__priority_which_t does not exist on glibc 2.1.
sin6_scope is not present in the set of kernel headers my copy of glibc 2.1 is
using. (The presence of sin6_scope in sockaddr_in6 should maybe be a Configure
test.)
blead now compiles on a positively ancient box -- although the Socket tests
fail.
|
|
|
|
|
|
|
|
|
|
|
| |
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The attached text files contain patches to correct build problems on the
Stratus VOS (recently renamed "OpenVOS") operating system. I have tested
these changes on OpenVOS Release 17.0, which is the most-current
customer release. None of these changes should affect any other OS.
Makefile.SH: This patch removes the "miniperl" dependency of the "all"
target. On an operating system that does not require an executable
suffix, the miniperl$(EXE_EXT) dependency evaluates to "miniperl", too.
But on an operating system like VOS that does have an executable suffix,
miniperl$(EXE_EXT) evaluates to (in our case) "miniperl.pm" and the
"miniperl" target is unresolved.
ext/Socket/Socket.xs: Sadly, OpenVOS does not yet support IPv6. I edited
the code to allow for this case, while retaining IPv6 support for
operating systems that do support it.
|
|
|
|
|
| |
This actually saves space, because xsubpp has to use each XS function's full
name as a constant string to pass to newXS(), so any re-use of it is free.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Socket6 implementation of inet_pton.
Fix for release-blocking ticket [perl #72884]
> |https://rt.cpan.org/Ticket/Display.html?id=52497|4411113f|NJH/IO-Socket-Multicast6-0.03.tar.gz |
I'll describe what's happening here, and leave it to everyone else to decide
which of the interacting events is the bug, or where the fix might be.
So the *entire* change is this:
commit 4411113f31b3f00171bb335092b02104d29d7cd7
Author: Rafael Garcia-Suarez <rgarciasuarez@gmail.com>
Date: Fri Mar 27 13:19:16 2009 +0100
Add inet_pton and inet_ntop to the list of functions exported by Socket
diff --git a/ext/Socket/Socket.pm b/ext/Socket/Socket.pm
index 6b268ef..7d130ba 100644
--- a/ext/Socket/Socket.pm
+++ b/ext/Socket/Socket.pm
@@ -198,6 +198,7 @@ use XSLoader ();
@ISA = qw(Exporter);
@EXPORT = qw(
inet_aton inet_ntoa
+ inet_pton inet_ntop
sockaddr_family
pack_sockaddr_in unpack_sockaddr_in
pack_sockaddr_un unpack_sockaddr_un
and test fails like this:
$ /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/bin/perl5.11.4 -Mblib t/35mcastsend.t
1..11
Constant subroutine IO::Socket::Multicast6::AF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::AF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Constant subroutine IO::Socket::Multicast6::PF_INET6 redefined at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
Prototype mismatch: sub IO::Socket::Multicast6::PF_INET6 () vs none at /home/nick/Sandpit/snap5.9.x-v5.11.4-85-g95c9bfa/lib/perl5/5.11.4/Exporter.pm line 64.
at /home/nick/.cpan/build/IO-Socket-Multicast6-0.03-CqGAYT/blib/lib/IO/Socket/Multicast6.pm line 10
ok 1 - use IO::Socket::Multicast6;
ok 2 - Create IPv4 multicast socket
ok 3 - Combined IPv4 destination address and port
ok 4 - Separate IPv4 destination address and port
Bad arg length for Socket::pack_sockaddr_in, length is 16, should be 4 at t/35mcastsend.t line 26.
The warnings aren't actually really relevant. The "problem"s are:
IO::Socket::Multicast6 isa IO::Socket::INET6
IO::Socket::INET6 isa IO::Socket
so they chose to inherit all behaviour from IO::Socket. In turn
IO::Socket isa IO::Handle isa Exporter.
IO::Socket chooses to export everything that Socket does:
sub import {
my $pkg = shift;
if (@_ && $_[0] eq 'sockatmark') { # not very extensible but for now, fast
Exporter::export_to_level('IO::Socket', 1, $pkg, 'sockatmark');
} else {
my $callpkg = caller;
Exporter::export 'Socket', $callpkg, @_;
}
}
So, this means that all those choices and delegation of behaviour (and
responsibility) means that all those modules export whatever Socket exports.
OO modules.
So, now they also export inet_pton and inet_ntop.
The test is careful to only import what it needs:
use strict;
use Socket6 qw/ inet_pton pack_sockaddr_in6/;
use Socket qw/ pack_sockaddr_in /;
use Test::More tests => 11;
in particular, it wants inet_pton from Socket6, and only pack_sockaddr_in
from Socket. So at that point, main::inet_pton is Socket6::inet_pton
Then it does this, correctly in a BEGIN block:
BEGIN { use_ok( 'IO::Socket::Multicast6' ); }
The side effect of this is to import all exports from IO::Socket::Multicast6.
Which, from the above chain of inheritance, is @Socket::EXPORT.
So at this point, main::inet_pton is rebound to Socket::inet_pton
And the test fails, because they differ, and it expected (and wanted)
Socket6::inet_pton(). Socket6::inet_pton() returns 4 bytes for AF_INET, 16
bytes for AF_INET6. Socket::inet_pton() returns 16 for both.
Socket::pack_sockaddr_in() wants 4 bytes.
Now, to add to the fun:
use IO::Socket::Multicast6 ();
and
use IO::Socket::Multicast6;
of course mean different things. The former suppresses all exports.
It turns out that with Test::More::isa_ok() has no way of doing the former:
$ cat use_ok.pl
use warnings;
use strict;
use Test::More tests => 3;
package clash;
BEGIN { main::use_ok 'Socket' };
package crunch;
BEGIN { main::use_ok 'Socket', () };
package biff;
BEGIN { main::use_ok 'Socket', 'sockaddr_family' };
package main;
sub dump_lowercase_keys {
my $package = shift;
print "For package $package:\n";
no strict 'refs';
print " $_\n" foreach sort grep {!tr/A-Z//} keys %{"${package}::"};
print "\n";
}
dump_lowercase_keys $_ foreach qw (clash crunch biff);
__END__
$ perl use_ok.pl
1..3
ok 1 - use Socket;
ok 2 - use Socket;
ok 3 - use Socket;
For package clash:
inet_aton
inet_ntoa
pack_sockaddr_in
pack_sockaddr_un
sockaddr_family
sockaddr_in
sockaddr_un
unpack_sockaddr_in
unpack_sockaddr_un
For package crunch:
inet_aton
inet_ntoa
pack_sockaddr_in
pack_sockaddr_un
sockaddr_family
sockaddr_in
sockaddr_un
unpack_sockaddr_in
unpack_sockaddr_un
For package biff:
sockaddr_family
So, there's no clean way to rewrite that test with use_ok to suppress imports.
So, to summarise, it's due to
A cascade of modules blindly exporting everything that Socket exports
Socket::inet_pton() and Socket6::inet_pton() differing in behaviour
A test that fails to realise that it's importing everything via use_ok
This one ranks as blocker because:
Socket::inet_pton() and Socket::inet_ntop() are not in any stable release
Hence we have the option to change them if we do it *NOW*.
I think that the right fix is the appended patch. This makes the new Socket
implementation of inet_pton consistent with the existing Socket6
implementation of inet_pton.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Addresses of Linux abstract namespace sockets are not nul-terminated C
strings, but rather an arbitrary character arrays. According to unix(7)
documentation from Linux, "Null bytes in the name have no special
significance."
unpack_sockaddr_un() was just throwing the initial nul byte away and
then treating the rest like ordinary C string when computing the length
of the address, which was wrong. This fix utilizes the length of the PV
for addresses starting with nul instead.
The regression test was extended with check for the problem.
|
|
|
|
|
|
|
|
|
|
|
|
| |
Abstract namespace sockets are Linux-specific socket type that live in
AF_UNIX family, slightly abusing it to be able to use arbitrary
character arrays as addresses: They start with nul byte and are not
terminated by nul byte, but with the length passed to the socket()
system call.
Added regression test for the correct address length computation.
Signed-off-by: Lubomir Rintel <lkundrak@fedoraproject.org>
|
|
|
|
|
|
| |
This trivial patch lets C89-ish compilers compile Socket.c again.
Signed-off-by: H.Merijn Brand <h.m.brand@xs4all.nl>
|
| |
|
|
|
|
|
|
|
| |
From: "Robin Barker" <Robin.Barker@npl.co.uk>
Message-ID: <46A0F33545E63740BC7563DE59CA9C6D09399D@exchsvr2.npl.ad.local>
Date: Sat, 22 Dec 2007 00:39:47 -0000
p4raw-id: //depot/perl@32703
|
|
|
|
|
|
| |
From: kan@dcit.cz (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-6655-1178036242-364.42844-75-0@perl.org>
p4raw-id: //depot/perl@31138
|
|
|
|
|
|
|
|
|
| |
NULL and assumes that this means that the variable host could be
NULL. It can't, and the check added in change 13291 was a little bit
more than the minimal solution needed for the bug report
[ID 20011126.148]
Hence remove the NULL check.
p4raw-id: //depot/perl@27851
|
|
|
|
|
|
|
|
| |
Message-ID: <42CC3CE9.5050606@divsol.com>
(reverted all dual-lived modules since they must work with older
perls too so must wait for a new Devel::PPPort)
p4raw-id: //depot/perl@25101
|
|
|
|
|
| |
Message-ID: <533D273D4014D411AB1D00062938C4D90404682E@hotel.npl.co.uk>
p4raw-id: //depot/perl@22521
|
|
|
|
|
|
| |
Based on a idea by Alex Hudson. (Basically those are unix domain
sockets whose name has a '\0' as first character.)
p4raw-id: //depot/perl@21450
|
|
|
|
|
|
|
| |
(otherwise one gets prototype conflicts between the <string.h>
and proto.h because Ultrix thinks e.g. Perl_ninstr has been
define in <string.h>...); and Configure misprobes some features.
p4raw-id: //depot/perl@20916
|
|
|
|
|
| |
Message-ID: <s0l3jvo4mju2uu4f6pkq18istk02hme6j9@4ax.com>
p4raw-id: //depot/perl@20541
|
|
|
| |
p4raw-id: //depot/perl@19569
|
|
|
|
|
| |
help the Socket extension (socket structs redefinitions).
p4raw-id: //depot/perl@19561
|
|
|
|
|
| |
not defined AF_LINK.
p4raw-id: //depot/perl@19082
|
|
|
| |
p4raw-id: //depot/perl@15141
|
|
|
|
|
| |
Message-ID: <20020304224837.GA4284@Bagpuss.unfortu.net>
p4raw-id: //depot/perl@15023
|
|
|
| |
p4raw-id: //depot/perlio@14296
|
|
|
| |
p4raw-id: //depot/perl@14293
|
|
|
|
|
| |
Message-ID: <lr1ygrk7gv.fsf@caliper.activestate.com>
p4raw-id: //depot/perl@14279
|
|
|
|
|
|
|
|
| |
Message-Id: <B8283EBD.8414%Robert.Dalgleish@sk.sympatico.ca>
Craig Berry submitted half of this patch just yesterday.
Spooky cosmic resonance.
p4raw-id: //depot/perl@13291
|
|
|
|
|
| |
Message-Id: <5.1.0.14.2.20011125160848.01c59690@exchi01>
p4raw-id: //depot/perl@13275
|
|
|
| |
p4raw-id: //depot/perl@11951
|
|
|
|
|
|
|
| |
seem to have opened a can of worms... will
go back to UNICOS/mk and do the bare minimum
required to get the tests working.
p4raw-id: //depot/perl@11950
|
|
|
|
|
|
|
|
|
|
|
| |
Now Socket.t seems to be happy in all of
Linux/x86, Tru64/alpha, Solaris/sparc,
IRIX/MIPS (both 32-bit and 64-bit), and UNICOS/mk/alpha.
Addendum: it seems that io_multihomed, io_sock, and hostent
were broken in little-endians (linux/x86 and tru64/alpha)
because of this change. Argh.
p4raw-id: //depot/perl@11948
|
|
|
| |
p4raw-id: //depot/perl@11947
|
|
|
| |
p4raw-id: //depot/perl@11926
|
|
|
|
|
| |
the Socket.t tests 10, 11, and 13 in UNICOS.
p4raw-id: //depot/perl@11919
|
|
|
| |
p4raw-id: //depot/perl@11895
|
|
|
|
|
|
|
| |
- don't allow addresses with > 255 characters
- indent the HP-UX workaround
- don't leak memory
p4raw-id: //depot/perl@11889
|
|
|
|
|
|
| |
This is a replacement implmentation that works on HPUX.
This bug should probably be fixed in GCC.
p4raw-id: //depot/perl@11789
|
|
|
| |
p4raw-id: //depot/perl@10643
|