source:
npl/overig/nstx/nstx_1.1-beta6-4.diff
Last change on this file was c5c522c, checked in by , 8 years ago | |
---|---|
|
|
File size: 24.2 KB |
-
nstx-1.1-beta6
old new 1 CFLAGS += -ggdb -Wall -Werror 1 CFLAGS += -ggdb -Wall -Werror -Wsign-compare 2 2 3 3 NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c 4 4 NSTXD_OBJS = ${NSTXD_SRCS:.c=.o} -
nstx-1.1-beta6
old new 6 6 #include <fcntl.h> 7 7 #include <syslog.h> 8 8 #include <unistd.h> 9 #include <assert.h> 9 10 10 11 #include "nstxfun.h" 11 12 #include "nstxdns.h" … … 58 59 * DNS-packet 'msg'. */ 59 60 60 61 static char * 61 decompress_label(const char *msg, int msglen, const char *lbl)62 decompress_label(const char *msg, unsigned int msglen, const char *lbl) 62 63 { 63 64 const char *ptr = lbl; 64 65 char *buf; … … 69 70 70 71 while ((chunklen = *ptr)) { 71 72 if (chunklen > 63) { 72 if ((ptr-msg) >= ( msglen-1)) {73 if ((ptr-msg) >= ((signed int)msglen-1)) { 73 74 DEBUG("Bad pointer at end of msg"); 74 75 if (buf) 75 76 free(buf); … … 104 105 ptr += chunklen + 1; 105 106 } 106 107 } 107 buf[buflen] = 0; 108 buflen++; 108 if (buf) { 109 buf[buflen] = 0; 110 buflen++; 111 } 109 112 return buf; 110 113 } 111 114 112 115 static const unsigned char * 113 _cstringify(const unsigned char *data, int *dlen, int clen)116 _cstringify(const unsigned char *data, int *dlen, unsigned int clen) 114 117 { 115 118 static unsigned char *buf; 116 119 … … 143 146 { 144 147 int len; 145 148 146 len = strlen( data);149 len = strlen((char*)data); 147 150 return _cstringify(data, &len, 63); 148 151 } 149 152 … … 183 186 static const unsigned char * 184 187 lbl2data (const unsigned char *data, size_t len) 185 188 { 186 static unsigned char *buf; 187 189 static signed char *buf = NULL; 188 190 const unsigned char *s = data; 189 unsigned char *d;190 unsigned int llen;191 signed char *d; 192 signed int llen; 191 193 192 194 d = buf = realloc(buf, len); 195 assert(d); 193 196 do 194 197 { 195 198 llen = *s++; 196 if ((llen > 63) || (llen > len - (s - data)))197 return NULL;199 if ((llen > 63) || (llen > (signed int)(len - (s - data)))) 200 break; 198 201 memcpy(d, s, llen); 199 202 s += llen; 200 203 d += llen; 201 204 } while (llen); 202 205 *d = '\0'; 203 return buf;206 return (const unsigned char*)buf; 204 207 } 205 208 206 209 /* New DNS-Code */ … … 318 321 const char *ptr; 319 322 static char *fqdn; 320 323 321 ptr = data2lbl(data);324 ptr = (char*)data2lbl((unsigned char*)data); 322 325 fqdn = realloc(fqdn, strlen(ptr)+strlen(suffix)+1); 323 326 strcpy(fqdn, ptr); 324 327 strcat(fqdn, suffix); … … 336 339 free(buf); 337 340 338 341 off = strstr(fqdn, suffix); 339 if (off) 340 buf = strdup(lbl2data(fqdn, off - fqdn)); 342 /* only parse if the fqdn was found, and there is more than the fqdn */ 343 if (off && off != fqdn) 344 buf = strdup((char*)lbl2data((unsigned char*)fqdn, off - fqdn)); 341 345 else 342 346 /* Our suffix not found... */ 343 347 buf = NULL; … … 364 368 const char *ptr; 365 369 char *buf; 366 370 367 ptr = data2txt(data, &len);371 ptr = (char*)data2txt((unsigned char*)data, &len); 368 372 buf = malloc(len); 369 373 memcpy(buf, ptr, len); 370 374 … … 477 481 { 478 482 offsets[i++] = ptr - buf; 479 483 rrp = _new_listitem(&pkt->query); 480 rrp->data = decompress_label( buf, len,ptr);484 rrp->data = decompress_label((char*)buf, len, (char*)ptr); 481 485 if (!rrp->data) 482 486 { 483 487 syslog(LOG_ERR, "dns_extractpkt: decompress_label choked in qd\n"); … … 517 521 if (j < i) 518 522 rrp->link = j; 519 523 } 520 ptr = _skip_lbl(ptr, &remain); 521 rrp->len = ptr[8]*256+ptr[9]; 524 // ptr = _skip_lbl(ptr, &remain); 525 // rrp->len = ptr[8]*256+ptr[9]; 526 rrp->len = ptr[10]*256+ptr[11]; 522 527 ptr += 12; 523 528 remain -= 12; 524 529 if (remain < rrp->len) -
nstx_encode.c
old new 30 30 31 31 void init_revmap (void) 32 32 { 33 int i;33 unsigned int i; 34 34 35 35 revmap = malloc(256); 36 36 37 for (i = 0; i < strlen( map); i++)37 for (i = 0; i < strlen((char*)map); i++) 38 38 revmap[map[i]] = i; 39 39 } 40 40 … … 70 70 if (!revmap) 71 71 init_revmap(); 72 72 73 len = strlen( data)-1;74 73 len = strlen((char*)data); 74 75 75 buf = realloc(buf, ((len+3)/4)*3); 76 76 77 while (off < len) {77 while (off+3 < len) { 78 78 buf[i+0] = (revmap[data[off]]<<2)|((revmap[data[off+1]]&48)>>4); 79 79 buf[i+1] = ((revmap[data[off+1]]&15)<<4)|((revmap[data[off+2]]&60)>>2); 80 80 buf[i+2] = ((revmap[data[off+2]]&3)<<6)|(revmap[data[off+3]]); -
nstx_pstack.c
old new 49 49 char *netpacket; 50 50 int netpacketlen; 51 51 52 if ((!ptr) || len <sizeof(struct nstxhdr))52 if ((!ptr) || (signed int) len < (signed int) sizeof(struct nstxhdr)) 53 53 return; 54 54 55 55 if (!nstxpkt->id) -
nstx_tuntap.c
old new 215 215 216 216 struct nstxmsg *nstx_select (int timeout) 217 217 { 218 intpeerlen;218 unsigned peerlen; 219 219 fd_set set; 220 220 struct timeval tv; 221 221 static struct nstxmsg *ret = NULL; -
nstx-1.1-beta6
old new 63 63 int main (int argc, char * argv[]) { 64 64 struct nstxmsg *msg; 65 65 const char *device = NULL; 66 charch;66 int ch; 67 67 68 68 nsid = time(NULL); 69 69 … … 110 110 const char *data; 111 111 int datalen; 112 112 113 pkt = dns_extractpkt ( reply, len);113 pkt = dns_extractpkt ((unsigned char*)reply, len); 114 114 if (!pkt) 115 115 return; 116 116 while ((data = dns_getanswerdata(pkt, &datalen))) { 117 data = txt2data(data, &datalen);117 data = (char*)txt2data((unsigned char*)data, &datalen); 118 118 nstx_handlepacket (data, datalen, &sendtun); 119 119 } 120 120 dequeueitem(pkt->id); … … 159 159 data += l; 160 160 datalen -= l; 161 161 162 dns_addquery(pkt, dns_data2fqdn(nstx_encode( p, sizeof(nh)+l)));162 dns_addquery(pkt, dns_data2fqdn(nstx_encode((unsigned char*)p, sizeof(nh)+l))); 163 163 free(p); 164 p = dns_constructpacket(pkt, &l);164 p = (char*)dns_constructpacket(pkt, &l); 165 165 sendns(p, l, NULL); 166 166 free(p); 167 167 -
nstx-1.1-beta6
old new 67 67 } 68 68 69 69 int main (int argc, char *argv[]) { 70 charch;70 signed char ch; 71 71 const char *device = NULL, *dir = NULL; 72 72 in_addr_t bindto = INADDR_ANY; 73 73 uid_t uid = 0; … … 172 172 dns_setid(pkt, q->id); 173 173 dns_settype(pkt, DNS_RESPONSE); 174 174 dns_addanswer(pkt, "\xb4\x00\x00\x00", 4, dns_addquery(pkt, q->name)); 175 buf = dns_constructpacket (pkt, &len);175 buf = (char*)dns_constructpacket (pkt, &len); 176 176 sendns(buf, len, &q->peer); 177 177 free(buf); 178 178 } … … 188 188 189 189 if (msg) { 190 190 if (msg->src == FROMNS) { 191 pkt = dns_extractpkt( msg->data, msg->len);191 pkt = dns_extractpkt((unsigned char*)msg->data, msg->len); 192 192 if (pkt) 193 193 { 194 194 name = dns_getquerydata(pkt); … … 198 198 name); 199 199 queueitem(pkt->id, name, &msg->peer); 200 200 if ((data = dns_fqdn2data(name)) && 201 (buf = nstx_decode( data, &len)))201 (buf = nstx_decode((unsigned char*)data, &len))) 202 202 { 203 203 nstx_handlepacket(buf, len, &sendtun); 204 204 } … … 220 220 len = dns_getfreespace(pkt, DNS_RESPONSE); 221 221 buf = dequeue_senditem(&len); 222 222 dns_addanswer(pkt, buf, len, link); 223 buf = dns_constructpacket(pkt, &len);223 buf = (char*)dns_constructpacket(pkt, &len); 224 224 sendns(buf, len, &qitem->peer); 225 225 } 226 226 timeoutqueue(do_timeout); -
debian/nstx.postinst
old new 1 #!/bin/sh 2 3 set -e 4 5 case "$1" in 6 configure) 7 adduser --quiet --system --home /var/run/nstxd nstxd 8 ;; 9 10 abort-upgrade|abort-remove|abort-deconfigure) 11 12 ;; 13 14 *) 15 echo "postinst called with unknown argument \`$1'" >&2 16 exit 1 17 ;; 18 esac 19 20 #DEBHELPER# 21 -
debian/changelog
old new 1 nstx (1.1-beta6-4) unstable; urgency=low 2 3 * Fix segfault triggered by normal DNS traffic (closes: #345159) 4 5 -- Matthew Garrett <mjg59@srcf.ucam.org> Wed, 18 Jan 2006 21:10:26 +0000 6 7 nstx (1.1-beta6-3) unstable; urgency=low 8 9 * Apply patch to fix crashes when looking up the tunnel domain 10 (closes: #307489) 11 * Allow the tunnel being brought up to be configured (closes: #334073) 12 * Attempt to automatically grab a DNS server (closes: #307769) 13 * Add NSTX_IFACE string in /etc/default/nstx to allow binding to a 14 specific interface on nstxd startup (closes: #299435) 15 16 -- Matthew Garrett <mjg59@srcf.ucam.org> Mon, 12 Dec 2005 19:28:09 +0000 17 18 nstx (1.1-beta6-2.1) unstable; urgency=high 19 20 * Non-maintainer upload. 21 * nstxcd.c: changed the variable ch to be an int instead of a char, since 22 that is what it must be when it gets the return value from getopt. 23 Closes: #306265 (which is release critical, hence a high severity). 24 25 -- Lars Wirzenius <liw@iki.fi> Thu, 28 Apr 2005 19:39:00 +0300 26 27 nstx (1.1-beta6-2) unstable; urgency=low 28 29 * don't cast things to signed chars if you want numbers greater than 128 30 (closes: #302874) 31 * fix FTBFS with gcc 4.0 (thanks to Andreas Jochens for the patch) 32 (closes: #300878) 33 * don't assume chars are signed 34 35 -- Matthew Garrett <mjg59@srcf.ucam.org> Sun, 3 Apr 2005 16:36:20 +0100 36 37 nstx (1.1-beta6-1) unstable; urgency=high 38 39 * new upstream release 40 * allow binding to a specific interface (closes: #272850) 41 * major stability improvements, upgrade recommended 42 43 -- Matthew Garrett <mjg59@srcf.ucam.org> Mon, 7 Mar 2005 01:52:10 +0000 44 45 nstx (1.1-beta5-6) unstable; urgency=high 46 47 * initialise variables that are going to be used (closes: #277293) 48 * compile with -W, fix up signed/unsigned comparisons (closes: #277296) 49 * fix restart bug in nstxd init script (closes: #277319) 50 * add a length check to nstx_decode, so we don't try to decode packets 51 that are too short (closes: #277334) 52 * bump the debhelper build-depends to reflect the requirement for --name 53 in dh_installinit (closes: #277295) 54 55 -- Matthew Garrett <mjg59@srcf.ucam.org> Tue, 19 Oct 2004 23:13:05 +0100 56 57 nstx (1.1-beta5-5) unstable; urgency=high 58 59 * Make sure that packet length is compared against a signed int, rather 60 than an unsigned size_t. I haven't managed to track down what causes 61 this in the first place, but nstxd sessions seem to crash with 62 moderate regularity even when they're not being used. At a guess there's 63 some sort of DNS probing going on that upsets it (closes: #259079) 64 65 -- Matthew Garrett <mjg59@srcf.ucam.org> Mon, 17 Aug 2004 18:20:05 +0100 66 67 nstx (1.1-beta5-4) unstable; urgency=low 68 69 * Depend on adduser (closes: #263334) 70 71 -- Matthew Garrett <mjg59@srcf.ucam.org> Mon, 19 Jul 2004 16:38:44 +0100 72 73 nstx (1.1-beta5-3) unstable; urgency=low 74 75 * Generate an unprivileged user. chroot and drop privileges on daemon 76 startup. 77 * Revert nstxcd code to 1.1-beta 4 - working with bind seems preferable 78 to working with djbdns (closes: #259057) 79 80 -- Matthew Garrett <mjg59@srcf.ucam.org> Mon, 19 Jul 2004 16:38:44 +0100 81 82 nstx (1.1-beta5-2) unstable; urgency=low 83 84 * ifdown tun0 on stop 85 86 -- Matthew Garrett <mjg59@srcf.ucam.org> Sat, 10 Jul 2004 19:11:33 +0100 87 88 nstx (1.1-beta5-1) unstable; urgency=low 89 90 * New upstream version 91 * Compile with -O2 (Closes: #255143) 92 * Don't claim to have failed when startup is disabled 93 * Fix segfault on zero-length queries 94 95 -- Matthew Garrett <mjg59@srcf.ucam.org> Sat, 10 Jul 2004 18:37:43 +0100 96 97 nstx (1.1-beta4-1) unstable; urgency=low 98 99 * Initial Release. 100 101 -- Matthew Garrett <mjg59@srcf.ucam.org> Thu, 27 May 2004 16:41:12 +0100 102 -
debian/compat
old new 1 4 -
nstx-1.1-beta6
old new 1 usr/bin 2 usr/sbin -
debian/nstx.nstxd.init
old new 1 #! /bin/sh 2 # 3 # /etc/init.d/nstxd: start and stop the nstx IP over DNS daemon 4 5 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 6 DAEMON=/usr/sbin/nstxd 7 NAME=nstxd 8 DESC=nstxd 9 NSTX_OPTIONS="-C /var/run/nstxd -u nstxd" 10 11 test -x $DAEMON || exit 0 12 13 # Include nstx defaults if available 14 if [ -f /etc/default/nstx ] ; then 15 . /etc/default/nstx 16 fi 17 18 set -e 19 20 check_start_nstxd_option() { 21 if [ ! "$start_nstxd" = "yes" ]; then 22 echo "Not starting nstx daemon, disabled via /etc/default/nstx" 23 return 1 24 else 25 return 0 26 fi 27 } 28 29 30 case "$1" in 31 start) 32 if check_start_nstxd_option; then 33 echo -n "Starting $DESC: " 34 if [ -n "$NSTX_IFACE" ]; then 35 OPTIONS="-i $NSTX_IFACE $NSTX_OPTIONS $NSTX_DOMAIN" 36 else 37 OPTIONS="$NSTX_OPTIONS $NSTX_DOMAIN" 38 fi 39 start-stop-daemon --start -b -m --quiet --pidfile /var/run/$NAME.pid \ 40 --exec $DAEMON -- $OPTIONS 41 sleep 1; 42 if [ -n "$ifup_tun" ]; then 43 ifup "$ifup_tun" 44 fi 45 # for backward compatibility 46 if [ "$ifup_tun0" = "yes" ]; then 47 ifup tun0 48 fi 49 echo "$NAME." 50 else 51 RET=1 52 fi 53 ;; 54 stop) 55 echo -n "Stopping $DESC: " 56 if [ -n "$ifup_tun" ]; then 57 ifdown "$ifup_tun" 58 fi 59 # for backward compatibility 60 if [ "$ifup_tun0" = "yes" ]; then 61 ifdown tun0 62 fi 63 start-stop-daemon --stop --quiet -m -o --pidfile /var/run/$NAME.pid \ 64 --exec $DAEMON 65 echo "$NAME." 66 ;; 67 restart|force-reload) 68 # 69 # If the "reload" option is implemented, move the "force-reload" 70 # option to the "reload" entry above. If not, "force-reload" is 71 # just the same as "restart". 72 # 73 echo -n "Restarting $DESC: " 74 if [ -n "$ifup_tun" ]; then 75 ifdown "$ifup_tun" 76 fi 77 # for backward compatibility 78 if [ "$ifup_tun0" = "yes" ]; then 79 ifdown tun0 80 fi 81 start-stop-daemon --stop -m -o --quiet --pidfile \ 82 /var/run/$NAME.pid --exec $DAEMON 83 sleep 1 84 if check_start_nstxd_option; then 85 start-stop-daemon --start -b -m --quiet --pidfile \ 86 /var/run/$NAME.pid --exec $DAEMON -- $NSTX_OPTIONS $NSTX_DOMAIN 87 sleep 1; 88 if [ -n "$ifup_tun" ]; then 89 ifup "$ifup_tun" 90 fi 91 # for backward compatibility 92 if [ "$ifup_tun0" = "yes" ]; then 93 ifup tun0 94 fi 95 echo "$NAME." 96 else 97 RET=1 98 fi 99 ;; 100 *) 101 N=/etc/init.d/$NAME 102 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 103 echo "Usage: $N {start|stop|restart|force-reload}" >&2 104 exit 1 105 ;; 106 esac 107 108 exit 0 -
debian/nstx.nstxcd.init
old new 1 #! /bin/sh 2 # 3 # /etc/init.d/nstxcd: start and stop the nstx IP over DNS client 4 5 PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 6 DAEMON=/usr/sbin/nstxcd 7 NAME=nstxcd 8 DESC=nstxcd 9 10 test -x $DAEMON || exit 0 11 12 # Include nstx defaults if available 13 if [ -f /etc/default/nstx ] ; then 14 . /etc/default/nstx 15 fi 16 17 set -e 18 19 check_start_nstxcd_option() { 20 if [ ! "$start_nstxcd" = "yes" ]; then 21 echo "Not starting nstx client, disabled via /etc/default/nstx" 22 return 1 23 else 24 return 0 25 fi 26 } 27 28 29 case "$1" in 30 start) 31 if check_start_nstxcd_option; then 32 echo -n "Starting $DESC: " 33 start-stop-daemon --start -b -m --quiet --pidfile /var/run/$NAME.pid \ 34 --exec $DAEMON -- $NSTX_DOMAIN $NSTX_DNS_SERVER 35 sleep 1; 36 if [ -n "$ifup_tun" ]; then 37 ifup "$ifup_tun" 38 fi 39 # for backward compatibility 40 if [ "$ifup_tun0" = "yes" ]; then 41 ifup tun0 42 fi 43 echo "$NAME." 44 else 45 RET=1 46 fi 47 ;; 48 stop) 49 echo -n "Stopping $DESC: " 50 if [ -n "$ifup_tun" ]; then 51 ifdown "$ifup_tun" 52 fi 53 # for backward compatibility 54 if [ "$ifup_tun0" = "yes" ]; then 55 ifdown tun0 56 fi 57 start-stop-daemon --stop -m -o --quiet --pidfile /var/run/$NAME.pid \ 58 --exec $DAEMON 59 echo "$NAME." 60 ;; 61 restart|force-reload) 62 # 63 # If the "reload" option is implemented, move the "force-reload" 64 # option to the "reload" entry above. If not, "force-reload" is 65 # just the same as "restart". 66 # 67 echo -n "Restarting $DESC: " 68 if [ -n "$ifup_tun" ]; then 69 ifdown "$ifup_tun" 70 fi 71 # for backward compatibility 72 if [ "$ifup_tun0" = "yes" ]; then 73 ifdown tun0 74 fi 75 start-stop-daemon --stop -m -o --quiet --pidfile \ 76 /var/run/$NAME.pid --exec $DAEMON 77 sleep 1 78 if check_start_nstxcd_option; then 79 start-stop-daemon --start -b -m --quiet --pidfile \ 80 /var/run/$NAME.pid --exec $DAEMON -- $NSTX_DOMAIN $NSTX_DNS_SERVER 81 sleep 1; 82 if [ -n "$ifup_tun" ]; then 83 ifup "$ifup_tun" 84 fi 85 # for backward compatibility 86 if [ "$ifup_tun0" = "yes" ]; then 87 ifup tun0 88 fi 89 echo "$NAME." 90 else 91 RET=1 92 fi 93 ;; 94 *) 95 N=/etc/init.d/$NAME 96 # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2 97 echo "Usage: $N {start|stop|restart|force-reload}" >&2 98 exit 1 99 ;; 100 esac 101 102 exit 0 -
debian/control
old new 1 Source: nstx 2 Section: net 3 Priority: optional 4 Maintainer: Matthew Garrett <mjg59@srcf.ucam.org> 5 Build-Depends: debhelper (>= 4.1.68) 6 Standards-Version: 3.6.0 7 8 Package: nstx 9 Architecture: any 10 Depends: ${shlibs:Depends}, ${misc:Depends}, adduser 11 Description: Tunnel IP over DNS 12 nstx allows you to pass IP packets via DNS queries. This allows you to use 13 standard network protocols when otherwise only DNS would be available. -
nstx-1.1-beta6
old new 1 #!/usr/bin/make -f 2 # -*- makefile -*- 3 # Sample debian/rules that uses debhelper. 4 # GNU copyright 1997 to 1999 by Joey Hess. 5 6 # Uncomment this to turn on verbose mode. 7 #export DH_VERBOSE=1 8 9 10 11 12 CFLAGS = -Wall -g 13 14 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) 15 CFLAGS += -O0 16 else 17 CFLAGS += -O2 18 endif 19 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) 20 INSTALL_PROGRAM += -s 21 endif 22 23 configure: configure-stamp 24 configure-stamp: 25 dh_testdir 26 # Add here commands to configure the package. 27 28 touch configure-stamp 29 30 31 build: build-stamp 32 33 build-stamp: configure-stamp 34 dh_testdir 35 36 # Add here commands to compile the package. 37 $(MAKE) 38 #/usr/bin/docbook-to-man debian/nstx.sgml > nstx.1 39 40 touch build-stamp 41 42 clean: 43 dh_testdir 44 dh_testroot 45 rm -f build-stamp configure-stamp 46 47 # Add here commands to clean up after the build process. 48 -$(MAKE) clean 49 50 dh_clean 51 52 install: build 53 dh_testdir 54 dh_testroot 55 dh_clean -k 56 dh_installdirs 57 58 # Add here commands to install the package into debian/nstx. 59 install nstxd -D $(CURDIR)/debian/nstx/usr/sbin/nstxd 60 install nstxcd -D $(CURDIR)/debian/nstx/usr/sbin/nstxcd 61 62 # Build architecture-independent files here. 63 binary-indep: build install 64 # We have nothing to do by default. 65 66 # Build architecture-dependent files here. 67 binary-arch: build install 68 dh_testdir 69 dh_testroot 70 dh_installchangelogs Changelog 71 dh_installdocs 72 dh_installexamples 73 # dh_install 74 # dh_installmenu 75 # dh_installdebconf 76 # dh_installlogrotate 77 # dh_installemacsen 78 # dh_installpam 79 # dh_installmime 80 dh_installinit 81 dh_installinit --name=nstxd 82 dh_installinit --name=nstxcd 83 # dh_installcron 84 # dh_installinfo 85 dh_installman 86 dh_link 87 dh_strip 88 dh_compress 89 dh_fixperms 90 # dh_perl 91 # dh_python 92 # dh_makeshlibs 93 dh_installdeb 94 dh_shlibdeps 95 dh_gencontrol 96 dh_md5sums 97 dh_builddeb 98 99 binary: binary-indep binary-arch 100 .PHONY: build clean binary-indep binary-arch binary install configure -
debian/nstx.manpages
old new 1 nstxd.8 2 nstxcd.8 -
debian/README.Debian
old new 1 nstx for Debian 2 --------------- 3 4 This package requires the tun driver to be loaded. As a result, you need 5 CONFIG_TUN to be either y or m in your kernel configuration. In order to 6 start things automatically, you need to configure /etc/default/nstx 7 8 Security note 9 ------------- 10 11 nstx includes no authentication. Anyone who knows the name of your tunnel 12 domain will be able to connect to the daemon. 13 14 djbdns 15 ------ 16 17 nstx will allegedly not work with a djbdns server. If you want to try 18 it, the following patch should make it work: 19 20 --- nstx_dns.old.c 2004-08-17 18:13:26.000000000 +0100 21 +++ nstx_dns.c 2004-08-17 18:13:12.000000000 +0100 22 @@ -598,9 +598,8 @@ 23 if (j < i) 24 rrp->link = j; 25 } 26 - // ptr = _skip_lbl(ptr, &remain); 27 - // rrp->len = ptr[8]*256+ptr[9]; 28 - rrp->len = ptr[10]*256+ptr[11]; 29 + ptr = _skip_lbl(ptr, &remain); 30 + rrp->len = ptr[8]*256+ptr[9]; 31 ptr += 12; 32 remain -= 12; 33 if (remain < rrp->len) 34 35 It's not included by default because it appears to break the nstx 36 client with bind9 servers. To apply it: 37 38 apt-get source nstx 39 cd nstx-* 40 patch <debian/README.Debian 41 dpkg-buildpackage -rfakeroot 42 43 -- Matthew Garrett <mjg59@srcf.ucam.org>, Thu, 27 May 2004 16:41:12 +0100 -
debian/nstx.default
old new 1 # Defaults for nstx initscript 2 # sourced by /etc/init.d/nstx 3 # installed at /etc/default/nstx by the maintainer scripts 4 5 # 6 # This is a POSIX shell fragment 7 # 8 9 # The name of the domain for the tunnel - needed for client and server 10 NSTX_DOMAIN="" 11 12 # The IP address of the DNS server - needed for client only 13 NSTX_DNS_SERVER=`grep nameserver /etc/resolv.conf |head -1|awk '{print $2}'` 14 15 # uncomment to start nstxd on system startup 16 #start_nstxd=yes 17 18 # uncomment to start nstxcd on system startup 19 #start_nstxcd=yes 20 21 # uncomment to bring up tun0 automatically 22 #ifup_tun=tun0 23 24 # uncomment to tell nstx to bind to a specific interface 25 #NSTX_IFACE="1.2.3.4" -
debian/copyright
old new 1 This package was debianized by Matthew Garrett <mjg59@srcf.ucam.org> on 2 Thu, 27 May 2004 16:41:12 +0100. 3 4 It was downloaded from http://nstx.dereference.de/nstx/ 5 6 Upstream Authors: 7 8 Florian Heinz <sky@sysv.de> 9 Julien Oster <frodo@sysv.de> 10 11 12 Copyright: 13 14 nstx is released under the terms of the GNU General Public License version 2 15 16 On Debian systems, the complete text of the GNU General Public 17 License can be found in the file '/usr/share/common-licenses/GPL' 18 -
nstx-1.1-beta6
old new 1 README -
nstx-1.1-beta6
old new 1 .TH NSTXCD "8" "May 2004" "nstx 1.1-beta4" "User Commands" 2 .SH NAME 3 nstxcd \- IP over DNS tunneling client 4 5 .SH SYNOPSIS 6 .B "nstxcd \fIDOMAIN\fR \fIIPADDRESS\fR" 7 8 .SH DESCRIPTION 9 .B nstxcd 10 tunnels IP packets over DNS, allowing them to be sent to a server without 11 any protocols other than DNS being used. 12 13 .SH OPTIONS 14 .B nstxcd 15 takes the following options: 16 .IP "domain" 17 The domain that nstxcd will send requests to. This domain must be delegated 18 to a machine that is running nstxd. 19 .IP "IP address" 20 The IP address of a DNS server that can be reached from the current machine. 21 22 .SH USAGE 23 .Bnstxcd 24 should be run against a domain that has been delegated to a machine running 25 nstxd. It will then take any packets that are sent to the tun0 interface and 26 send them over DNS to the other tunnel endpoint. Responses will appear on 27 the tun0 interface. 28 29 .SH AUTHORS 30 31 .IP 32 Florian Heinz <sky@sysv.de> 33 .IP 34 Julien Oster <frodo@sysv.de> 35 .IP 36 http://nstx.dereference.de/nstx/ -
nstx-1.1-beta6
old new 1 .TH NSTXD "7" "Mar 2005" "nstx 1.1-beta6" "User Commands" 2 .SH NAME 3 nstxd \- IP over DNS tunneling daemon 4 5 .SH SYNOPSIS 6 .B "nstxd \fIOPTION\fR \fIDOMAIN\fR" 7 8 .SH DESCRIPTION 9 .B nstxd 10 listens for well formed DNS requests and translates them into IP packets. 11 Responses are sent in the form of DNS replies. This allows clients to 12 tunnel IP packets over the DNS protocol. 13 14 .SH OPTIONS 15 .B nstxd 16 takes the following option: 17 .IP \-d tun-device 18 Use this tun device instead of tun0 19 .IP \-i ipaddr 20 Bind to this IP address rather than every available address 21 .IP \-C dir 22 Chroot to this directory on startup 23 .IP \-D 24 Daemonize on startup 25 .IP \-g 26 Switch on debug messages 27 .IP \-u user 28 Run as the following user 29 .IP "domain" 30 The domain that nstxd will listen to requests for. This should be a domain 31 that is delegated to the machine running nstxd. 32 33 .SH USAGE 34 A domain should be delegated to the machine that will run nstxd. nstxd should 35 then be run giving that domain as the only argument. nstxd will then listen 36 for requests and translate them into IP packets that will appear on the tun0 37 interface. Packets sent to the tun0 interface will be transferred back to 38 the client as DNS answers. 39 40 .SH AUTHORS 41 42 .IP 43 Florian Heinz <sky@sysv.de> 44 .IP 45 Julien Oster <frodo@sysv.de> 46 .IP 47 http://nstx.dereference.de/nstx/
Note: See TracBrowser
for help on using the repository browser.