ports/106053: Update port: net/sixxs-aiccu Fix tun driver to work on FreeBSD 5/6/7
Loren M. Lang
lorenl at north-winds.org
Thu Nov 30 10:30:17 UTC 2006
>Number: 106053
>Category: ports
>Synopsis: Update port: net/sixxs-aiccu Fix tun driver to work on FreeBSD 5/6/7
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Nov 30 10:30:12 GMT 2006
>Closed-Date:
>Last-Modified:
>Originator: Loren M. Lang
>Release: 6.1-RELEASE
>Organization:
>Environment:
FreeBSD excelsior.ben.north-winds.org 6.1-RELEASE FreeBSD 6.1-RELEASE #0: Sun May 7 04:42:56 UTC 2006 root at opus.cse.buffalo.edu:/usr/obj/usr/src/sys/SMP i386
>Description:
The FreeBSD port of sixxs-aiccu has a bug that prevents AYIYA tunnels from working on anything newer than FreeBSD 4.x. Also, the port is old in general, nearly two years behind what sixxs is offering. This updates it to the latest version and fixes the bug in the tun driver. Also, since this port appears unmaintained due to these bugs, I am willing to take over maintainership if the original maintainer has no interest in continuing.
>How-To-Repeat:
Attempt to use an AYIYA tunnel from Sixxs on FreeBSD 5/6/7. Pinging an IPv6 address using the ping6 utility will return the error: Address family not supported by protocol family.
>Fix:
Patch attached with submission follows:
diff -ruN /usr/ports/net/sixxs-aiccu/Makefile sixxs-aiccu/Makefile
--- /usr/ports/net/sixxs-aiccu/Makefile Mon Mar 14 09:47:07 2005
+++ sixxs-aiccu/Makefile Thu Nov 30 02:08:36 2006
@@ -5,16 +5,17 @@
# $FreeBSD: ports/net/sixxs-aiccu/Makefile,v 1.1 2005/03/14 17:47:07 vs Exp $
#
-PORTNAME= sixxs-aiccu
-PORTVERSION= 20050131
+PORTNAME= aiccu
+PORTVERSION= 20060725
CATEGORIES= net ipv6
MASTER_SITES= http://www.sixxs.net/archive/sixxs/aiccu/unix/
-DISTNAME= aiccu_2005.01.31
+PKGNAMEPREFIX= sixxs-
+DISTNAME= aiccu_2006.07.25
MAINTAINER= meno.abels at adviser.com
COMMENT= SixXS IPv6 TIC+ tunnel broker heartbeat client
-USE_RC_SUBR= yes
+USE_RC_SUBR= sixxs-aiccu
USE_GMAKE= yes
CFLAGS+= ${PTHREAD_CFLAGS}
LDFLAGS+= ${PTHREAD_LIBS}
@@ -26,9 +27,6 @@
PORTDOCS= README
pre-build:
- @${SED} -e 's:%%PREFIX%%:${PREFIX}:g' \
- -e 's:%%RC_SUBR%%:${RC_SUBR}:g' \
- ${FILESDIR}/sixxs-aiccu.sh >${WRKDIR}/sixxs-aiccu.sh
@${SED} \
-e 's:verbose true:verbose false:' \
-e 's:daemonize false:daemonize true:' \
@@ -44,6 +42,5 @@
${INSTALL_DATA} ${WRKSRC}/doc/README ${DOCSDIR}
${INSTALL_DATA} ${WRKSRC}/doc/aiccu.conf ${EXAMPLESDIR}
${INSTALL_DATA} ${WRKDIR}/aiccu.conf ${PREFIX}/etc/aiccu.conf.sample
- ${INSTALL_SCRIPT} ${WRKDIR}/sixxs-aiccu.sh ${PREFIX}/etc/rc.d
.include <bsd.port.mk>
diff -ruN /usr/ports/net/sixxs-aiccu/distinfo sixxs-aiccu/distinfo
--- /usr/ports/net/sixxs-aiccu/distinfo Sun Jan 22 13:23:50 2006
+++ sixxs-aiccu/distinfo Thu Nov 30 00:08:12 2006
@@ -1,3 +1,3 @@
-MD5 (aiccu_2005.01.31.tar.gz) = 7c3da5feab3d59fb5a99a45203e0ca56
-SHA256 (aiccu_2005.01.31.tar.gz) = 1baac8fb62490e480efa8b5b6b3b4d3d9c19876316456e4b6ada2cec0c36bc88
-SIZE (aiccu_2005.01.31.tar.gz) = 45672
+MD5 (aiccu_2006.07.25.tar.gz) = 0df76e92eb34f4ce8aa3cfcf6896f271
+SHA256 (aiccu_2006.07.25.tar.gz) = ce735aced6d18594a726c9b027ddc80ca1ff658f6e436c530b60779f2dc5d4df
+SIZE (aiccu_2006.07.25.tar.gz) = 64161
diff -ruN /usr/ports/net/sixxs-aiccu/files/patch-common_tun.c sixxs-aiccu/files/patch-common_tun.c
--- /usr/ports/net/sixxs-aiccu/files/patch-common_tun.c Wed Dec 31 16:00:00 1969
+++ sixxs-aiccu/files/patch-common_tun.c Thu Nov 30 02:02:29 2006
@@ -0,0 +1,21 @@
+--- common/tun.c.orig Tue Jul 25 02:20:46 2006
++++ common/tun.c Thu Nov 30 02:02:05 2006
+@@ -703,9 +703,7 @@
+
+ char buf[128];
+ unsigned int i;
+-#ifndef _FREEBSD
+ int mode = IFF_MULTICAST | IFF_POINTOPOINT;
+-#endif
+
+ /* Try the configured interface */
+ tun_log(LOG_DEBUG, "start", "Trying Configured TUN/TAP interface %s...\n", g_aiccu->ipv6_interface);
+@@ -752,7 +750,7 @@
+ #endif
+ #endif
+
+-#ifdef _DFBSD
++#ifdef NEED_IFHEAD
+ tun_log(LOG_DEBUG, "start", "Setting TUNSIFHEAD for %s\n", g_aiccu->ipv6_interface);
+ mode = 1;
+ if (ioctl(tun_fd, TUNSIFHEAD, &mode, sizeof(mode)) == -1)
diff -ruN /usr/ports/net/sixxs-aiccu/files/patch-unix-console::Makefile sixxs-aiccu/files/patch-unix-console::Makefile
--- /usr/ports/net/sixxs-aiccu/files/patch-unix-console::Makefile Tue Jul 26 05:20:20 2005
+++ sixxs-aiccu/files/patch-unix-console::Makefile Thu Nov 30 01:46:06 2006
@@ -1,32 +1,26 @@
---- unix-console/Makefile.orig Mon Jan 31 19:59:30 2005
-+++ unix-console/Makefile Sun Mar 13 16:42:00 2005
-@@ -37,7 +37,7 @@
- CFLAGS += -D AICCU_TYPE="\"freebsd4\""
+--- unix-console/Makefile.orig Tue Jul 25 02:20:48 2006
++++ unix-console/Makefile Thu Nov 30 01:45:59 2006
+@@ -62,19 +62,19 @@
+ CFLAGS += -D AICCU_TYPE="\"freebsd4\""
SRCS += ../common/aiccu_freebsd4.c
OBJS += ../common/aiccu_freebsd4.o
-CFLAGS += -pthread
+#CFLAGS += -pthread
- endif
-
- # FreeBSD 5.x
-@@ -45,7 +45,19 @@
- CFLAGS += -D AICCU_TYPE="\"kame\""
+ else
+ # FreeBSD 5.x/6.x/7.x
+-CFLAGS += -D AICCU_TYPE="\"kame\""
++CFLAGS += -D NEED_IFHEAD -D AICCU_TYPE="\"kame\""
SRCS += ../common/aiccu_kame.c
OBJS += ../common/aiccu_kame.o
-CFLAGS += -pthread
+#CFLAGS += -pthread
-+endif
-+# FreeBSD 6.x
-+ifeq ($(shell uname -r | cut -c 1),6)
-+CFLAGS += -D AICCU_TYPE="\"kame\""
-+SRCS += ../common/aiccu_kame.c
-+OBJS += ../common/aiccu_kame.o
-+endif
-+# FreeBSD 7.x
-+ifeq ($(shell uname -r | cut -c 1),7)
-+CFLAGS += -D AICCU_TYPE="\"kame\""
-+SRCS += ../common/aiccu_kame.c
-+OBJS += ../common/aiccu_kame.o
endif
endif
+ # DragonFlyBSD
+ ifeq ($(shell uname | grep -c "DragonFly"),1)
+-CFLAGS += -D _DFBSD -D AICCU_TYPE="\"dragonfly\""
++CFLAGS += -D _DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
+ SRCS += ../common/aiccu_freebsd4.c
+ OBJS += ../common/aiccu_freebsd4.o
+ CFLAGS += -pthread
diff -ruN /usr/ports/net/sixxs-aiccu/files/sixxs-aiccu.in sixxs-aiccu/files/sixxs-aiccu.in
--- /usr/ports/net/sixxs-aiccu/files/sixxs-aiccu.in Wed Dec 31 16:00:00 1969
+++ sixxs-aiccu/files/sixxs-aiccu.in Wed Nov 29 23:10:21 2006
@@ -0,0 +1,30 @@
+#!/bin/sh
+#
+# $FreeBSD: ports/net/sixxs-aiccu/files/sixxs-aiccu.sh,v 1.3 2006/02/20 20:47:30 dougb Exp $
+#
+
+# PROVIDE: sixxs-aiccu
+# REQUIRE: NETWORKING
+
+#
+# Add the following lines to /etc/rc.conf to enable sixxs-aiccu:
+#
+#sixxs_aiccu_enable="YES"
+#
+
+. %%RC_SUBR%%
+
+name=sixxs_aiccu
+rcvar=`set_rcvar`
+
+command="%%PREFIX%%/sbin/sixxs-aiccu"
+command_args=%%PREFIX%%/etc/aiccu.conf
+start_cmd="%%PREFIX%%/sbin/sixxs-aiccu start $command_args"
+stop_cmd="%%PREFIX%%/sbin/sixxs-aiccu stop $command_args"
+required_files=%%PREFIX%%/etc/aiccu.conf
+
+# set default
+sixxs_aiccu_enable=${sixxs_aiccu_enable:-"NO"}
+
+load_rc_config ${name}
+run_rc_command "$1"
diff -ruN /usr/ports/net/sixxs-aiccu/files/sixxs-aiccu.sh sixxs-aiccu/files/sixxs-aiccu.sh
--- /usr/ports/net/sixxs-aiccu/files/sixxs-aiccu.sh Mon Feb 20 12:47:30 2006
+++ sixxs-aiccu/files/sixxs-aiccu.sh Wed Dec 31 16:00:00 1969
@@ -1,30 +0,0 @@
-#!/bin/sh
-#
-# $FreeBSD: ports/net/sixxs-aiccu/files/sixxs-aiccu.sh,v 1.3 2006/02/20 20:47:30 dougb Exp $
-#
-
-# PROVIDE: sixxs-aiccu
-# REQUIRE: NETWORKING
-
-#
-# Add the following lines to /etc/rc.conf to enable sixxs-aiccu:
-#
-#sixxs_aiccu_enable="YES"
-#
-
-. %%RC_SUBR%%
-
-name=sixxs_aiccu
-rcvar=`set_rcvar`
-
-command="%%PREFIX%%/sbin/sixxs-aiccu"
-command_args=%%PREFIX%%/etc/aiccu.conf
-start_cmd="%%PREFIX%%/sbin/sixxs-aiccu start $command_args"
-stop_cmd="%%PREFIX%%/sbin/sixxs-aiccu stop $command_args"
-required_files=%%PREFIX%%/etc/aiccu.conf
-
-# set default
-sixxs_aiccu_enable=${sixxs_aiccu_enable:-"NO"}
-
-load_rc_config ${name}
-run_rc_command "$1"
diff -ruN /usr/ports/net/sixxs-aiccu/pkg-plist sixxs-aiccu/pkg-plist
--- /usr/ports/net/sixxs-aiccu/pkg-plist Mon Mar 14 09:47:07 2005
+++ sixxs-aiccu/pkg-plist Thu Nov 30 02:05:15 2006
@@ -1,5 +1,4 @@
etc/aiccu.conf.sample
-etc/rc.d/sixxs-aiccu.sh
sbin/sixxs-aiccu
%%EXAMPLESDIR%%/aiccu.conf
@dirrm %%EXAMPLESDIR%%
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list