diff -urN ucspi-tcp.old/Makefile ucspi-tcp/Makefile --- ucspi-tcp.old/Makefile Fri Feb 21 22:28:55 2003 +++ ucspi-tcp/Makefile Thu Sep 9 12:03:00 2004 @@ -30,6 +30,17 @@ SCRIPTS_ENV= BINOWN="${BINOWN}" BINGRP="${BINGRP}" BINMODE="${BINMODE}" \ MANMODE="${MANMODE}" CFLAGS="${CFLAGS}" +OPTIONS= IPV6 "IPv6 support" off + +.include + +.if defined(WITH_IPV6) +PATCH_SITES+= http://www.fefe.de/ucspi/:ipv6 +PATCHFILES+= ucspi-tcp-0.88-ipv6.diff14.bz2:ipv6 +PATCH_DIST_STRIP+= -p1 +EXTRA_PATCHES+= ${PATCHDIR}/ipv6-errno.patch +.endif + post-configure: @${ECHO_CMD} ${PREFIX} > ${WRKSRC}/conf-home @${ECHO_CMD} ${CC} ${CFLAGS} > ${WRKSRC}/conf-cc @@ -46,4 +57,4 @@ @cd ${WRKSRC}-man; ${INSTALL_MAN} ${MAN1} ${PREFIX}/man/man1/ .endif -.include +.include diff -urN ucspi-tcp.old/distinfo ucspi-tcp/distinfo --- ucspi-tcp.old/distinfo Thu Aug 22 04:51:13 2002 +++ ucspi-tcp/distinfo Thu Sep 9 11:34:40 2004 @@ -1,2 +1,6 @@ MD5 (ucspi-tcp-0.88.tar.gz) = 39b619147db54687c4a583a7a94c9163 +SIZE (ucspi-tcp-0.88.tar.gz) = 53019 MD5 (ucspi-tcp-0.88-man.tar.gz) = d33160cbd43bccbc0963d0499dfcebdb +SIZE (ucspi-tcp-0.88-man.tar.gz) = 7562 +MD5 (ucspi-tcp-0.88-ipv6.diff14.bz2) = 67de66745001ddb48563a1d4e92262c2 +SIZE (ucspi-tcp-0.88-ipv6.diff14.bz2) = 21917 diff -urN ucspi-tcp.old/files/ipv6-errno.patch ucspi-tcp/files/ipv6-errno.patch --- ucspi-tcp.old/files/ipv6-errno.patch Thu Jan 1 09:00:00 1970 +++ ucspi-tcp/files/ipv6-errno.patch Thu Sep 9 12:07:39 2004 @@ -0,0 +1,108 @@ +diff -urN dns_dfd.c dns_dfd.c +--- dns_dfd.c Thu Sep 9 11:35:49 2004 ++++ dns_dfd.c Thu Sep 9 11:37:20 2004 +@@ -1,5 +1,5 @@ + #include +-#include ++#include "error.h" + #include "byte.h" + #include "dns.h" + +@@ -12,7 +12,7 @@ + char ch; + char *x; + +- errno = EPROTO; ++ errno = error_proto; + + for (;;) { + if (!n) break; +diff -urN dns_packet.c dns_packet.c +--- dns_packet.c Thu Sep 9 11:35:50 2004 ++++ dns_packet.c Thu Sep 9 11:37:58 2004 +@@ -2,13 +2,13 @@ + DNS should have used LZ77 instead of its own sophomoric compression algorithm. + */ + +-#include ++#include "error.h" + #include "dns.h" + + unsigned int dns_packet_copy(const char *buf,unsigned int len,unsigned int pos,char *out,unsigned int outlen) + { + while (outlen) { +- if (pos >= len) { errno = EPROTO; return 0; } ++ if (pos >= len) { errno = error_proto; return 0; } + *out = buf[pos++]; + ++out; --outlen; + } +@@ -28,7 +28,7 @@ + pos += ch; + } + +- errno = EPROTO; ++ errno = error_proto; + return 0; + } + +@@ -72,6 +72,6 @@ + return pos; + + PROTO: +- errno = EPROTO; ++ errno = error_proto; + return 0; + } +diff -urN dns_transmit.c dns_transmit.c +--- dns_transmit.c Thu Sep 9 11:35:50 2004 ++++ dns_transmit.c Thu Sep 9 12:00:38 2004 +@@ -3,6 +3,7 @@ + #include + #include + #include "socket.h" ++#include "error.h" + #include + #include "byte.h" + #include "uint16.h" +@@ -26,7 +27,7 @@ + if (!dns_packet_copy(buf,len,0,out,12)) return 1; + rcode = out[3]; + rcode &= 15; +- if (rcode && (rcode != 3)) { errno = EAGAIN; return 1; } ++ if (rcode && (rcode != 3)) { errno = error_again; return 1; } + return 0; + } + +@@ -170,7 +171,7 @@ + d->tcpstate = 2; + return 0; + } +- if ((errno == EINPROGRESS) || (errno == EWOULDBLOCK)) { ++ if ((errno == error_inprogress) || (errno == error_wouldblock)) { + d->tcpstate = 1; + return 0; + } +@@ -199,7 +200,7 @@ + unsigned int len; + + dns_transmit_free(d); +- errno = EIO; ++ errno = error_io; + + len = dns_domain_length(q); + d->querylen = len + 18; +@@ -246,12 +247,12 @@ + int r; + int fd; + +- errno = EIO; ++ errno = error_io; + fd = d->s1 - 1; + + if (!x->revents) { + if (taia_less(when,&d->deadline)) return 0; +- errno = ETIMEDOUT; ++ errno = error_timeout; + if (d->tcpstate == 0) return nextudp(d); + return nexttcp(d); + }