Browse Source

Merge pull request #4464 from oskar456/aiccudelete

aiccu: remove package
lilik-openwrt-22.03
Hannu Nyman 8 years ago
committed by GitHub
parent
commit
ff8613ae89
8 changed files with 0 additions and 445 deletions
  1. +0
    -70
      ipv6/aiccu/Makefile
  2. +0
    -3
      ipv6/aiccu/files/aiccu.hotplug
  3. +0
    -121
      ipv6/aiccu/files/aiccu.sh
  4. +0
    -101
      ipv6/aiccu/patches/100-cross_compile.patch
  5. +0
    -68
      ipv6/aiccu/patches/200-add_dn_skipname.patch
  6. +0
    -29
      ipv6/aiccu/patches/300-resolver-uclibc.patch
  7. +0
    -31
      ipv6/aiccu/patches/400-musl-compat.patch
  8. +0
    -22
      ipv6/aiccu/patches/500-gnutls_3.4.patch

+ 0
- 70
ipv6/aiccu/Makefile View File

@ -1,70 +0,0 @@
#
# Copyright (C) 2006-2015 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=aiccu
PKG_VERSION:=20070115
PKG_RELEASE:=16
PKG_SOURCE:=$(PKG_NAME)_$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=http://www.sixxs.net/archive/sixxs/aiccu/unix
PKG_MD5SUM:=c9bcc83644ed788e22a7c3f3d4021350
PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=doc/LICENSE
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)
include $(INCLUDE_DIR)/package.mk
define Package/aiccu/Default
TITLE:=SixXS IPv6 Connectivity Client ($(1))
SECTION:=net
CATEGORY:=Network
VARIANT:=$(2)
DEPENDS:=+libpthread +ip +kmod-sit +kmod-tun $(3)
URL:=http://www.sixxs.net/tools/aiccu/
MAINTAINER:=Ondrej Caletka <ondrej@caletka.cz>
endef
Package/aiccu=$(call Package/aiccu/Default,without GNUTLS support,default)
Package/aiccu-gnutls=$(call Package/aiccu/Default,with GNUTLS support,gnutls,+libgnutls)
define Build/Configure
$(SED) "s,strip,/bin/true," $(PKG_BUILD_DIR)/unix-console/Makefile
endef
ifeq ($(BUILD_VARIANT),gnutls)
CONFIG_AICCU_GNUTLS:=y
endif
define Build/Compile
$(MAKE) -C $(PKG_BUILD_DIR) \
CC="$(TARGET_CC)" OS_NAME="Linux" OS_VERSION="$(LINUX_VERSION)" \
EXTRA_CFLAGS="$(TARGET_CFLAGS)" \
EXTRA_LDFLAGS="$(TARGET_LDFLAGS) -pthread" \
$(if $(CONFIG_AICCU_GNUTLS),HAVE_GNUTLS=1) \
DEBUG=0
endef
define Package/aiccu/conffiles
/etc/config/aiccu
endef
Package/aiccu-gnutls/conffiles=$(call Package/aiccu/conffiles)
define Package/aiccu/install
$(INSTALL_DIR) $(1)/usr/sbin $(1)/lib/netifd/proto $(1)/etc/hotplug.d/ntp
$(INSTALL_BIN) $(PKG_BUILD_DIR)/unix-console/$(PKG_NAME) $(1)/usr/sbin/
$(INSTALL_BIN) ./files/aiccu.sh $(1)/lib/netifd/proto/aiccu.sh
$(INSTALL_DATA) ./files/aiccu.hotplug $(1)/etc/hotplug.d/ntp/10-aiccu
endef
Package/aiccu-gnutls/install=$(call Package/aiccu/install,$(1))
$(eval $(call BuildPackage,aiccu))
$(eval $(call BuildPackage,aiccu-gnutls))

+ 0
- 3
ipv6/aiccu/files/aiccu.hotplug View File

@ -1,3 +0,0 @@
#!/bin/sh
NTPSTRATUMFILE="/var/run/aiccu_ntp_stratum"
echo $stratum > "$NTPSTRATUMFILE"

