source: npl/overig/nstx/nstx_1.1-beta6-4.diff @ 4e011a4

gcc484perl-5.22
Last change on this file since 4e011a4 was c5c522c, checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago

initial commit, transferred from cleaned syn3 svn tree

  • Property mode set to 100644
File size: 24.2 KB
  • nstx-1.1-beta6

    old new  
    1 CFLAGS += -ggdb -Wall -Werror
     1CFLAGS += -ggdb -Wall -Werror -Wsign-compare
    22
    33NSTXD_SRCS = nstxd.c nstx_encode.c nstx_pstack.c nstx_dns.c nstx_tuntap.c nstx_queue.c
    44NSTXD_OBJS = ${NSTXD_SRCS:.c=.o}
  • nstx-1.1-beta6

    old new  
    66#include <fcntl.h>
    77#include <syslog.h>
    88#include <unistd.h>
     9#include <assert.h>
    910
    1011#include "nstxfun.h"
    1112#include "nstxdns.h"
     
    5859 * DNS-packet 'msg'. */
    5960
    6061static char *
    61 decompress_label(const char *msg, int msglen, const char *lbl)
     62decompress_label(const char *msg, unsigned int msglen, const char *lbl)
    6263{
    6364   const char *ptr = lbl;
    6465   char *buf;
     
    6970   
    7071   while ((chunklen = *ptr)) {
    7172      if (chunklen > 63) {
    72          if ((ptr-msg) >= (msglen-1)) {
     73         if ((ptr-msg) >= ((signed int)msglen-1)) {
    7374            DEBUG("Bad pointer at end of msg");
    7475            if (buf)
    7576              free(buf);
     
    104105         ptr += chunklen + 1;
    105106      }
    106107   }
    107    buf[buflen] = 0;
    108    buflen++;
     108   if (buf) {
     109     buf[buflen] = 0;
     110     buflen++;
     111   }
    109112   return buf;
    110113}
    111114
    112115static const unsigned char *
    113 _cstringify(const unsigned char *data, int *dlen, int clen)
     116_cstringify(const unsigned char *data, int *dlen, unsigned int clen)
    114117{
    115118   static unsigned char *buf;
    116119   
     
    143146{
    144147   int len;
    145148   
    146    len = strlen(data);
     149   len = strlen((char*)data);
    147150   return _cstringify(data, &len, 63);
    148151}
    149152
     
    183186static const unsigned char *
    184187lbl2data (const unsigned char *data, size_t len)
    185188{
    186    static unsigned char *buf;
    187    
     189   static signed char *buf = NULL;
    188190   const unsigned char *s = data;
    189    unsigned char *d;
    190    unsigned int llen;
     191   signed char *d;
     192   signed int llen;
    191193   
    192194   d = buf = realloc(buf, len);
     195   assert(d);
    193196   do
    194197     {
    195198        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;
    198201        memcpy(d, s, llen);
    199202        s += llen;
    200203        d += llen;
    201204     } while (llen);
    202205   *d = '\0';
    203    return buf;
     206   return (const unsigned char*)buf;
    204207}
    205208
    206209/* New DNS-Code */
     
    318321   const char *ptr;
    319322   static char *fqdn;
    320323   
    321    ptr = data2lbl(data);
     324   ptr = (char*)data2lbl((unsigned char*)data);
    322325   fqdn = realloc(fqdn, strlen(ptr)+strlen(suffix)+1);
    323326   strcpy(fqdn, ptr);
    324327   strcat(fqdn, suffix);
     
    336339     free(buf);
    337340   
    338341   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));
    341345   else
    342346        /* Our suffix not found... */
    343347        buf = NULL;
     
    364368   const char *ptr;
    365369   char *buf;
    366370   
    367    ptr = data2txt(data, &len);
     371   ptr = (char*)data2txt((unsigned char*)data, &len);
    368372   buf = malloc(len);
    369373   memcpy(buf, ptr, len);
    370374   
     
    477481     {
    478482        offsets[i++] = ptr - buf;
    479483        rrp = _new_listitem(&pkt->query);
    480         rrp->data = decompress_label(buf, len, ptr);
     484        rrp->data = decompress_label((char*)buf, len, (char*)ptr);
    481485        if (!rrp->data)
    482486          {
    483487             syslog(LOG_ERR, "dns_extractpkt: decompress_label choked in qd\n");
     
    517521             if (j < i)
    518522               rrp->link = j;
    519523          }
    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];
    522527        ptr += 12;
    523528        remain -= 12;
    524529        if (remain < rrp->len)
  • nstx_encode.c

    old new  
    3030
    3131void init_revmap (void)
    3232{
    33    int i;
     33   unsigned int i;
    3434   
    3535   revmap = malloc(256);
    3636   
    37    for (i = 0; i < strlen(map); i++)
     37   for (i = 0; i < strlen((char*)map); i++)
    3838     revmap[map[i]] = i;
    3939}
    4040   
     
    7070   if (!revmap)
    7171     init_revmap();
    7272   
    73    len = strlen(data)-1;
    74    
     73   len = strlen((char*)data);
     74
    7575   buf = realloc(buf, ((len+3)/4)*3);
    7676   
    77    while (off < len) {
     77   while (off+3 < len) {
    7878      buf[i+0] = (revmap[data[off]]<<2)|((revmap[data[off+1]]&48)>>4);
    7979      buf[i+1] = ((revmap[data[off+1]]&15)<<4)|((revmap[data[off+2]]&60)>>2);
    8080      buf[i+2] = ((revmap[data[off+2]]&3)<<6)|(revmap[data[off+3]]);
  • nstx_pstack.c

    old new  
    4949   char *netpacket;
    5050   int netpacketlen;
    5151   
    52    if ((!ptr) || len < sizeof(struct nstxhdr))
     52   if ((!ptr) || (signed int) len < (signed int) sizeof(struct nstxhdr))
    5353     return;
    5454
    5555   if (!nstxpkt->id)
  • nstx_tuntap.c

    old new  
    215215
    216216struct nstxmsg *nstx_select (int timeout)
    217217{
    218    int peerlen;
     218   unsigned peerlen;
    219219   fd_set set;
    220220   struct timeval tv;
    221221   static struct nstxmsg *ret = NULL;
  • nstx-1.1-beta6

    old new  
    6363int main (int argc, char * argv[]) {
    6464  struct nstxmsg *msg;
    6565  const char    *device = NULL;
    66   char           ch;
     66  int            ch;
    6767
    6868  nsid = time(NULL);
    6969 
     
    110110   const char *data;
    111111   int datalen;
    112112   
    113    pkt = dns_extractpkt (reply, len);
     113   pkt = dns_extractpkt ((unsigned char*)reply, len);
    114114   if (!pkt)
    115115     return;
    116116   while ((data = dns_getanswerdata(pkt, &datalen))) {
    117       data = txt2data(data, &datalen);
     117      data = (char*)txt2data((unsigned char*)data, &datalen);
    118118      nstx_handlepacket (data, datalen, &sendtun);
    119119   }
    120120   dequeueitem(pkt->id);
     
    159159    data += l;
    160160    datalen -= l;
    161161   
    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)));
    163163    free(p);
    164     p = dns_constructpacket(pkt, &l);
     164    p = (char*)dns_constructpacket(pkt, &l);
    165165    sendns(p, l, NULL);
    166166    free(p);
    167167
  • nstx-1.1-beta6

    old new  
    6767}
    6868
    6969int main (int argc, char *argv[]) {
    70    char          ch;
     70   signed char   ch;
    7171   const char   *device = NULL, *dir = NULL;
    7272   in_addr_t     bindto = INADDR_ANY;
    7373   uid_t         uid = 0;
     
    172172   dns_setid(pkt, q->id);
    173173   dns_settype(pkt, DNS_RESPONSE);
    174174   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);
    176176   sendns(buf, len, &q->peer);
    177177   free(buf);
    178178
     
    188188   
    189189   if (msg) {
    190190     if (msg->src == FROMNS) {
    191         pkt = dns_extractpkt(msg->data, msg->len);
     191        pkt = dns_extractpkt((unsigned char*)msg->data, msg->len);
    192192        if (pkt)
    193193          {
    194194             name = dns_getquerydata(pkt);
     
    198198                        name);
    199199                  queueitem(pkt->id, name, &msg->peer);
    200200                  if ((data = dns_fqdn2data(name)) &&
    201                       (buf = nstx_decode(data, &len)))
     201                      (buf = nstx_decode((unsigned char*)data, &len)))
    202202                    {
    203203                       nstx_handlepacket(buf, len, &sendtun);
    204204                    }
     
    220220      len = dns_getfreespace(pkt, DNS_RESPONSE);
    221221      buf = dequeue_senditem(&len);
    222222      dns_addanswer(pkt, buf, len, link);
    223       buf = dns_constructpacket(pkt, &len);
     223      buf = (char*)dns_constructpacket(pkt, &len);
    224224      sendns(buf, len, &qitem->peer);
    225225   }
    226226   timeoutqueue(do_timeout);
  • debian/nstx.postinst

    old new  
     1#!/bin/sh
     2
     3set -e
     4
     5case "$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    ;;
     18esac
     19
     20#DEBHELPER#
     21
  • debian/changelog

    old new  
     1nstx (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
     7nstx (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
     18nstx (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
     27nstx (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
     37nstx (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
     45nstx (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       
     57nstx (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       
     67nstx (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       
     73nstx (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       
     82nstx (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       
     88nstx (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       
     97nstx (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  
     14
  • nstx-1.1-beta6

    old new  
     1usr/bin
     2usr/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
     5PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
     6DAEMON=/usr/sbin/nstxd
     7NAME=nstxd
     8DESC=nstxd
     9NSTX_OPTIONS="-C /var/run/nstxd -u nstxd"
     10
     11test -x $DAEMON || exit 0
     12
     13# Include nstx defaults if available
     14if [ -f /etc/default/nstx ] ; then
     15        . /etc/default/nstx
     16fi
     17
     18set -e
     19
     20check_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
     30case "$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        ;;
     106esac
     107
     108exit 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
     5PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
     6DAEMON=/usr/sbin/nstxcd
     7NAME=nstxcd
     8DESC=nstxcd
     9
     10test -x $DAEMON || exit 0
     11
     12# Include nstx defaults if available
     13if [ -f /etc/default/nstx ] ; then
     14        . /etc/default/nstx
     15fi
     16
     17set -e
     18
     19check_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
     29case "$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        ;;
     100esac
     101
     102exit 0
  • debian/control

    old new  
     1Source: nstx
     2Section: net
     3Priority: optional
     4Maintainer: Matthew Garrett <mjg59@srcf.ucam.org>
     5Build-Depends: debhelper (>= 4.1.68)
     6Standards-Version: 3.6.0
     7
     8Package: nstx
     9Architecture: any
     10Depends: ${shlibs:Depends}, ${misc:Depends}, adduser
     11Description: 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
     12CFLAGS = -Wall -g
     13
     14ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
     15        CFLAGS += -O0
     16else
     17        CFLAGS += -O2
     18endif
     19ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
     20        INSTALL_PROGRAM += -s
     21endif
     22
     23configure: configure-stamp
     24configure-stamp:
     25        dh_testdir
     26        # Add here commands to configure the package.
     27
     28        touch configure-stamp
     29
     30
     31build: build-stamp
     32
     33build-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
     42clean:
     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
     52install: 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.
     63binary-indep: build install
     64# We have nothing to do by default.
     65
     66# Build architecture-dependent files here.
     67binary-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
     99binary: binary-indep binary-arch
     100.PHONY: build clean binary-indep binary-arch binary install configure
  • debian/nstx.manpages

    old new  
     1nstxd.8
     2nstxcd.8
  • debian/README.Debian

    old new  
     1nstx for Debian
     2---------------
     3
     4This package requires the tun driver to be loaded. As a result, you need
     5CONFIG_TUN to be either y or m in your kernel configuration. In order to
     6start things automatically, you need to configure /etc/default/nstx
     7
     8Security note
     9-------------
     10
     11nstx includes no authentication. Anyone who knows the name of your tunnel
     12domain will be able to connect to the daemon.
     13
     14djbdns
     15------
     16
     17nstx will allegedly not work with a djbdns server. If you want to try
     18it, 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
     35It's not included by default because it appears to break the nstx
     36client with bind9 servers. To apply it:
     37
     38apt-get source nstx
     39cd nstx-*
     40patch <debian/README.Debian
     41dpkg-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
     10NSTX_DOMAIN=""
     11
     12# The IP address of the DNS server - needed for client only
     13NSTX_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  
     1This package was debianized by Matthew Garrett <mjg59@srcf.ucam.org> on
     2Thu, 27 May 2004 16:41:12 +0100.
     3
     4It was downloaded from http://nstx.dereference.de/nstx/
     5
     6Upstream Authors:
     7
     8Florian Heinz <sky@sysv.de>
     9Julien Oster <frodo@sysv.de>
     10
     11
     12Copyright:
     13
     14nstx is released under the terms of the GNU General Public License version 2
     15 
     16On Debian systems, the complete text of the GNU General Public
     17License can be found in the file '/usr/share/common-licenses/GPL'
     18
  • nstx-1.1-beta6

    old new  
     1README
  • nstx-1.1-beta6

    old new  
     1.TH NSTXCD "8" "May 2004" "nstx 1.1-beta4" "User Commands"
     2.SH NAME
     3nstxcd \- IP over DNS tunneling client
     4
     5.SH SYNOPSIS
     6.B "nstxcd \fIDOMAIN\fR \fIIPADDRESS\fR"
     7
     8.SH DESCRIPTION
     9.B nstxcd
     10tunnels IP packets over DNS, allowing them to be sent to a server without
     11any protocols other than DNS being used.
     12
     13.SH OPTIONS
     14.B nstxcd
     15takes the following options:
     16.IP "domain"
     17The domain that nstxcd will send requests to. This domain must be delegated
     18to a machine that is running nstxd.
     19.IP "IP address"
     20The IP address of a DNS server that can be reached from the current machine.
     21
     22.SH USAGE
     23.Bnstxcd
     24should be run against a domain that has been delegated to a machine running
     25nstxd. It will then take any packets that are sent to the tun0 interface and
     26send them over DNS to the other tunnel endpoint. Responses will appear on
     27the tun0 interface.
     28
     29.SH AUTHORS
     30
     31.IP
     32Florian Heinz <sky@sysv.de>
     33.IP
     34Julien Oster <frodo@sysv.de>
     35.IP
     36http://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
     3nstxd \- IP over DNS tunneling daemon
     4
     5.SH SYNOPSIS
     6.B "nstxd \fIOPTION\fR \fIDOMAIN\fR"
     7
     8.SH DESCRIPTION
     9.B nstxd
     10listens for well formed DNS requests and translates them into IP packets.
     11Responses are sent in the form of DNS replies. This allows clients to
     12tunnel IP packets over the DNS protocol.
     13
     14.SH OPTIONS
     15.B nstxd
     16takes the following option:
     17.IP \-d tun-device
     18Use this tun device instead of tun0
     19.IP \-i ipaddr
     20Bind to this IP address rather than every available address
     21.IP \-C dir
     22Chroot to this directory on startup
     23.IP \-D
     24Daemonize on startup
     25.IP \-g
     26Switch on debug messages
     27.IP \-u user
     28Run as the following user
     29.IP "domain"
     30The domain that nstxd will listen to requests for. This should be a domain
     31that is delegated to the machine running nstxd.
     32
     33.SH USAGE
     34A domain should be delegated to the machine that will run nstxd. nstxd should
     35then be run giving that domain as the only argument. nstxd will then listen
     36for requests and translate them into IP packets that will appear on the tun0
     37interface. Packets sent to the tun0 interface will be transferred back to
     38the client as DNS answers.
     39
     40.SH AUTHORS
     41
     42.IP
     43Florian Heinz <sky@sysv.de>
     44.IP
     45Julien Oster <frodo@sysv.de>
     46.IP
     47http://nstx.dereference.de/nstx/
Note: See TracBrowser for help on using the repository browser.