diff options
author | Anders Nordby <anders@FreeBSD.org> | 2011-08-15 22:12:16 +0000 |
---|---|---|
committer | Anders Nordby <anders@FreeBSD.org> | 2011-08-15 22:12:16 +0000 |
commit | d9de95ea9a58e23007b8fe055d1d84fc4b75f351 (patch) | |
tree | b3b8910af014818c4a1cf07281ab366c4ffd449b /net/dante/files | |
parent | 4ce569184b9cb6d36b9b9b2856c04a5b9786bf1d (diff) | |
download | ports-d9de95ea9a58e23007b8fe055d1d84fc4b75f351.tar.gz ports-d9de95ea9a58e23007b8fe055d1d84fc4b75f351.zip |
Notes
Diffstat (limited to 'net/dante/files')
-rw-r--r-- | net/dante/files/patch-configure | 99 | ||||
-rw-r--r-- | net/dante/files/patch-ltmain.sh | 10 | ||||
-rw-r--r-- | net/dante/files/patch-sockd-getifa.c | 216 |
3 files changed, 15 insertions, 310 deletions
diff --git a/net/dante/files/patch-configure b/net/dante/files/patch-configure index befcb8bb260a..89180b1a4464 100644 --- a/net/dante/files/patch-configure +++ b/net/dante/files/patch-configure @@ -1,90 +1,11 @@ -Index: configure -diff -u configure.orig configure ---- configure.orig Mon Jan 16 20:49:45 2006 -+++ configure Sun Sep 3 20:35:01 2006 -@@ -25195,6 +25195,76 @@ - #include <unistd.h> +--- configure.orig 2011-06-20 18:01:06.000000000 +0200 ++++ configure 2011-07-12 15:49:45.602728013 +0200 +@@ -33876,7 +33876,7 @@ - struct hostent * -+gethostbyaddr( const void *, int, int -+); -+int -+main () -+{ -+ -+ ; -+ return 0; -+} -+_ACEOF -+rm -f conftest.$ac_objext -+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 -+ (eval $ac_compile) 2>conftest.er1 -+ ac_status=$? -+ grep -v '^ *+' conftest.er1 >conftest.err -+ rm -f conftest.er1 -+ cat conftest.err >&5 -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); } && -+ { ac_try='test -z "$ac_c_werror_flag" -+ || test ! -s conftest.err' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; } && -+ { ac_try='test -s conftest.$ac_objext' -+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 -+ (eval $ac_try) 2>&5 -+ ac_status=$? -+ echo "$as_me:$LINENO: \$? = $ac_status" >&5 -+ (exit $ac_status); }; }; then -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_0 struct hostent * -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_1 const void * -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_2 int -+_ACEOF -+ -+cat >>confdefs.h <<_ACEOF -+#define HAVE_PROT_GETHOSTBYADDR_3 int -+_ACEOF -+ -+ echo "$as_me:$LINENO: result: ok" >&5 -+echo "${ECHO_T}ok" >&6 -+else -+ echo "$as_me: failed program was:" >&5 -+sed 's/^/| /' conftest.$ac_ext >&5 -+ -+cat >conftest.$ac_ext <<_ACEOF -+ -+ /* confdefs.h. */ -+_ACEOF -+cat confdefs.h >>conftest.$ac_ext -+cat >>conftest.$ac_ext <<_ACEOF -+/* end confdefs.h. */ -+ -+#include <sys/types.h> -+#include <sys/socket.h> -+#include <sys/uio.h> -+#include <netdb.h> -+#include <unistd.h> -+ -+struct hostent * - gethostbyaddr( const void *, socklen_t, int - ); - int -@@ -25253,6 +25323,8 @@ - echo "$as_me:$LINENO: result: failure" >&5 - echo "${ECHO_T}failure" >&6 - failproto=t -+fi -+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi - rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - fi + + +-for ac_header in gssapi.h gssapi/gssapi.h gssapi/gssapi_ext.h ++for ac_header in gssapi/gssapi.h gssapi/gssapi_ext.h + do + as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` + if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then diff --git a/net/dante/files/patch-ltmain.sh b/net/dante/files/patch-ltmain.sh index 8eef43cc6ed0..9c3b78292e8b 100644 --- a/net/dante/files/patch-ltmain.sh +++ b/net/dante/files/patch-ltmain.sh @@ -1,14 +1,14 @@ ---- ltmain.sh.orig Wed Mar 16 21:57:42 2005 -+++ ltmain.sh Wed Mar 16 21:59:55 2005 -@@ -5540,10 +5540,12 @@ +--- ltmain.sh.orig 2008-08-12 19:06:26.000000000 +0200 ++++ ltmain.sh 2011-07-12 16:01:37.595732703 +0200 +@@ -6115,10 +6115,12 @@ fi # Install the pseudo-library for information purposes. + if /usr/bin/false; then name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? + $show "$install_prog $extra_mode $instname $destdir/$name" + $run eval "$install_prog $extra_mode $instname $destdir/$name" || exit $? + fi # Maybe install the static library, too. diff --git a/net/dante/files/patch-sockd-getifa.c b/net/dante/files/patch-sockd-getifa.c deleted file mode 100644 index d6c6eecf51a3..000000000000 --- a/net/dante/files/patch-sockd-getifa.c +++ /dev/null @@ -1,216 +0,0 @@ ---- sockd/getifa.c.orig 2003-07-01 13:21:40.000000000 +0000 -+++ sockd/getifa.c 2009-01-18 23:43:40.000000000 +0000 -@@ -58,6 +58,9 @@ - * that will be selected by the OS to connect to that destination address. - *==========================================================================*/ - #include <net/route.h> /* RTA_xxx constants */ -+#if HAVE_ROUTEINFO_BSD -+#include <net/if_dl.h> -+#endif /* HAVE_ROUTEINFO_BSD */ - #if HAVE_ROUTEINFO_LINUX - #include <asm/types.h> - #include <linux/netlink.h> -@@ -233,9 +236,11 @@ - pid_t pid; - struct rt_msghdr *rtm; - struct sockaddr *sa; -+ char *cp; -+ int i; - uid_t euid; - struct in_addr inaddr_none; -- struct in_addr gwaddr; -+ struct sockaddr ifa; - - inaddr_none.s_addr = htonl(INADDR_NONE); - -@@ -256,85 +261,123 @@ - } - - /*=================================================================== -- * Do until 2 consecutive RTM_GET return the same gateway address. -- * The first calls may return router addresses in RTA_GATEWAY and -- * those will not match any local external address. -+ * Do a RTM_GET to look up the gateway for the address. -+ * Extract the RTM_IFA from it, which is the source address used -+ * on that interface. -+ * The code is modeled after the code for route(8). - *==================================================================*/ -+ /*=========================================================== -+ * Build the necessary data structures to get routing info. -+ * The structures are: -+ * rt_msghdr - Specifies RTM_GET for getting routing table -+ * info -+ * sockaddr - contains the destination address -+ * sockaddr_dl - necessary for unkown reasons. -+ *==========================================================*/ -+#define ROUNDUP(a) \ -+ ((a) > 0 ? (1 + (((a) - 1) | (sizeof(long) - 1))) : sizeof(long)) -+#define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len)) -+ -+ -+ bzero(buf, sizeof(buf)); -+ rtm = (struct rt_msghdr *) buf; -+ rtm->rtm_version = RTM_VERSION; -+ rtm->rtm_type = RTM_GET; -+ rtm->rtm_flags = RTF_UP | RTF_HOST | RTF_GATEWAY | RTF_STATIC; -+ rtm->rtm_addrs = RTA_DST | RTA_IFA; -+ rtm->rtm_pid = pid = getpid(); -+ rtm->rtm_seq = SEQ; -+ -+ cp = (char *) (rtm + 1); -+ sa = (struct sockaddr *) cp; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_family = AF_INET; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_addr = destaddr; -+ /* LINTED pointer casts may be troublesome */ -+ TOIN(sa)->sin_port = htons(0); -+ sa->sa_len = sizeof(struct sockaddr_in); -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *) cp; -+ /* add dummy link layer address */ -+ sa->sa_family = AF_LINK; -+ sa->sa_len = sizeof(struct sockaddr_dl); -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *) cp; -+ rtm->rtm_addrs |= RTA_IFP; -+ -+ rtm->rtm_msglen = cp - buf; -+ -+ /*=========================================================== -+ * Send the request and get the response. -+ *==========================================================*/ -+ if (write(sockfd, rtm, (size_t)rtm->rtm_msglen) != rtm->rtm_msglen) { -+ swarn("%s: write() to AF_ROUTE failed", function); -+ close(sockfd); -+ return inaddr_none; -+ } -+ - do { -- /*=========================================================== -- * Build the necessary data structures to get routing info. -- * The structures are: -- * rt_msghdr - Specifies RTM_GET for getting routing table -- * info -- * sockaddr - contains the destination address -- *==========================================================*/ -- -- bzero(buf, sizeof(buf)); -- rtm = (struct rt_msghdr *) buf; -- rtm->rtm_msglen = sizeof(struct rt_msghdr) + sizeof(struct sockaddr_in); -- rtm->rtm_version = RTM_VERSION; -- rtm->rtm_type = RTM_GET; -- rtm->rtm_addrs = RTA_DST; -- rtm->rtm_pid = pid = getpid(); -- rtm->rtm_seq = SEQ; -- -- sa = (struct sockaddr *) (rtm + 1); -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_family = AF_INET; -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_addr = destaddr; -- /* LINTED pointer casts may be troublesome */ -- TOIN(sa)->sin_port = htons(0); -- -- /*=========================================================== -- * Send the request and get the response. -- *==========================================================*/ -- if (write(sockfd, rtm, (size_t)rtm->rtm_msglen) != rtm->rtm_msglen) { -- swarn("%s: write() to AF_ROUTE failed", function); -+ if (read(sockfd, rtm, sizeof(buf)) == -1) { -+ swarn("%s: read from AF_ROUTE failed", function); - close(sockfd); - return inaddr_none; - } -+ } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != SEQ -+ || rtm->rtm_pid != pid); - -- do { -- if (read(sockfd, rtm, sizeof(buf)) == -1) { -- swarn("%s: read from AF_ROUTE failed", function); -+ /*================================================================ -+ * Iterate over the address structure extracting only the relevant -+ * addresses. -+ *===============================================================*/ -+ cp = (char *) (rtm + 1); -+ sa = (struct sockaddr *) cp; -+ -+ for (i=0; (i < RTAX_MAX) && (cp < buf + sizeof(buf)); i++) { -+ switch (i) { -+ case RTAX_GATEWAY: -+ if (!(rtm->rtm_addrs & RTA_GATEWAY)) { -+ slog(LOG_DEBUG, "%s: can't find gateway for %s, using defaultexternal", -+ function, inet_ntoa(destaddr)); - close(sockfd); -- return inaddr_none; -+ return getdefaultexternal(); - } -- } while (rtm->rtm_type != RTM_GET || rtm->rtm_seq != SEQ -- || rtm->rtm_pid != pid); -- -- /*============================================================ -- * Go straight to the RTA_GATEWAY entry for our info. -- *===========================================================*/ -- sa = (struct sockaddr *) (rtm + 1); -- -- if (!(rtm->rtm_addrs & RTA_GATEWAY) -- || (sa += RTAX_GATEWAY) == NULL -- || TOIN(sa)->sin_family != AF_INET) { -- slog(LOG_DEBUG, "%s: can't find gateway for %s, using defaultexternal", -- function, inet_ntoa(destaddr)); -- close(sockfd); -- return getdefaultexternal(); -+ break; -+ case RTAX_IFA: -+ if (!(rtm->rtm_addrs & RTA_IFA) -+ || TOIN(sa)->sin_family != AF_INET) { -+ slog(LOG_DEBUG, "%s: can't find ifa for %s, using defaultexternal", -+ function, inet_ntoa(destaddr)); -+ close(sockfd); -+ return getdefaultexternal(); -+ } -+ else { -+ memcpy((void*)&ifa, (void*)sa, sa->sa_len); -+ } -+ break; -+ } -+ if (rtm->rtm_addrs & (1<<i)) { -+ ADVANCE(cp, sa); -+ sa = (struct sockaddr *)cp; - } -+#undef ROUNDUP -+#undef ADVANCE - -- gwaddr.s_addr = destaddr.s_addr; -- destaddr.s_addr = TOIN(sa)->sin_addr.s_addr; -- } while (destaddr.s_addr != gwaddr.s_addr); -+ } - - close(sockfd); - -- if (!isonexternal(sa)) { -+ if (!isonexternal(&ifa)) { - char a[MAXSOCKADDRSTRING]; - - swarnx("%s: address %s selected, but not set for external interface", -- function, sockaddr2string(sa, a, sizeof(a))); -+ function, sockaddr2string(&ifa, a, sizeof(a))); - - return getdefaultexternal(); - } - - /* LINTED pointer casts may be troublesome */ -- return TOIN(sa)->sin_addr; -+ return TOIN(&ifa)->sin_addr; - } - - #else /* HAVE_ROUTEINFO_BSD */ -@@ -393,7 +436,7 @@ - struct sockaddr check; - int match = 0; - -- switch ((*sockscf.external.addrv).atype) { -+ switch (sockscf.external.addrv[i].atype) { - case SOCKS_ADDR_IFNAME: { - int ifi; - |