+ 0
- 121
ipv6/aiccu/files/aiccu.sh View File

@ -1,121 +0,0 @@
#!/bin/sh
# aiccu.sh - AICCU proto
# Copyright (c) 2014 OpenWrt.org
[ -n "$INCLUDE_ONLY" ] || {
. /lib/functions.sh
. /lib/functions/network.sh
. ../netifd-proto.sh
init_proto "$@"
}
proto_aiccu_setup() {
local cfg="$1"
local iface="$2"
local link="aiccu-$cfg"
local username password protocol server ip6prefix tunnelid requiretls defaultroute nat heartbeat verbose sourcerouting ip6addr ntpsynctimeout
json_get_vars username password protocol server ip6prefix tunnelid requiretls defaultroute nat heartbeat verbose sourcerouting ip6addr ntpsynctimeout
[ -z "$username" -o -z "$password" ] && {
proto_notify_error "$cfg" "MISSING_USERNAME_OR_PASSWORD"
proto_block_restart "$cfg"
return
}
( proto_add_host_dependency "$cfg" 0.0.0.0 )
CFGFILE="/var/etc/${link}.conf"
PIDFILE="/var/run/${link}.pid"
NTPSTRATUMFILE="/var/run/aiccu_ntp_stratum"
mkdir -p /var/run /var/etc
echo "username $username" > "$CFGFILE"
echo "password $password" >> "$CFGFILE"
echo "ipv6_interface $link" >> "$CFGFILE"
[ -n "$server" ] && echo "server $server" >> "$CFGFILE"
[ -n "$protocol" ] && echo "protocol $protocol" >> "$CFGFILE"
[ -n "$tunnelid" ] && echo "tunnel_id $tunnelid" >> "$CFGFILE"
[ "$requiretls" == 1 ] && echo "requiretls true" >> "$CFGFILE"
[ "$nat" == 1 ] && echo "behindnat true" >> "$CFGFILE"
[ "$heartbeat" == 1 ] && echo "makebeats true" >> "$CFGFILE"
[ "$verbose" == 1 ] && echo "verbose true" >> "$CFGFILE"
echo "defaultroute false" >> "$CFGFILE"
echo "daemonize true" >> "$CFGFILE"
echo "pidfile $PIDFILE" >> "$CFGFILE"
# By default, wait at most 90 seconds for NTP sync
[ -z "$ntpsynctimeout" ] && ntpsynctimeout=90
for i in $(seq 1 $ntpsynctimeout); do
[ -f "$NTPSTRATUMFILE" ] && \
[ "$(cat $NTPSTRATUMFILE)" -lt 16 ] && \
echo "NTP synced, stratum $(cat $NTPSTRATUMFILE)" && break
[ "$(( $i % 10 ))" -eq 0 ] && echo "Waiting ${i} secs for NTP sync..."
sleep 1
done
aiccu start "$CFGFILE"
[ "$?" -ne 0 ] && {
proto_notify_error "$cfg" "AICCU_FAILED_SEE_LOG"
proto_block_restart "$cfg"
return
}
proto_init_update "$link" 1
local source=""
[ "$sourcerouting" != "0" ] && source="::/128"
[ "$defaultroute" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$source"
[ -n "$ip6addr" ] && {
local local6="${ip6addr%%/*}"
local mask6="${ip6addr##*/}"
[[ "$local6" = "$mask6" ]] && mask6=
proto_add_ipv6_address "$local6" "$mask6"
[ "$defaultroute" != "0" -a "$sourcerouting" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$local6/$mask6"
}
[ -n "$ip6prefix" ] && {
proto_add_ipv6_prefix "$ip6prefix"
[ "$defaultroute" != "0" -a "$sourcerouting" != "0" ] && proto_add_ipv6_route "::" 0 "" "" "" "$ip6prefix"
}
proto_send_update "$cfg"
}
proto_aiccu_teardown() {
local cfg="$1"
local link="aiccu-$cfg"
CFGFILE="/var/etc/${link}.conf"
PIDFILE="/var/run/${link}.pid"
[ -f "$CFGFILE" -a -f "$PIDFILE" ] && {
local pid="$(cat "$PIDFILE")"
[ -d /proc/$pid -a $(cat /proc/$pid/comm) = "aiccu" ] && \
aiccu stop "$CFGFILE"
}
}
proto_aiccu_init_config() {
no_device=1
available=1
proto_config_add_string "username"
proto_config_add_string "password"
proto_config_add_string "protocol"
proto_config_add_string "server"
proto_config_add_string "ip6addr:ip6addr"
proto_config_add_string "ip6prefix:ip6addr"
proto_config_add_string "tunnelid"
proto_config_add_boolean "requiretls"
proto_config_add_boolean "defaultroute"
proto_config_add_boolean "sourcerouting"
proto_config_add_boolean "nat"
proto_config_add_boolean "heartbeat"
proto_config_add_boolean "verbose"
proto_config_add_int "ntpsynctimeout"
}
[ -n "$INCLUDE_ONLY" ] || {
add_protocol aiccu
}

+ 0
- 101
ipv6/aiccu/patches/100-cross_compile.patch View File

@ -1,101 +0,0 @@
--- a/unix-console/Makefile
+++ b/unix-console/Makefile
@@ -25,7 +25,8 @@ CWARNS += -W -Wall -Wshadow -Wpointer-ar
# CWARNS += -Wpacked
#CFLAGS += $(CWARNS) -D_GNU_SOURCE -D_DEBUG -g3 -O0
-CFLAGS += $(CWARNS) -D_GNU_SOURCE
+CFLAGS += $(CWARNS) $(EXTRA_CFLAGS) -D_GNU_SOURCE
+LDFLAGS += $(EXTRA_LDFLAGS)
CC = @gcc
RM = rm
@@ -40,25 +41,25 @@ CFLAGS += -D AICCU_CONSOLE
# GnuTLS Support ?
# Used by TIC to secure that communication
# Currently defaultly builds only on Linux, but other platforms might easily also support it
-ifeq ($(shell uname | grep -c "Linux"),1)
+ifneq ($(HAVE_GNUTLS),)
CFLAGS += -D AICCU_GNUTLS
LDFLAGS += -lgnutls
endif
# Linux
-ifeq ($(shell uname | grep -c "Linux"),1)
+ifeq ($(OS_NAME),Linux)
CFLAGS += -D_LINUX -D HAS_IFHEAD -D AICCU_TYPE="\"linux\""
SRCS += ../common/aiccu_linux.c
OBJS += ../common/aiccu_linux.o
-LDFLAGS += -lpthread -lresolv
+LDFLAGS += -pthread -lresolv
endif
# FreeBSD
-ifeq ($(shell uname | grep -c "FreeBSD"),1)
+ifeq ($(OS_NAME),FreeBSD)
CFLAGS += -D_FREEBSD
# FreeBSD 4.x
-ifeq ($(shell uname -r | cut -c 1),4)
+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),4)
CFLAGS += -D AICCU_TYPE="\"freebsd4\""
SRCS += ../common/aiccu_freebsd4.c
OBJS += ../common/aiccu_freebsd4.o
@@ -71,7 +72,7 @@ endif
endif
# DragonFlyBSD
-ifeq ($(shell uname | grep -c "DragonFly"),1)
+ifeq ($(OS_NAME),DragonFly)
CFLAGS += -D_DFBSD -D NEED_IFHEAD -D AICCU_TYPE="\"dragonfly\""
SRCS += ../common/aiccu_freebsd4.c
OBJS += ../common/aiccu_freebsd4.o
@@ -79,7 +80,7 @@ CFLAGS += -pthread
endif
# NetBSD
-ifeq ($(shell uname | grep -c "NetBSD"),1)
+ifeq ($(OS_NAME),NetBSD)
CFLAGS += -D_NETBSD -D AICCU_TYPE="\"kame\""
# Check if net/if_tun.h has TUNSIFHEAD and enable support for it
@@ -97,10 +98,10 @@ CFLAGS += -pthread -D_NETBSD_SOURCE
endif
# OpenBSD
-ifeq ($(shell uname | grep -c "OpenBSD"),1)
+ifeq ($(OS_NAME),OpenBSD)
CFLAGS += -D_OPENBSD -D HAS_IFHEAD
# 2.7-2.9
-ifeq ($(shell uname -r | cut -c 1),2)
+ifeq ($(shell echo $(OS_VERSION) | cut -c 1),2)
CFLAGS += -D AICCU_TYPE="\"openbsd2\""
SRCS += ../common/aiccu_openbsd2.c
OBJS += ../common/aiccu_openbsd2.o
@@ -114,7 +115,7 @@ CFLAGS += -pthread
endif
# Darwin
-ifeq ($(shell uname | grep -c "Darwin"),1)
+ifeq ($(OS_NAME),Darwin)
CFLAGS += -D_DARWIN -D NEED_IFHEAD -D AICCU_TYPE="\"darwin\""
SRCS += ../common/aiccu_darwin.c
OBJS += ../common/aiccu_darwin.o
@@ -122,7 +123,7 @@ LDFLAGS += -lresolv
endif
# SunOS / Solaris
-ifeq ($(shell uname | grep -c "SunOS"),1)
+ifeq ($(OS_NAME),SunOS)
CFLAGS += -D_SUNOS -D AICCU_TYPE="\"sunos\""
SRCS += ../common/aiccu_sunos.c
OBJS += ../common/aiccu_sunos.o
@@ -130,7 +131,7 @@ LDFLAGS += -lsocket -lnsl -lresolv
endif
# AIX
-ifeq ($(shell uname | grep -c "AIX"),1)
+ifeq ($(OS_NAME),AIX)
CC = @/usr/vac/bin/xlc_r
CFLAGS = -qthreaded -q64 -qlanglvl=stdc99 -bmaxdata:0xD0000000 -D_64BIT -g -qdbxextra -qfullpath -qheapdebug -qformat=all -qcheck=all
CFLAGS += -D AICCU_CONSOLE

