aboutsummaryrefslogtreecommitdiffstats
path: root/net/beacon/files
diff options
context:
space:
mode:
authorpav <pav@FreeBSD.org>2004-10-27 00:21:10 +0800
committerpav <pav@FreeBSD.org>2004-10-27 00:21:10 +0800
commitbbcf2cbfd307fc0610cb3aab3342777798fe74f1 (patch)
treeecbc4e31412eab3b1507723d6fc362acf74ea830 /net/beacon/files
parent1bc9daea1dcee4654ad097c3aab1438157b839b1 (diff)
downloadfreebsd-ports-gnome-bbcf2cbfd307fc0610cb3aab3342777798fe74f1.tar.gz
freebsd-ports-gnome-bbcf2cbfd307fc0610cb3aab3342777798fe74f1.tar.zst
freebsd-ports-gnome-bbcf2cbfd307fc0610cb3aab3342777798fe74f1.zip
- Update to 1.1
Extensive list of changes is in the PR PR: ports/73107 Submitted by: Janos Mohacsi <janos.mohacsi@bsd.hu> (maintainer)
Diffstat (limited to 'net/beacon/files')
-rw-r--r--net/beacon/files/extra-patch-src_beacon.in95
1 files changed, 95 insertions, 0 deletions
diff --git a/net/beacon/files/extra-patch-src_beacon.in b/net/beacon/files/extra-patch-src_beacon.in
new file mode 100644
index 000000000000..dab2f29e96ae
--- /dev/null
+++ b/net/beacon/files/extra-patch-src_beacon.in
@@ -0,0 +1,95 @@
+
+$FreeBSD$
+
+--- src/beacon.in.orig
++++ src/beacon.in
+@@ -34,6 +34,7 @@
+ use Net::Multicast::Beacon; # Make rtp.c RTP calls available in Perl
+ use Getopt::Long; # Allow both -g -p and --group --port cmd lines
+ use IO::Socket; # For reverse IP lookups to get hostname
++use Socket6; # For reverse IPv6 lookup
+ use IO::Select;
+ use Net::Domain; # For getting the FQDN of the current host
+ use Sys::Hostname; # Other way of getting the name of the current host
+@@ -3387,21 +3388,41 @@
+ $thishost = $host;
+ $thisuser = $user;
+
+-my $packed = gethostbyname($host);
+-if (! defined $packed) { # Couldn't get it - Mark it bad
+- $thisip = "UNKN";
+-} else { # Unpack it into a string var
+- $thisip = inet_ntoa($packed); # "141.142.2.168"
+-}
++#if group address an IPv6 address, we have to find IPv6 addresses
+
+-# Do the best job we can do for getting FQDN for the hostname
+-my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET);
+-if (defined $lookup) { # Only update if it worked
+- $thishost = $host = $lookup;
++if ($GROUP =~ ":" ) {
++ my @res=getaddrinfo($host,'daytime',AF_INET6);
++ my($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST);
++ my($packed2,$port2) = getnameinfo($res[3]);
++
++ if( !defined $packed) {
++ $thisip = "UNKN";
++ } else {
++ $thisip = $packed;
++ }
++ if (!defined $packed2) {
++ $thishost = $host = $packed2;
++ } else {
++ $thishost = $thisip;
++ }
+ } else {
+- $thishost = $thisip;
++ my $packed = gethostbyname($host);
++ if (! defined $packed) { # Couldn't get i t - Mark it bad
++ $thisip = "UNKN";
++ } else { # Unpack it into a string var
++ $thisip = inet_ntoa($packed); # "141.142.2.168"
++ }
++
++ # Do the best job we can do for getting FQDN for the hostname
++ my $lookup = gethostbyaddr(inet_aton($thisip), AF_INET);
++ if (defined $lookup) { # Only update if it worked
++ $thishost = $host = $lookup;
++ } else {
++ $thishost = $thisip;
++ }
+ }
+
++
+ # If host still "UNKN" at this point, things are too confused to continue
+ if ($thishost eq "UNKN") {
+ die "Unable to resolve hostname -- Please check your system
+@@ -3642,11 +3663,23 @@
+
+ # Get the IP address of the hostname given in $h
+ my $hostip;
+- my $packed = gethostbyname($h);
+- if (! defined $packed) { # Couldn't get it - Mark it bad
+- $hostip = "UNKN";
+- } else { # Unpack it into a string var
+- $hostip = inet_ntoa($packed);
++ if ( $GROUP =~ ":" ) {
++ my @res = getaddrinfo($h,'daytime', AF_INET6);
++ my ($packed,$port) = getnameinfo($res[3],NI_NUMERICHOST);
++ my ($packed2,$port2) = getnameinfo($res[3]);
++ if(defined $packed) {
++ $hostip = $packed;
++ }
++ if(defined $packed2) {
++ $hostip = $packed2;
++ }
++ } else {
++ my $packed = gethostbyname($h);
++ if (! defined $packed) { # Couldn't get it - Mark it bad
++ $hostip = "UNKN";
++ } else { # Unpack it into a string var
++ $hostip = inet_ntoa($packed);
++ }
+ }
+
+ # Create a sortname using hostname and SSRC