Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/net/netatalk3 Enable support for ipv4 mapped addresses



details:   https://anonhg.NetBSD.org/pkgsrc/rev/e0e390fe5be6
branches:  trunk
changeset: 435366:e0e390fe5be6
user:      christos <christos%pkgsrc.org@localhost>
date:      Mon Jul 06 20:19:54 2020 +0000

description:
Enable support for ipv4 mapped addresses

diffstat:

 net/netatalk3/MESSAGE                               |  14 +++++++---
 net/netatalk3/Makefile                              |   4 +-
 net/netatalk3/distinfo                              |   5 +++-
 net/netatalk3/patches/patch-etc_afpd_afp__dsi.c     |  27 +++++++++++++++++++++
 net/netatalk3/patches/patch-etc_cnid__dbd_usockfd.c |  19 ++++++++++++++
 net/netatalk3/patches/patch-libatalk_dsi_dsi__tcp.c |  18 ++++++++++++++
 6 files changed, 79 insertions(+), 8 deletions(-)

diffs (141 lines):

diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/MESSAGE
--- a/net/netatalk3/MESSAGE     Mon Jul 06 19:09:29 2020 +0000
+++ b/net/netatalk3/MESSAGE     Mon Jul 06 20:19:54 2020 +0000
@@ -1,5 +1,5 @@
 ===========================================================================
-$NetBSD: MESSAGE,v 1.2 2016/11/07 00:47:29 christos Exp $
+$NetBSD: MESSAGE,v 1.3 2020/07/06 20:19:54 christos Exp $
 
 For users migrating from Netatalk 2.x, version 3.x comes with
 substantial changes, like an all-new config file format, and the loss
@@ -12,9 +12,13 @@
 Database v5, so you either have to manually upgrade the existing
 CNID database(s), or discard them.
 
-- You need to start mdnsd for this
-- add your IPv4 address to the 'afp listen' in /etc/netatalk/afp.conf
-  because otherwise the daemon only listens on IPv6, and we have mapped
-  addresses turned off by default
+- You need to start mdnsd for this, if you want enable autodiscovery
+  Otherwise you can just manually add the time machine on the mac using:
+
+       tmutil setdestination -ap afp://<user>@<host>/<share>
+
+- You don't need to add your IPv4 address to the 'afp listen' in
+  /etc/netatalk/afp.conf anymore because although the daemon only
+  listens on IPv6, it also turns mapped addresses on.
 
 ===========================================================================
diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/Makefile
--- a/net/netatalk3/Makefile    Mon Jul 06 19:09:29 2020 +0000
+++ b/net/netatalk3/Makefile    Mon Jul 06 20:19:54 2020 +0000
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.32 2020/05/22 10:56:29 adam Exp $
+# $NetBSD: Makefile,v 1.33 2020/07/06 20:19:54 christos Exp $
 
 DISTNAME=      netatalk-3.1.12
 PKGNAME=       ${DISTNAME:C/-/3-/}
-PKGREVISION=   9
+PKGREVISION=   10
 CATEGORIES=    net
 MASTER_SITES=  ${MASTER_SITE_SOURCEFORGE:=netatalk/}
 EXTRACT_SUFX=  .tar.bz2
diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/distinfo
--- a/net/netatalk3/distinfo    Mon Jul 06 19:09:29 2020 +0000
+++ b/net/netatalk3/distinfo    Mon Jul 06 20:19:54 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2018/12/21 09:59:21 hauke Exp $
+$NetBSD: distinfo,v 1.8 2020/07/06 20:19:54 christos Exp $
 
 SHA1 (netatalk-3.1.12.tar.bz2) = cc1fe1ebdbdb4da9cf82835c440e82ba28a832c5
 RMD160 (netatalk-3.1.12.tar.bz2) = 30f44674f76f7d70d02772ddf2ff249e4aef3a50
@@ -10,10 +10,13 @@
 SHA1 (patch-config_pam_Makefile.in) = 8f69225c333b327b4c57ef12994666cc521e5c70
 SHA1 (patch-distrib_initscripts_Makefile.in) = fbeffa06a051fb61819d09e0396695cbe564780e
 SHA1 (patch-distrib_initscripts_netatalk.xml.tmpl) = dd7591e12eca3c1e7d7bc768cd1e060979dc383e
+SHA1 (patch-etc_afpd_afp__dsi.c) = 024cc7a0935ece2ed43d1ab3142c8d6bb1b376be
 SHA1 (patch-etc_afpd_quota.c) = d7c87086c8eb1ff68e46c5972fcd0b2e18c592e5
 SHA1 (patch-etc_cnid__dbd_cnid__metad.c) = 6c28332ca3e11d11f3b5bb13fa01783dbb94c30f
