FreeBSD Bugzilla – Attachment 151349 Details for
Bug 195424
[Update] net/hanstunnel fix build with GCC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
hanstunnel port
hanstunnel.shar (text/plain), 8.20 KB, created by
vsityz
on 2015-01-05 11:05:24 UTC
(
hide
)
Description:
hanstunnel port
Filename:
MIME Type:
Creator:
vsityz
Created:
2015-01-05 11:05:24 UTC
Size:
8.20 KB
patch
obsolete
># This is a shell archive. Save it in a file, remove anything before ># this line, and then unpack it by entering "sh file". Note, it may ># create directories; files and directories will be owned by you and ># have default permissions. ># ># This archive contains: ># ># hanstunnel ># hanstunnel/files ># hanstunnel/files/patch-echo.cpp ># hanstunnel/files/patch-tun.cpp ># hanstunnel/files/patch-Makefile ># hanstunnel/Makefile ># hanstunnel/distinfo ># hanstunnel/pkg-message ># hanstunnel/pkg-descr ># >echo c - hanstunnel >mkdir -p hanstunnel > /dev/null 2>&1 >echo c - hanstunnel/files >mkdir -p hanstunnel/files > /dev/null 2>&1 >echo x - hanstunnel/files/patch-echo.cpp >sed 's/^X//' >hanstunnel/files/patch-echo.cpp << 'c9aaa09cd5c270680d478f955bb4582b' >X--- src/echo.cpp.orig 2014-11-22 17:51:42.000000000 +0200 >X+++ src/echo.cpp 2014-11-22 17:51:46.000000000 +0200 >X@@ -19,7 +19,7 @@ >X >X #include "echo.h" >X #include "exception.h" >X- >X+#include <sys/types.h> >X #include <sys/socket.h> >X #include <netinet/in_systm.h> >X #include <netinet/in.h> >c9aaa09cd5c270680d478f955bb4582b >echo x - hanstunnel/files/patch-tun.cpp >sed 's/^X//' >hanstunnel/files/patch-tun.cpp << '0a4216e67650c84929001f6d046ecbda' >X--- src/tun.cpp.orig 2014-02-07 05:36:31.000000000 +0200 >X+++ src/tun.cpp 2014-11-22 17:31:16.000000000 +0200 >X@@ -20,7 +20,7 @@ >X #include "tun.h" >X #include "exception.h" >X #include "utility.h" >X- >X+#include <sys/types.h> >X #include <arpa/inet.h> >X #include <netinet/in_systm.h> >X #include <netinet/in.h> >X@@ -69,23 +69,17 @@ >X string ips = Utility::formatIp(ip); >X string destIps = Utility::formatIp(destIp); >X >X-#ifdef LINUX >X- snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s netmask 255.255.255.0", device, ips.c_str()); >X-#else >X- snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.255", device, ips.c_str(), destIps.c_str()); >X-#endif >X+ snprintf(cmdline, sizeof(cmdline), "/sbin/ifconfig %s %s %s netmask 255.255.255.0", device, ips.c_str(), destIps.c_str()); >X >X if (system(cmdline) != 0) >X syslog(LOG_ERR, "could not set tun device ip address"); >X >X-#ifndef LINUX >X if (includeSubnet) >X { >X snprintf(cmdline, sizeof(cmdline), "/sbin/route add %s/24 %s", destIps.c_str(), destIps.c_str()); >X if (system(cmdline) != 0) >X syslog(LOG_ERR, "could not add route"); >X } >X-#endif >X } >X >X void Tun::write(const char *buffer, int length) >0a4216e67650c84929001f6d046ecbda >echo x - hanstunnel/files/patch-Makefile >sed 's/^X//' >hanstunnel/files/patch-Makefile << '00f1877f7d4533cd6adc2ee1c8be24c9' >X--- Makefile.orig 2014-11-22 17:46:35.000000000 +0200 >X+++ Makefile 2014-11-22 17:49:13.000000000 +0200 >X@@ -1,8 +1,6 @@ >X-LDFLAGS = `sh osflags ld $(MODE)` >X-CFLAGS = -c -g `sh osflags c $(MODE)` >X-TUN_DEV_FILE = `sh osflags dev $(MODE)` >X-GCC = gcc >X-GPP = g++ >X+TUN_DEV_FILE = src/tun_dev_freebsd.c >X+GCC = ${CC} >X+GPP = ${CXX} >X >X .PHONY: directories >X >X@@ -16,46 +14,46 @@ >X tunemu.o: directories build/tunemu.o >X >X hans: build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o >X- $(GPP) -o hans build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o $(LDFLAGS) >X+ ${GPP} -o hans build/tun.o build/sha1.o build/main.o build/client.o build/server.o build/auth.o build/worker.o build/time.o build/tun_dev.o build/echo.o build/exception.o build/utility.o $(LDFLAGS) >X >X build/utility.o: src/utility.cpp src/utility.h >X- $(GPP) -c src/utility.cpp -o $@ -o $@ $(CFLAGS) >X+ ${GPP} -c src/utility.cpp -o $@ -o $@ ${CFLAGS} >X >X build/exception.o: src/exception.cpp src/exception.h >X- $(GPP) -c src/exception.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/exception.cpp -o $@ ${CFLAGS} >X >X build/echo.o: src/echo.cpp src/echo.h src/exception.h >X- $(GPP) -c src/echo.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/echo.cpp -o $@ ${CFLAGS} >X >X build/tun.o: src/tun.cpp src/tun.h src/exception.h src/utility.h src/tun_dev.h >X- $(GPP) -c src/tun.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/tun.cpp -o $@ ${CFLAGS} >X >X build/tun_dev.o: >X- $(GCC) -c $(TUN_DEV_FILE) -o build/tun_dev.o -o $@ $(CFLAGS) >X+ ${GCC} -c ${TUN_DEV_FILE} -o build/tun_dev.o -o $@ ${CFLAGS} >X >X build/sha1.o: src/sha1.cpp src/sha1.h >X- $(GPP) -c src/sha1.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/sha1.cpp -o $@ ${CFLAGS} >X >X build/main.o: src/main.cpp src/client.h src/server.h src/exception.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h >X- $(GPP) -c src/main.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/main.cpp -o $@ ${CFLAGS} >X >X build/client.o: src/client.cpp src/client.h src/server.h src/exception.h src/config.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h >X- $(GPP) -c src/client.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/client.cpp -o $@ ${CFLAGS} >X >X build/server.o: src/server.cpp src/server.h src/client.h src/utility.h src/config.h src/worker.h src/auth.h src/time.h src/echo.h src/tun.h src/tun_dev.h >X- $(GPP) -c src/server.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/server.cpp -o $@ ${CFLAGS} >X >X build/auth.o: src/auth.cpp src/auth.h src/sha1.h src/utility.h >X- $(GPP) -c src/auth.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/auth.cpp -o $@ ${CFLAGS} >X >X build/worker.o: src/worker.cpp src/worker.h src/tun.h src/exception.h src/time.h src/echo.h src/tun_dev.h src/config.h >X- $(GPP) -c src/worker.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/worker.cpp -o $@ ${CFLAGS} >X >X build/time.o: src/time.cpp src/time.h >X- $(GPP) -c src/time.cpp -o $@ $(CFLAGS) >X+ ${GPP} -c src/time.cpp -o $@ ${CFLAGS} >X >X clean: >X rm -rf build hans >X >X build/tunemu.o: src/tunemu.h src/tunemu.c >X- $(GCC) -c src/tunemu.c -o build/tunemu.o >X+ ${GCC} -c src/tunemu.c -o build/tunemu.o >00f1877f7d4533cd6adc2ee1c8be24c9 >echo x - hanstunnel/Makefile >sed 's/^X//' >hanstunnel/Makefile << '87523a3042cf8f2ebc7a9370982f09ef' >X# Created by: Alexander Panyushkin <vsityz@gmail.com> >X# $FreeBSD$ >X >XPORTNAME= hans >XPORTVERSION= 0.4.4 >XPORTREVISION= 2 >XCATEGORIES= net security >XMASTER_SITES= ${MASTER_SITE_SOURCEFORGE} >XMASTER_SITE_SUBDIR= /hanstunnel/source/ >X >XMAINTAINER= vsityz@gmail.com >XCOMMENT= Hans makes it possible to tunnel IPv4 through ICMP >X >XLICENSE= GPLv3 >X >XOPTIONS_DEFINE= CLANG >XCLANG_DESC= Build with Clang instead of GCC >XOPTIONS_DEFAULT= CLANG >X >XPLIST_FILES= ${LOCALBASE}/bin/hans >X >X.include <bsd.port.options.mk> >X >X.if ${PORT_OPTIONS:MCLANG} >X.if ${OSVERSION} >= 900014 && exists(/usr/bin/clang) >XCC= clang >XCXX= clang++ >X.else >XUSE_GCC?= any >X.endif >X.endif >X >Xdo-install: >X ${INSTALL_PROGRAM} ${WRKSRC}/hans ${STAGEDIR}${PREFIX}/bin/hans >X >Xpost-install: .SILENT >X ${ECHO_MSG} >X ${CAT} ${PKGMESSAGE} >X ${ECHO_MSG} >X >X.include <bsd.port.mk> >87523a3042cf8f2ebc7a9370982f09ef >echo x - hanstunnel/distinfo >sed 's/^X//' >hanstunnel/distinfo << '65400445990c1970b9f5ad17ab147fd4' >XSHA256 (hans-0.4.4.tar.gz) = 81378258b8c9510ac01ad4d69f191e2927b9304daae033ee097f6ba4d39f6bb3 >XSIZE (hans-0.4.4.tar.gz) = 33992 >65400445990c1970b9f5ad17ab147fd4 >echo x - hanstunnel/pkg-message >sed 's/^X//' >hanstunnel/pkg-message << '35a6976a3b2d8f949619ff80f5876ac6' >X------------------------------------------------------------ >X >XHans runs on Linux as a client and a server. >XIt runs on FreeBSD client only. >X >XNOTE: that Hans can not receive echo requests on BSD systems. >XTherefore the server only works on Linux. >X >X------------------------------------------------------------ >X >X### Running as a server ### >X >X% hans -s 10.1.2.0 -r -p password -u nobody >X >X### Running as a client ### >X >X% hans -c server_address -p password -u nobody >X >X### Help ### >X >X% hans >X >X------------------------------------------------------------ >35a6976a3b2d8f949619ff80f5876ac6 >echo x - hanstunnel/pkg-descr >sed 's/^X//' >hanstunnel/pkg-descr << 'b3d8e535b1ab66b72469a8c0f03d82f8' >XHans makes it possible to tunnel IPv4 through ICMP echo packets, so you >Xcould call it a ping tunnel. This can be useful when you find yourself >Xin the situation that your Internet access is firewalled, but pings are >Xallowed. >X >XHans runs on Linux as a client and a server. It runs on Mac OS X, >XiPhone/iPod touch, FreeBSD and OpenBSD as a client only. >X >X >XWWW: http://code.gerade.org/hans/ >b3d8e535b1ab66b72469a8c0f03d82f8 >exit >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 195424
: 151349