+ 0
- 68
ipv6/aiccu/patches/200-add_dn_skipname.patch View File

@ -1,68 +0,0 @@
--- /dev/null
+++ b/common/dn_skipname.c
@@ -0,0 +1,51 @@
+#include <errno.h>
+#include <resolv.h>
+
+/* Ripped from glibc 2.4 sources. */
+
+/*
+ * ns_name_skip(ptrptr, eom)
+ * Advance *ptrptr to skip over the compressed name it points at.
+ * return:
+ * 0 on success, -1 (with errno set) on failure.
+ */
+int ns_name_skip(const u_char **ptrptr, const u_char *eom)
+{
+ const u_char *cp;
+ u_int n;
+
+ cp = *ptrptr;
+ while (cp < eom && (n = *cp++) != 0)
+ {
+ /* Check for indirection. */
+ switch (n & NS_CMPRSFLGS) {
+ case 0: /* normal case, n == len */
+ cp += n;
+ continue;
+ case NS_CMPRSFLGS: /* indirection */
+ cp++;
+ break;
+ default: /* illegal type */
+ errno = EMSGSIZE;
+ return (-1);
+ }
+ break;
+ }
+ if (cp > eom)
+ {
+ errno = EMSGSIZE;
+ return (-1);
+ }
+ *ptrptr = cp;
+ return (0);
+}
+
+int dn_skipname(const u_char *ptr, const u_char *eom)
+{
+ const u_char *saveptr = ptr;
+
+ if(ns_name_skip(&ptr, eom) == -1)
+ return (-1);
+ return (ptr - saveptr);
+}
+
--- a/unix-console/Makefile
+++ b/unix-console/Makefile
@@ -10,9 +10,9 @@
# $Date: 2007-01-15 11:04:27 $
# **********************************************************/
-SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c
+SRCS = main.c ../common/tun.c ../common/aiccu.c ../common/hash_md5.c ../common/hash_sha1.c ../common/common.c ../common/heartbeat.c ../common/tic.c ../common/ayiya.c ../common/aiccu_test.c ../common/resolver.c ../common/dn_skipname.c
INCS = ../common/tun.h ../common/aiccu.h ../common/hash_md5.h ../common/hash_sha1.h ../common/common.h ../common/heartbeat.h ../common/tic.h ../common/ayiya.h ../common/resolver.h
-OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o
+OBJS = main.o ../common/tun.o ../common/aiccu.o ../common/hash_md5.o ../common/hash_sha1.o ../common/common.o ../common/heartbeat.o ../common/tic.o ../common/ayiya.o ../common/aiccu_test.o ../common/resolver.o ../common/dn_skipname.o
# New features not fully implemented and thus disabled for now
#CFLAGS += -D NEWSTUFF_TSP -D NEWSTUFF_TEEPEE