+SHA1 (patch-etc_cnid__dbd_usockfd.c) = a3b6c498ed73dc449b84d092f2b9e13eeae3dfc5
 SHA1 (patch-etc_netatalk_netatalk.c) = 2bdbfc035e4bea9859cf970cd6b9a6503244185e
 SHA1 (patch-include_atalk_util.h) = a7a0763c5866288ad89a8b6b90c71767ee4d9d64
 SHA1 (patch-libatalk_bstring_bstrlib.c) = eaee8075f102c1150f74e9dce4d83697c3eac3fc
+SHA1 (patch-libatalk_dsi_dsi__tcp.c) = eacb939dba2749925e36ca05fa0480b3391d0f80
 SHA1 (patch-libatalk_util_getiface.c) = 1a46bd695c96e0666b6f45493eb44501c0f4e0b5
 SHA1 (patch-macros_quota-check.m4) = a6502693ae8c7218b7c4426b134e0aa590412e1f
diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/patches/patch-etc_afpd_afp__dsi.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-etc_afpd_afp__dsi.c   Mon Jul 06 20:19:54 2020 +0000
@@ -0,0 +1,27 @@
+$NetBSD: patch-etc_afpd_afp__dsi.c,v 1.1 2020/07/06 20:19:54 christos Exp $
+
+Turn on ipv4 encapsulation in v6 sockets
+
+--- etc/afpd/afp_dsi.c.orig    2016-05-20 03:23:56.000000000 -0400
++++ etc/afpd/afp_dsi.c 2020-07-05 18:44:20.904366760 -0400
+@@ -19,6 +19,7 @@
+ #include <unistd.h>
+ #endif /* HAVE_UNISTD_H */
+ #include <sys/socket.h>
++#include <netinet/in.h>
+ #include <sys/time.h>
+ #ifdef HAVE_SYS_STAT_H
+ #include <sys/stat.h>
+@@ -493,6 +494,12 @@
+     int flag = 1;
+     setsockopt(dsi->socket, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
+ 
++#ifdef IPV6_V6ONLY
++    /* allow ipv4 encapsulation */
++    flag = 0;
++    setsockopt(dsi->socket, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag));
++#endif
++
+     ipc_child_state(obj, DSI_RUNNING);
+ 
+     /* get stuck here until the end */
diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/patches/patch-etc_cnid__dbd_usockfd.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-etc_cnid__dbd_usockfd.c       Mon Jul 06 20:19:54 2020 +0000
@@ -0,0 +1,19 @@
+$NetBSD: patch-etc_cnid__dbd_usockfd.c,v 1.1 2020/07/06 20:19:54 christos Exp $
+
+Turn on ipv4 encapsulation on ipv6 sockets
+
+--- etc/cnid_dbd/usockfd.c.orig        2016-03-10 03:06:20.000000000 -0500
++++ etc/cnid_dbd/usockfd.c     2020-07-05 22:02:52.137043709 -0400
+@@ -114,6 +114,12 @@
+         flag = 1;
+         setsockopt(sockfd, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
+ #endif /* USE_TCP_NODELAY */
++
++#ifdef IPV6_V6ONLY
++      /* allow ipv4 encapsulation */
++      flag = 0;
++      setsockopt(sockfd, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag));
++#endif
+             
+         if (bind(sockfd, p->ai_addr, p->ai_addrlen) == -1) {
+             close(sockfd);
diff -r 2e7b54c07e7c -r e0e390fe5be6 net/netatalk3/patches/patch-libatalk_dsi_dsi__tcp.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/net/netatalk3/patches/patch-libatalk_dsi_dsi__tcp.c       Mon Jul 06 20:19:54 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-libatalk_dsi_dsi__tcp.c,v 1.1 2020/07/06 20:19:54 christos Exp $
+
+Add mapped ipv4 address support
+
+--- libatalk/dsi/dsi_tcp.c.orig        2016-05-20 03:23:56.000000000 -0400
++++ libatalk/dsi/dsi_tcp.c     2020-07-05 22:15:50.293819162 -0400
+@@ -363,6 +363,11 @@
+         flag = 1;
+         setsockopt(dsi->serversock, SOL_TCP, TCP_NODELAY, &flag, sizeof(flag));
+ 
++#ifdef IPV6_V6ONLY
++      /* allow ipv4 encapsulation */
++      flag = 0;
++      setsockopt(dsi->serversock, IPPROTO_IPV6, IPV6_V6ONLY, &flag, sizeof(flag));
++#endif
+         ret = bind(dsi->serversock, p->ai_addr, p->ai_addrlen);
+         if (ret == -1) {
+             close(dsi->serversock);



Home | Main Index | Thread Index | Old Index