changeset 67:c87212fe8883

Renamed debian directory to prepare for debian packaging, fixed possible crash in PI mode 2
author Ivo Smits <Ivo@UCIS.nl>
date Fri, 27 Jan 2017 20:33:19 +0100
parents 9499cbd71871
children 18e0b8bdeecc
files build.sh src/common.c version
diffstat 3 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/build.sh	Tue Jan 24 22:02:33 2017 +0100
+++ b/build.sh	Fri Jan 27 20:33:19 2017 +0100
@@ -25,7 +25,7 @@
 mkdir -p out
 if [ "$1" != "debian" ]; then
 	echo Creating source archive...
-	$tar --transform "s,^,quicktun-`cat version`/," -czf "out/quicktun-`cat version`.tgz" build.sh clean.sh debian src version --exclude "debian/data"
+	$tar --transform "s,^,quicktun-`cat version`/," -czf "out/quicktun-`cat version`.tgz" build.sh clean.sh deb src version --exclude "debian/data"
 fi
 
 mkdir -p obj tmp tmp/include tmp/lib
@@ -82,7 +82,7 @@
 	$cc $CFLAGS -o out/quicktun.debian obj/common.o obj/run.debian.o obj/proto.raw.o obj/proto.nacl0.o obj/proto.nacltai.o obj/proto.salty.o -l$CRYPTLIB $LDFLAGS
 	if [ "$1" != "debian" -a -x /usr/bin/dpkg-deb -a -x /usr/bin/fakeroot ]; then
 		echo -n Building debian package...
-		cd debian
+		cd deb
 		./build.sh
 		cd ..
 	fi
--- a/src/common.c	Tue Jan 24 22:02:33 2017 +0100
+++ b/src/common.c	Fri Jan 27 20:33:19 2017 +0100
@@ -357,7 +357,7 @@
 		if (len == 0 && p->idle) p->idle(&session);
 		if (fds[0].revents & POLLIN) {
 			len = read(ttfd, buffer_raw + p->offset_raw, p->buffersize_raw + pi_length);
-			if (len < pi_length) errorexit("read packet smaller than header from tun device");
+			if (len < pi_length) return errorexit("read packet smaller than header from tun device");
 			if (session.remote_float == 0 || session.remote_float == 2) {
 				len = p->encode(&session, buffer_raw + pi_length, buffer_enc, len - pi_length);
 				if (len < 0) return len;
--- a/version	Tue Jan 24 22:02:33 2017 +0100
+++ b/version	Fri Jan 27 20:33:19 2017 +0100
@@ -1,1 +1,1 @@
-2.2.5
+2.2.6