pkgsrc-Changes archive

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

CVS commit: pkgsrc/net/ucspi-tcp6



Module Name:    pkgsrc
Committed By:   schmonz
Date:           Mon Aug 19 22:05:39 UTC 2019

Modified Files:
        pkgsrc/net/ucspi-tcp6: Makefile distinfo
Added Files:
        pkgsrc/net/ucspi-tcp6/patches: patch-src_tcpclient.c
            patch-src_tcpserver.c

Log Message:
Apply upstream patch to fix incorrect behavior in tcpserver and
tcpclient when an IPv4 address is given as the hostname.
Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 pkgsrc/net/ucspi-tcp6/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/net/ucspi-tcp6/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpclient.c \
    pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpserver.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/ucspi-tcp6/Makefile
diff -u pkgsrc/net/ucspi-tcp6/Makefile:1.17 pkgsrc/net/ucspi-tcp6/Makefile:1.18
--- pkgsrc/net/ucspi-tcp6/Makefile:1.17 Sat Aug  3 10:43:27 2019
+++ pkgsrc/net/ucspi-tcp6/Makefile      Mon Aug 19 22:05:39 2019
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.17 2019/08/03 10:43:27 schmonz Exp $
+# $NetBSD: Makefile,v 1.18 2019/08/19 22:05:39 schmonz Exp $
 
 DISTNAME=              ucspi-tcp6-1.10.7
+PKGREVISION=           1
 CATEGORIES=            net
 MASTER_SITES=          https://www.fehcom.de/ipnet/ucspi-tcp6/
 EXTRACT_SUFX=          .tgz

Index: pkgsrc/net/ucspi-tcp6/distinfo
diff -u pkgsrc/net/ucspi-tcp6/distinfo:1.13 pkgsrc/net/ucspi-tcp6/distinfo:1.14
--- pkgsrc/net/ucspi-tcp6/distinfo:1.13 Sat Aug  3 10:43:27 2019
+++ pkgsrc/net/ucspi-tcp6/distinfo      Mon Aug 19 22:05:39 2019
@@ -1,6 +1,8 @@
-$NetBSD: distinfo,v 1.13 2019/08/03 10:43:27 schmonz Exp $
+$NetBSD: distinfo,v 1.14 2019/08/19 22:05:39 schmonz Exp $
 
 SHA1 (ucspi-tcp6-1.10.7.tgz) = 82d06361e8b69ca4a6df8106876c2d9041906d2a
 RMD160 (ucspi-tcp6-1.10.7.tgz) = 70fe5dd1e1aded55d3f1d58771eeef2fc32ceda5
 SHA512 (ucspi-tcp6-1.10.7.tgz) = 3ceb78d2a761156f7c0ee2b9ad36f728bcb78cad588bcd5f29e305a26b25fd1fc424b970dd0abfe4769680b756cfc4f60b1c60204e0eacce43d5ccc5f90fb85d
 Size (ucspi-tcp6-1.10.7.tgz) = 51200 bytes
+SHA1 (patch-src_tcpclient.c) = 12d4a7f4ae2b50b1c2357b1960306ad3296103da
+SHA1 (patch-src_tcpserver.c) = 922089930e9c05e6b8aecc22c1912fc212bd7ab3

Added files:

Index: pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpclient.c
diff -u /dev/null pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpclient.c:1.1
--- /dev/null   Mon Aug 19 22:05:39 2019
+++ pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpclient.c Mon Aug 19 22:05:39 2019
@@ -0,0 +1,24 @@
+$NetBSD: patch-src_tcpclient.c,v 1.1 2019/08/19 22:05:39 schmonz Exp $
+
+Apply upstream patch to fix incorrect behavior in tcpclient when an IPv4
+address is given as the hostname.
+
+--- src/tcpclient.c.orig       2019-07-19 17:32:34.000000000 +0000
++++ src/tcpclient.c
+@@ -133,12 +133,10 @@ int main(int argc,char **argv)
+ 
+   if (!*++argv) usage();
+ 
+-
+-  if (ipv4socket) {
+-     if (ip4_scan(hostname,ipremote)) {
+-       if (!stralloc_copyb(&addresses,(char *)V4mappedprefix,12)) nomem();
+-       byte_copy(addresses.s + 12,4,ipremote);
+-     }
++  if (ip4_scan(hostname,ipremote + 12)) {
++    if (!stralloc_copys(&addresses,"")) nomem();
++    byte_copy(addresses.s,12,V4mappedprefix);
++    byte_copy(addresses.s + 12,4,ipremote + 12);
+   } else if (ip6_scan(hostname,ipremote))
+      if (!stralloc_copyb(&addresses,ipremote,16)) nomem();
+ 
Index: pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpserver.c
diff -u /dev/null pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpserver.c:1.1
--- /dev/null   Mon Aug 19 22:05:39 2019
+++ pkgsrc/net/ucspi-tcp6/patches/patch-src_tcpserver.c Mon Aug 19 22:05:39 2019
@@ -0,0 +1,46 @@
+$NetBSD: patch-src_tcpserver.c,v 1.1 2019/08/19 22:05:39 schmonz Exp $
+
+Apply upstream patch to fix incorrect behavior in tcpserver when an IPv4
+address is given as the hostname.
+
+--- src/tcpserver.c.orig       2019-07-14 10:16:33.000000000 +0000
++++ src/tcpserver.c
+@@ -137,8 +137,9 @@ void doit(int t)
+ {
+   uint32 netif;
+   int j;
+-
+-  ipv4socket = ip6_isv4mapped(remoteip);
++ 
++  if (!ipv4socket) 
++    ipv4socket = ip6_isv4mapped(remoteip);
+ 
+   if (socket_local(t,localip,&localport,&netif) == -1)
+     logmsg(WHO,111,FATAL,"unable to get local address");
+@@ -392,10 +393,11 @@ int main(int argc,char **argv)
+ 
+   /* Name qualification */
+ 
+-  if (ip4_scan(hostname,localip)) {
++  if (ip4_scan(hostname,localip + 12)) {
+     if (!stralloc_copys(&addresses,"")) drop_nomem();
+     byte_copy(addresses.s,12,V4mappedprefix);
+-    byte_copy(addresses.s + 12,4,localip);
++    byte_copy(addresses.s + 12,4,localip + 12);
++    ipv4socket = 1;
+   } else if (ip6_scan(hostname,localip))
+     if (!stralloc_copyb(&addresses,localip,16)) drop_nomem();
+ 
+@@ -403,10 +405,9 @@ int main(int argc,char **argv)
+     if (!stralloc_copys(&tmp,hostname)) drop_nomem();
+     if (!dns_ip6_qualify(&addresses,&fqdn,&tmp))
+       logmsg(WHO,111,FATAL,B("temporarily unable to figure out IP address for: ",(char *)hostname));
+-    if (addresses.len < 16)
+-      logmsg(WHO,111,FATAL,B("no IP address for: ",(char *)hostname));
+   }
+-  byte_copy(localip,16,addresses.s);
++  if (addresses.len < 16)
++    logmsg(WHO,111,FATAL,B("no IP address for: ",(char *)hostname));
+ 
+   s = socket_tcp();
+   if (s == -1)



Home | Main Index | Thread Index | Old Index