+ 0
- 29
ipv6/aiccu/patches/300-resolver-uclibc.patch View File

@ -1,29 +0,0 @@
--- a/common/resolver.c
+++ b/common/resolver.c
@@ -26,7 +26,7 @@
int getrrs(const char *label, int rrtype, void gotrec(unsigned int num, int type, const char *record))
{
-#ifdef _LINUX
+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)
struct __res_state res;
#endif
unsigned char answer[8192];
@@ -38,7 +38,7 @@ int getrrs(const char *label, int rrtype
uint16_t type = 0, class = 0;
uint32_t ttl = 0;
-#ifdef _LINUX
+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)
memset(&res, 0, sizeof(res));
res.options = RES_DEBUG;
res_ninit(&res);
@@ -47,7 +47,7 @@ int getrrs(const char *label, int rrtype
#endif
memset(answer, 0, sizeof(answer));
-#ifdef _LINUX
+#if defined(_LINUX) && defined(__GLIBC__) && !defined(__UCLIBC__)
ret = res_nquery(&res, label, C_IN, rrtype, answer, sizeof(answer));
#else
ret = res_query(label, C_IN, rrtype, answer, sizeof(answer));

+ 0
- 31
ipv6/aiccu/patches/400-musl-compat.patch View File

@ -1,31 +0,0 @@
--- a/common/common.h
+++ b/common/common.h
@@ -50,6 +50,7 @@
#include <signal.h>
#include <sys/types.h>
#include <sys/stat.h>
+#include <sys/uio.h>
#include <fcntl.h>
#if defined(_SUNOS) || defined(_AIX) || defined(_DARWIN)
@@ -91,7 +92,9 @@
#include <sys/select.h>
#include <net/if.h>
+#if defined(__GLIBC__) || defined(__UCLIBC__)
#include <netinet/if_ether.h>
+#endif
#ifdef linux
#include <netpacket/packet.h>
#include <linux/if_tun.h>
--- a/common/dn_skipname.c
+++ b/common/dn_skipname.c
@@ -1,6 +1,8 @@
#include <errno.h>
#include <resolv.h>
+#include <sys/types.h>
+
/* Ripped from glibc 2.4 sources. */
/*

+ 0
- 22
ipv6/aiccu/patches/500-gnutls_3.4.patch View File

@ -1,22 +0,0 @@
--- aiccu/common/common.c
+++ aiccu/common/common.c
@@ -271,8 +271,6 @@
TLSSOCKET sock_alloc(void)
{
#ifdef AICCU_GNUTLS
- /* Allow connections to servers that have OpenPGP keys as well */
- const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 };
int ret;
#endif /* AICCU_GNUTLS*/
@@ -300,7 +298,8 @@
gnutls_set_default_priority(sock->session);
/* XXX: Return value is not documented in GNUTLS documentation! */
- gnutls_certificate_type_set_priority(sock->session, cert_type_priority);
+ /* Allow connections to servers that have OpenPGP keys as well */
+ gnutls_priority_set_direct(sock->session, "NORMAL:+CTYPE-OPENPGP", NULL);
/* XXX: Return value is not documented in GNUTLS documentation! */
/* Configure the x509 credentials for the current session */

Loading…
Cancel
Save