diff options
author | James <> | 2013-03-17 12:16:37 +0000 |
---|---|---|
committer | James <> | 2013-03-17 12:16:37 +0000 |
commit | 27b76ab0671089c47506615a796a261e993896a7 (patch) | |
tree | 61213d67e7fa87b20356b23798558e2c4212c42f /package/network/ipv6 | |
download | trunk-36060-master.tar.gz trunk-36060-master.tar.bz2 trunk-36060-master.zip |
Diffstat (limited to 'package/network/ipv6')
58 files changed, 3325 insertions, 0 deletions
diff --git a/package/network/ipv6/.svn/entries b/package/network/ipv6/.svn/entries new file mode 100644 index 0000000..d048ac0 --- /dev/null +++ b/package/network/ipv6/.svn/entries @@ -0,0 +1,49 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6 +svn://svn.openwrt.org/openwrt + + + +2013-03-08T07:04:38.512412Z +35902 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6in4 +dir + +thc-ipv6 +dir + +6relayd +dir + +odhcp6c +dir + +6rd +dir + +6to4 +dir + +ipv6-support +dir + diff --git a/package/network/ipv6/6in4/.svn/entries b/package/network/ipv6/6in4/.svn/entries new file mode 100644 index 0000000..7a482c8 --- /dev/null +++ b/package/network/ipv6/6in4/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6in4 +svn://svn.openwrt.org/openwrt + + + +2013-01-30T09:07:23.635655Z +35409 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +d3b2dddfdfc31b48422d9e6d7e3646e5 +2013-01-30T09:05:53.592950Z +35408 +cyrus + + + + + + + + + + + + + + + + + + + + + +867 + diff --git a/package/network/ipv6/6in4/.svn/text-base/Makefile.svn-base b/package/network/ipv6/6in4/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..7090234 --- /dev/null +++ b/package/network/ipv6/6in4/.svn/text-base/Makefile.svn-base @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010-2012 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:=6in4 +PKG_VERSION:=14 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6in4 + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=IPv6-in-IPv4 configuration support + MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> + PKGARCH:=all +endef + +define Package/6in4/description +Provides support for 6in4 tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/6in4/install + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6in4.sh $(1)/lib/netifd/proto/6in4.sh +endef + +$(eval $(call BuildPackage,6in4)) diff --git a/package/network/ipv6/6in4/Makefile b/package/network/ipv6/6in4/Makefile new file mode 100644 index 0000000..7090234 --- /dev/null +++ b/package/network/ipv6/6in4/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010-2012 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:=6in4 +PKG_VERSION:=14 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6in4 + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=IPv6-in-IPv4 configuration support + MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> + PKGARCH:=all +endef + +define Package/6in4/description +Provides support for 6in4 tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/6in4/install + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6in4.sh $(1)/lib/netifd/proto/6in4.sh +endef + +$(eval $(call BuildPackage,6in4)) diff --git a/package/network/ipv6/6in4/files/.svn/entries b/package/network/ipv6/6in4/files/.svn/entries new file mode 100644 index 0000000..01a84d1 --- /dev/null +++ b/package/network/ipv6/6in4/files/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6in4/files +svn://svn.openwrt.org/openwrt + + + +2013-01-30T09:07:23.635655Z +35409 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6in4.sh +file + + + + +2013-03-17T12:13:19.000000Z +752b06366af2826d4be405b5e38ee151 +2013-01-30T09:07:23.635655Z +35409 +cyrus +has-props + + + + + + + + + + + + + + + + + + + + +2294 + diff --git a/package/network/ipv6/6in4/files/.svn/prop-base/6in4.sh.svn-base b/package/network/ipv6/6in4/files/.svn/prop-base/6in4.sh.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/package/network/ipv6/6in4/files/.svn/prop-base/6in4.sh.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/package/network/ipv6/6in4/files/.svn/text-base/6in4.sh.svn-base b/package/network/ipv6/6in4/files/.svn/text-base/6in4.sh.svn-base new file mode 100644 index 0000000..647a2f8 --- /dev/null +++ b/package/network/ipv6/6in4/files/.svn/text-base/6in4.sh.svn-base @@ -0,0 +1,97 @@ +#!/bin/sh +# 6in4.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_6in4_setup() { + local cfg="$1" + local iface="$2" + local link="6in4-$cfg" + + local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password + json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password + + [ -z "$peeraddr" ] && { + proto_notify_error "$cfg" "MISSING_ADDRESS" + proto_block_restart "$cfg" + return + } + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + [ -z "$ipaddr" ] && { + local wanif + if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + } + + proto_init_update "$link" 1 + proto_add_ipv6_route "::" 0 + + [ -n "$ip6addr" ] && { + local local6="${ip6addr%%/*}" + local mask6="${ip6addr##*/}" + [[ "$local6" = "$mask6" ]] && mask6= + proto_add_ipv6_address "$local6" "$mask6" + } + + [ -n "$ip6prefix" ] && proto_add_ipv6_prefix "$ip6prefix" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + json_add_string remote "$peeraddr" + proto_close_tunnel + + proto_send_update "$cfg" + + [ -n "$tunnelid" -a -n "$username" -a -n "$password" ] && { + [ "${#password}" == 32 -a -z "${password//[a-fA-F0-9]/}" ] || { + password="$(echo -n "$password" | md5sum)"; password="${password%% *}" + } + + local url="http://ipv4.tunnelbroker.net/ipv4_end.php?ip=AUTO&apikey=$username&pass=$password&tid=$tunnelid" + local try=0 + local max=3 + + while [ $((++try)) -le $max ]; do + ( exec wget -qO/dev/null "$url" 2>/dev/null ) & + local pid=$! + ( sleep 5; kill $pid 2>/dev/null ) & + wait $pid && break + done + } +} + +proto_6in4_teardown() { + local cfg="$1" +} + +proto_6in4_init_config() { + no_device=1 + available=1 + + proto_config_add_string "ipaddr" + proto_config_add_string "ip6addr" + proto_config_add_string "ip6prefix" + proto_config_add_string "peeraddr" + proto_config_add_string "tunnelid" + proto_config_add_string "username" + proto_config_add_string "password" + proto_config_add_int "mtu" + proto_config_add_int "ttl" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6in4 +} diff --git a/package/network/ipv6/6in4/files/6in4.sh b/package/network/ipv6/6in4/files/6in4.sh new file mode 100755 index 0000000..647a2f8 --- /dev/null +++ b/package/network/ipv6/6in4/files/6in4.sh @@ -0,0 +1,97 @@ +#!/bin/sh +# 6in4.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_6in4_setup() { + local cfg="$1" + local iface="$2" + local link="6in4-$cfg" + + local mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password + json_get_vars mtu ttl ipaddr peeraddr ip6addr ip6prefix tunnelid username password + + [ -z "$peeraddr" ] && { + proto_notify_error "$cfg" "MISSING_ADDRESS" + proto_block_restart "$cfg" + return + } + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + [ -z "$ipaddr" ] && { + local wanif + if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + } + + proto_init_update "$link" 1 + proto_add_ipv6_route "::" 0 + + [ -n "$ip6addr" ] && { + local local6="${ip6addr%%/*}" + local mask6="${ip6addr##*/}" + [[ "$local6" = "$mask6" ]] && mask6= + proto_add_ipv6_address "$local6" "$mask6" + } + + [ -n "$ip6prefix" ] && proto_add_ipv6_prefix "$ip6prefix" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + json_add_string remote "$peeraddr" + proto_close_tunnel + + proto_send_update "$cfg" + + [ -n "$tunnelid" -a -n "$username" -a -n "$password" ] && { + [ "${#password}" == 32 -a -z "${password//[a-fA-F0-9]/}" ] || { + password="$(echo -n "$password" | md5sum)"; password="${password%% *}" + } + + local url="http://ipv4.tunnelbroker.net/ipv4_end.php?ip=AUTO&apikey=$username&pass=$password&tid=$tunnelid" + local try=0 + local max=3 + + while [ $((++try)) -le $max ]; do + ( exec wget -qO/dev/null "$url" 2>/dev/null ) & + local pid=$! + ( sleep 5; kill $pid 2>/dev/null ) & + wait $pid && break + done + } +} + +proto_6in4_teardown() { + local cfg="$1" +} + +proto_6in4_init_config() { + no_device=1 + available=1 + + proto_config_add_string "ipaddr" + proto_config_add_string "ip6addr" + proto_config_add_string "ip6prefix" + proto_config_add_string "peeraddr" + proto_config_add_string "tunnelid" + proto_config_add_string "username" + proto_config_add_string "password" + proto_config_add_int "mtu" + proto_config_add_int "ttl" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6in4 +} diff --git a/package/network/ipv6/6rd/.svn/entries b/package/network/ipv6/6rd/.svn/entries new file mode 100644 index 0000000..7454b8e --- /dev/null +++ b/package/network/ipv6/6rd/.svn/entries @@ -0,0 +1,68 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6rd +svn://svn.openwrt.org/openwrt + + + +2013-01-15T13:08:14.524192Z +35173 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +src +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +1ed988f895276b36ca94509d7b34d884 +2013-01-15T13:08:14.524192Z +35173 +cyrus + + + + + + + + + + + + + + + + + + + + + +1143 + diff --git a/package/network/ipv6/6rd/.svn/text-base/Makefile.svn-base b/package/network/ipv6/6rd/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..f64cab3 --- /dev/null +++ b/package/network/ipv6/6rd/.svn/text-base/Makefile.svn-base @@ -0,0 +1,53 @@ +# +# Copyright (C) 2010-2012 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:=6rd +PKG_VERSION:=3 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6rd + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=6rd configuration support + MAINTAINER:=Stéphan Kochen <stephan@kochen.nl> + PKGARCH:=all +endef + +define Package/6rd/description +Provides support for 6rd tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/6rd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/6rdcalc $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6rd.sh $(1)/lib/netifd/proto/6rd.sh +endef + +$(eval $(call BuildPackage,6rd)) diff --git a/package/network/ipv6/6rd/Makefile b/package/network/ipv6/6rd/Makefile new file mode 100644 index 0000000..f64cab3 --- /dev/null +++ b/package/network/ipv6/6rd/Makefile @@ -0,0 +1,53 @@ +# +# Copyright (C) 2010-2012 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:=6rd +PKG_VERSION:=3 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6rd + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=6rd configuration support + MAINTAINER:=Stéphan Kochen <stephan@kochen.nl> + PKGARCH:=all +endef + +define Package/6rd/description +Provides support for 6rd tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Prepare + mkdir -p $(PKG_BUILD_DIR) + $(CP) ./src/* $(PKG_BUILD_DIR)/ +endef + +define Build/Configure +endef + +define Build/Compile + $(MAKE) -C $(PKG_BUILD_DIR) \ + CC="$(TARGET_CC)" \ + CFLAGS="$(TARGET_CFLAGS) -Wall" \ + LDFLAGS="$(TARGET_LDFLAGS)" +endef + +define Package/6rd/install + $(INSTALL_DIR) $(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/6rdcalc $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6rd.sh $(1)/lib/netifd/proto/6rd.sh +endef + +$(eval $(call BuildPackage,6rd)) diff --git a/package/network/ipv6/6rd/files/.svn/entries b/package/network/ipv6/6rd/files/.svn/entries new file mode 100644 index 0000000..178384a --- /dev/null +++ b/package/network/ipv6/6rd/files/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6rd/files +svn://svn.openwrt.org/openwrt + + + +2013-01-15T13:08:14.524192Z +35173 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6rd.sh +file + + + + +2013-03-17T12:13:19.000000Z +5abd0f2cf32c18ad7a5c9b6ff29d3de3 +2013-01-15T13:08:14.524192Z +35173 +cyrus + + + + + + + + + + + + + + + + + + + + + +2071 + diff --git a/package/network/ipv6/6rd/files/.svn/text-base/6rd.sh.svn-base b/package/network/ipv6/6rd/files/.svn/text-base/6rd.sh.svn-base new file mode 100644 index 0000000..b681f2b --- /dev/null +++ b/package/network/ipv6/6rd/files/.svn/text-base/6rd.sh.svn-base @@ -0,0 +1,84 @@ +#!/bin/sh +# 6rd.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_6rd_setup() { + local cfg="$1" + local iface="$2" + local link="6rd-$cfg" + + local mtu ttl ipaddr peeraddr ip6prefix ip6prefixlen ip4prefixlen + json_get_vars mtu ttl ipaddr peeraddr ip6prefix ip6prefixlen ip4prefixlen + + [ -z "$ip6prefix" -o -z "$peeraddr" ] && { + proto_notify_error "$cfg" "MISSING_ADDRESS" + proto_block_restart "$cfg" + return + } + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + [ -z "$ipaddr" ] && { + local wanif + if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + } + + # Determine the relay prefix. + local ip4prefixlen="${ip4prefixlen:-0}" + local ip4prefix=$(ipcalc.sh "$ipaddr/$ip4prefixlen" | grep NETWORK) + ip4prefix="${ip4prefix#NETWORK=}" + + # Determine our IPv6 address. + local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen") + local ip6addr="${ip6subnet%%::*}::1" + + # Determine the IPv6 prefix + local ip6lanprefix="$ip6subnet/$(($ip6prefixlen + 32 - $ip4prefixlen))" + + proto_init_update "$link" 1 + proto_add_ipv6_address "$ip6addr" "$ip6prefixlen" + proto_add_ipv6_prefix "$ip6lanprefix" + proto_add_ipv6_route "::" 0 "::$peeraddr" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + json_add_string 6rd-prefix "$ip6prefix/$ip6prefixlen" + json_add_string 6rd-relay-prefix "$ip4prefix/$ip4prefixlen" + proto_close_tunnel + + proto_send_update "$cfg" +} + +proto_6rd_teardown() { + local cfg="$1" +} + +proto_6rd_init_config() { + no_device=1 + available=1 + + proto_config_add_int "mtu" + proto_config_add_int "ttl" + proto_config_add_string "ipaddr" + proto_config_add_string "peeraddr" + proto_config_add_string "ip6prefix" + proto_config_add_string "ip6prefixlen" + proto_config_add_string "ip4prefixlen" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6rd +} diff --git a/package/network/ipv6/6rd/files/6rd.sh b/package/network/ipv6/6rd/files/6rd.sh new file mode 100644 index 0000000..b681f2b --- /dev/null +++ b/package/network/ipv6/6rd/files/6rd.sh @@ -0,0 +1,84 @@ +#!/bin/sh +# 6rd.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +proto_6rd_setup() { + local cfg="$1" + local iface="$2" + local link="6rd-$cfg" + + local mtu ttl ipaddr peeraddr ip6prefix ip6prefixlen ip4prefixlen + json_get_vars mtu ttl ipaddr peeraddr ip6prefix ip6prefixlen ip4prefixlen + + [ -z "$ip6prefix" -o -z "$peeraddr" ] && { + proto_notify_error "$cfg" "MISSING_ADDRESS" + proto_block_restart "$cfg" + return + } + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + [ -z "$ipaddr" ] && { + local wanif + if ! network_find_wan wanif || ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + } + + # Determine the relay prefix. + local ip4prefixlen="${ip4prefixlen:-0}" + local ip4prefix=$(ipcalc.sh "$ipaddr/$ip4prefixlen" | grep NETWORK) + ip4prefix="${ip4prefix#NETWORK=}" + + # Determine our IPv6 address. + local ip6subnet=$(6rdcalc "$ip6prefix/$ip6prefixlen" "$ipaddr/$ip4prefixlen") + local ip6addr="${ip6subnet%%::*}::1" + + # Determine the IPv6 prefix + local ip6lanprefix="$ip6subnet/$(($ip6prefixlen + 32 - $ip4prefixlen))" + + proto_init_update "$link" 1 + proto_add_ipv6_address "$ip6addr" "$ip6prefixlen" + proto_add_ipv6_prefix "$ip6lanprefix" + proto_add_ipv6_route "::" 0 "::$peeraddr" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + json_add_string 6rd-prefix "$ip6prefix/$ip6prefixlen" + json_add_string 6rd-relay-prefix "$ip4prefix/$ip4prefixlen" + proto_close_tunnel + + proto_send_update "$cfg" +} + +proto_6rd_teardown() { + local cfg="$1" +} + +proto_6rd_init_config() { + no_device=1 + available=1 + + proto_config_add_int "mtu" + proto_config_add_int "ttl" + proto_config_add_string "ipaddr" + proto_config_add_string "peeraddr" + proto_config_add_string "ip6prefix" + proto_config_add_string "ip6prefixlen" + proto_config_add_string "ip4prefixlen" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6rd +} diff --git a/package/network/ipv6/6rd/src/.svn/entries b/package/network/ipv6/6rd/src/.svn/entries new file mode 100644 index 0000000..878d022 --- /dev/null +++ b/package/network/ipv6/6rd/src/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6rd/src +svn://svn.openwrt.org/openwrt + + + +2012-06-18T23:08:18.797281Z +32431 +jow + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6rdcalc.c +file + + + + +2013-03-17T12:13:19.000000Z +99f5d2b1c3aa4af8d44adef1a3b1f4cc +2012-06-18T23:08:18.797281Z +32431 +jow + + + + + + + + + + + + + + + + + + + + + +3114 + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +2f9f4272c2d29bfb72744767524b93eb +2012-06-18T23:08:18.797281Z +32431 +jow + + + + + + + + + + + + + + + + + + + + + +93 + diff --git a/package/network/ipv6/6rd/src/.svn/text-base/6rdcalc.c.svn-base b/package/network/ipv6/6rd/src/.svn/text-base/6rdcalc.c.svn-base new file mode 100644 index 0000000..56e07d2 --- /dev/null +++ b/package/network/ipv6/6rd/src/.svn/text-base/6rdcalc.c.svn-base @@ -0,0 +1,126 @@ +/* + * Utility used to calculate the 6rd subnet. + * + * Copyright 2012, Stéphan Kochen <stephan@kochen.nl> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/errno.h> +#include <arpa/inet.h> +#include <netinet/in.h> + +#define INET_PREFIXSTRLEN (INET_ADDRSTRLEN+3) +#define INET6_PREFIXSTRLEN (INET6_ADDRSTRLEN+4) + +static void print_usage() +{ + fprintf(stderr, "Usage: 6rdcalc <v6 prefix>/<mask> <v4 address>/<mask>\n"); + exit(1); +} + +static void print_error() +{ + fprintf(stderr, "%s", strerror(errno)); + exit(1); +} + +static void parse_str(int af, char *str, void *addr, unsigned long *mask) +{ + int ret; + char *slash; + + /* Split the address at the slash. */ + if ((slash = strchr(str, '/')) == NULL) + print_usage(); + *slash = '\0'; + + /* Parse the address. */ + if ((ret = inet_pton(af, str, addr)) != 1) { + if (ret == 0) + print_usage(); + else + print_error(); + } + + /* Parse the mask. */ + *mask = strtoul(slash+1, NULL, 10); + if ((af == AF_INET && *mask > 32) || + (af == AF_INET6 && *mask > 128)) + print_usage(); +} + +int main(int argc, const char **argv) +{ + char v6str[INET6_PREFIXSTRLEN], v4str[INET_PREFIXSTRLEN]; + struct in6_addr v6; + struct in_addr v4; + unsigned long v6it, v4it, mask; + unsigned char *byte4, *byte6; + unsigned char bit4, bit6; + + /* Check parameters. */ + if (argc != 3) + print_usage(); + + /* Parse the v6 address. */ + strncpy(v6str, argv[1], INET6_PREFIXSTRLEN); + v6str[INET6_PREFIXSTRLEN-1] = '\0'; + parse_str(AF_INET6, v6str, &v6, &v6it); + + /* Parse the v4 address */ + strncpy(v4str, argv[2], INET_PREFIXSTRLEN); + v6str[INET_PREFIXSTRLEN-1] = '\0'; + parse_str(AF_INET, v4str, &v4, &v4it); + + /* Check if the combined mask is within bounds. */ + mask = (32 - v4it) + v6it; + if (mask > 128) + print_usage(); + + /* Combine the addresses. */ + while (v4it < 32) { + byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 3); + byte4 = (unsigned char *)(&v4.s_addr) + (v4it >> 3); + bit6 = 128 >> (v6it & 0x07); + bit4 = 128 >> (v4it & 0x07); + + if (*byte4 & bit4) + *byte6 |= bit6; + else + *byte6 &= ~bit6; + + v4it++; v6it++; + } + + /* Clear remaining bits. */ + while (v6it < 128) { + byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 2); + bit6 = 128 >> (v6it & 0x07); + + *byte6 &= ~bit6; + + v6it++; + } + + /* Print the subnet prefix. */ + if (inet_ntop(AF_INET6, &v6, v6str, sizeof(v6str)) == NULL) + print_error(); + printf("%s/%lu\n", v6str, mask); + return 0; +} diff --git a/package/network/ipv6/6rd/src/.svn/text-base/Makefile.svn-base b/package/network/ipv6/6rd/src/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..2881d43 --- /dev/null +++ b/package/network/ipv6/6rd/src/.svn/text-base/Makefile.svn-base @@ -0,0 +1,7 @@ +all: 6rdcalc + +6rdcalc: 6rdcalc.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + +clean: + rm -f 6rdcalc diff --git a/package/network/ipv6/6rd/src/6rdcalc.c b/package/network/ipv6/6rd/src/6rdcalc.c new file mode 100644 index 0000000..56e07d2 --- /dev/null +++ b/package/network/ipv6/6rd/src/6rdcalc.c @@ -0,0 +1,126 @@ +/* + * Utility used to calculate the 6rd subnet. + * + * Copyright 2012, Stéphan Kochen <stephan@kochen.nl> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + +#include <stdio.h> +#include <stdlib.h> +#include <string.h> +#include <sys/errno.h> +#include <arpa/inet.h> +#include <netinet/in.h> + +#define INET_PREFIXSTRLEN (INET_ADDRSTRLEN+3) +#define INET6_PREFIXSTRLEN (INET6_ADDRSTRLEN+4) + +static void print_usage() +{ + fprintf(stderr, "Usage: 6rdcalc <v6 prefix>/<mask> <v4 address>/<mask>\n"); + exit(1); +} + +static void print_error() +{ + fprintf(stderr, "%s", strerror(errno)); + exit(1); +} + +static void parse_str(int af, char *str, void *addr, unsigned long *mask) +{ + int ret; + char *slash; + + /* Split the address at the slash. */ + if ((slash = strchr(str, '/')) == NULL) + print_usage(); + *slash = '\0'; + + /* Parse the address. */ + if ((ret = inet_pton(af, str, addr)) != 1) { + if (ret == 0) + print_usage(); + else + print_error(); + } + + /* Parse the mask. */ + *mask = strtoul(slash+1, NULL, 10); + if ((af == AF_INET && *mask > 32) || + (af == AF_INET6 && *mask > 128)) + print_usage(); +} + +int main(int argc, const char **argv) +{ + char v6str[INET6_PREFIXSTRLEN], v4str[INET_PREFIXSTRLEN]; + struct in6_addr v6; + struct in_addr v4; + unsigned long v6it, v4it, mask; + unsigned char *byte4, *byte6; + unsigned char bit4, bit6; + + /* Check parameters. */ + if (argc != 3) + print_usage(); + + /* Parse the v6 address. */ + strncpy(v6str, argv[1], INET6_PREFIXSTRLEN); + v6str[INET6_PREFIXSTRLEN-1] = '\0'; + parse_str(AF_INET6, v6str, &v6, &v6it); + + /* Parse the v4 address */ + strncpy(v4str, argv[2], INET_PREFIXSTRLEN); + v6str[INET_PREFIXSTRLEN-1] = '\0'; + parse_str(AF_INET, v4str, &v4, &v4it); + + /* Check if the combined mask is within bounds. */ + mask = (32 - v4it) + v6it; + if (mask > 128) + print_usage(); + + /* Combine the addresses. */ + while (v4it < 32) { + byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 3); + byte4 = (unsigned char *)(&v4.s_addr) + (v4it >> 3); + bit6 = 128 >> (v6it & 0x07); + bit4 = 128 >> (v4it & 0x07); + + if (*byte4 & bit4) + *byte6 |= bit6; + else + *byte6 &= ~bit6; + + v4it++; v6it++; + } + + /* Clear remaining bits. */ + while (v6it < 128) { + byte6 = (unsigned char *)(&v6.s6_addr) + (v6it >> 2); + bit6 = 128 >> (v6it & 0x07); + + *byte6 &= ~bit6; + + v6it++; + } + + /* Print the subnet prefix. */ + if (inet_ntop(AF_INET6, &v6, v6str, sizeof(v6str)) == NULL) + print_error(); + printf("%s/%lu\n", v6str, mask); + return 0; +} diff --git a/package/network/ipv6/6rd/src/Makefile b/package/network/ipv6/6rd/src/Makefile new file mode 100644 index 0000000..2881d43 --- /dev/null +++ b/package/network/ipv6/6rd/src/Makefile @@ -0,0 +1,7 @@ +all: 6rdcalc + +6rdcalc: 6rdcalc.c + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $< + +clean: + rm -f 6rdcalc diff --git a/package/network/ipv6/6relayd/.svn/entries b/package/network/ipv6/6relayd/.svn/entries new file mode 100644 index 0000000..f0c85b4 --- /dev/null +++ b/package/network/ipv6/6relayd/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6relayd +svn://svn.openwrt.org/openwrt + + + +2013-02-28T16:37:20.110304Z +35836 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +f5afb33903e6de931a3cb199b6df4d25 +2013-02-28T16:37:20.110304Z +35836 +cyrus + + + + + + + + + + + + + + + + + + + + + +1747 + diff --git a/package/network/ipv6/6relayd/.svn/text-base/Makefile.svn-base b/package/network/ipv6/6relayd/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..1747a0c --- /dev/null +++ b/package/network/ipv6/6relayd/.svn/text-base/Makefile.svn-base @@ -0,0 +1,57 @@ +# +# Copyright (C) 2012 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:=6relayd +PKG_VERSION:=2013-02-28.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://github.com/sbyx/6relayd.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=be18c9722e8fa76ca96de16fb927b85bfe3197bc + +PKG_MAINTAINER:=Steven Barth <steven@midlink.org> + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/6relayd + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=IPv6-Relay and Server (RD-, DHCPv6- & NDP-Proxy) + DEPENDS:=+kmod-ipv6 +endef + +define Package/6relayd/description + 6relayd is an IPv6-tool that relays IPv6-management protocols like router + discovery, neighbor discovery and DHCPv6 so that clients on routed (non- + bridged) interfaces can use the public address prefix, DHCPv6 and DNS-service + of a master interface. This is useful to avoid NAT in chained IPv6-routers. + + It can also be used as a lightweight router advertisement daemon and provide + stateless DHCPv6 service where size matters. +endef + +define Package/6relayd/conffiles +/etc/config/6relayd +endef + +define Package/6relayd/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/6relayd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/6relayd.hotplug $(1)/etc/hotplug.d/iface/30-6relay + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/6relayd.config $(1)/etc/config/6relayd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/6relayd.init $(1)/etc/init.d/6relayd +endef + +$(eval $(call BuildPackage,6relayd)) diff --git a/package/network/ipv6/6relayd/Makefile b/package/network/ipv6/6relayd/Makefile new file mode 100644 index 0000000..1747a0c --- /dev/null +++ b/package/network/ipv6/6relayd/Makefile @@ -0,0 +1,57 @@ +# +# Copyright (C) 2012 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:=6relayd +PKG_VERSION:=2013-02-28.1 +PKG_RELEASE=$(PKG_SOURCE_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://github.com/sbyx/6relayd.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=be18c9722e8fa76ca96de16fb927b85bfe3197bc + +PKG_MAINTAINER:=Steven Barth <steven@midlink.org> + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/6relayd + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=IPv6-Relay and Server (RD-, DHCPv6- & NDP-Proxy) + DEPENDS:=+kmod-ipv6 +endef + +define Package/6relayd/description + 6relayd is an IPv6-tool that relays IPv6-management protocols like router + discovery, neighbor discovery and DHCPv6 so that clients on routed (non- + bridged) interfaces can use the public address prefix, DHCPv6 and DNS-service + of a master interface. This is useful to avoid NAT in chained IPv6-routers. + + It can also be used as a lightweight router advertisement daemon and provide + stateless DHCPv6 service where size matters. +endef + +define Package/6relayd/conffiles +/etc/config/6relayd +endef + +define Package/6relayd/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/6relayd $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/etc/hotplug.d/iface + $(INSTALL_DATA) ./files/6relayd.hotplug $(1)/etc/hotplug.d/iface/30-6relay + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_DATA) ./files/6relayd.config $(1)/etc/config/6relayd + $(INSTALL_DIR) $(1)/etc/init.d + $(INSTALL_BIN) ./files/6relayd.init $(1)/etc/init.d/6relayd +endef + +$(eval $(call BuildPackage,6relayd)) diff --git a/package/network/ipv6/6relayd/files/.svn/entries b/package/network/ipv6/6relayd/files/.svn/entries new file mode 100644 index 0000000..02e80a3 --- /dev/null +++ b/package/network/ipv6/6relayd/files/.svn/entries @@ -0,0 +1,130 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6relayd/files +svn://svn.openwrt.org/openwrt + + + +2013-02-26T12:50:52.933860Z +35804 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6relayd.hotplug +file + + + + +2013-03-17T12:13:19.000000Z +bd1477ea6cb06081071bc688a0843f8f +2013-01-13T17:25:38.265787Z +35133 +cyrus + + + + + + + + + + + + + + + + + + + + + +131 + +6relayd.init +file + + + + +2013-03-17T12:13:19.000000Z +74a289472660a10ee22b6b98c6e0b0d7 +2013-02-26T12:50:52.933860Z +35804 +cyrus + + + + + + + + + + + + + + + + + + + + + +3388 + +6relayd.config +file + + + + +2013-03-17T12:13:19.000000Z +784924a6963693b36d249277c24374ac +2013-02-26T12:42:53.360009Z +35803 +cyrus + + + + + + + + + + + + + + + + + + + + + +681 + diff --git a/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.config.svn-base b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.config.svn-base new file mode 100644 index 0000000..a4376c0 --- /dev/null +++ b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.config.svn-base @@ -0,0 +1,28 @@ +config server default + option master wan6 + list network lan + option rd server + option dhcpv6 server + option fallback_relay 'rd dhcpv6 ndp' + option compat_ula 1 + + +# Example #1: Create a relay for several networks in proxy mode +# This can be used to proxy Router Discovery, DHCPv6 and NDP. + +#config server examplerelay +# option master 'wan' +# option network 'lan' +# option rd 'relay' +# option dhcpv6 'relay' +# option ndp 'relay' + + +# Example #2: Provide Router Discovery and stateless DHCPv6 in server mode +# This can be used as a small radvd and stateless DHCPv6-server replacement. + +#config server exampleserver +# option network 'lan' +# option rd 'server' +# option dhcpv6 'server' + diff --git a/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.hotplug.svn-base b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.hotplug.svn-base new file mode 100644 index 0000000..7905282 --- /dev/null +++ b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.hotplug.svn-base @@ -0,0 +1,6 @@ +#!/bin/sh +/etc/init.d/6relayd enabled || exit 0 +[ -n "$INTERFACE" ] || exit 0 + +. /etc/init.d/6relayd +restart_affected "$INTERFACE" diff --git a/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.init.svn-base b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.init.svn-base new file mode 100644 index 0000000..ef0c711 --- /dev/null +++ b/package/network/ipv6/6relayd/files/.svn/text-base/6relayd.init.svn-base @@ -0,0 +1,135 @@ +#!/bin/sh /etc/rc.common +# Copyright (c) 2011-2012 OpenWrt.org +START=80 + +start_6relayd() { + local cfg="$1" + local mode="$2" + local args="" + + SERVICE_DAEMONIZE=1 + SERVICE_WRITE_PID=1 + SERVICE_PID_FILE="/var/run/6relayd-$cfg.pid" + [ -f "$SERVICE_PID_FILE" ] && { + if grep -q 6relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then + return 0 + else + rm -f "$SERVICE_PID_FILE" + fi + } + + # Detect master interface + local master masterif + config_get masterif "$cfg" master + network_get_device master "$masterif" + [ -z "$master" ] && master="." + + # Detect slave interfaces + local slaves="" + local slaveifs + config_get slaveifs "$cfg" network + for slaveif in $slaveifs; do + local slave + network_get_device slave "$slaveif" + # Compatibility with old config format + if [ "$mode" = "relay" -a "$master" = "." ]; then + [ -z "$slave" ] && return 0 + master="$slave" + else + [ -n "$slave" ] && append slaves "$slave" + fi + done + + # Bail if no slaves are active + [ -z "$slaves" ] && return 0 + + # Configure services + local rd dhcpv6 ndp + config_get rd "$cfg" rd + config_get dhcpv6 "$cfg" dhcpv6 + config_get ndp "$cfg" ndp + + # Test for fallback mode + local fallback fallback_relay + config_get fallback_relay "$cfg" fallback_relay + + if [ -n "$fallback_relay" -a "$master" != "." ]; then + local prefix + network_get_prefix6 prefix "$masterif" + [ -z "$prefix" ] && fallback=1 + fi + + if [ -n "$fallback" ]; then + for service in $fallback_relay; do + eval "$service=relay" + done + fi + + # Configure feature options + local always_rewrite_dns rewrite_dns_addr + config_get_bool always_rewrite_dns "$cfg" always_rewrite_dns 0 + config_get rewrite_dns_addr "$cfg" rewrite_dns_addr + [ "$always_rewrite_dns" -eq 1 -o -n "$rewrite_dns_addr" ] && append args "-n$rewrite_dns_addr" + + local always_assume_default + config_get_bool always_assume_default "$cfg" always_assume_default 0 + [ "$always_assume_default" -eq 1 ] && append args "-u" + + local compat_ula + config_get_bool compat_ula "$cfg" compat_ula 0 + [ "$compat_ula" -eq 1 ] && append args "-c" + + [ "$ndp" = "relay" ] && append args "-N -s -l" + [ "$rd" = "relay" ] && append args "-Rrelay" + [ "$rd" = "server" ] && append args "-Rserver" + [ "$dhcpv6" = "relay" ] && append args "-Drelay" + [ "$dhcpv6" = "server" ] && append args "-Dserver" + [ "$ndp" != "relay" -a "$rd" != "relay" -a "$dhcpv6" != "relay" ] && master="." + + service_start /usr/sbin/6relayd $args $master $slaves +} + +restart_affected_6relayd() { + local cfg="$1" + local net="$2" + local mode="$3" + + local master slaves + config_get master "$cfg" master + config_get slaves "$cfg" network + + for iface in $master $slaves; do + if [ "$iface" = "$net" ]; then + SERVICE_PID_FILE="/var/run/6relayd-$cfg.pid" + service_stop /usr/sbin/6relayd + rm -f "$SERVICE_PID_FILE" + start_6relayd "$cfg" "$mode" + fi + done +} + +restart_affected() { + . /lib/functions/service.sh + . /lib/functions/network.sh + local net="$1" + config_load 6relayd + config_foreach restart_affected_6relayd server "$net" + config_foreach restart_affected_6relayd relay "$net" "relay" +} + +stop() { + . /lib/functions/service.sh + for pid in /var/run/6relayd-*.pid; do + SERVICE_PID_FILE="$pid" + service_stop /usr/sbin/6relayd + rm -f "$SERVICE_PID_FILE" + done +} + +start() { + . /lib/functions/service.sh + . /lib/functions/network.sh + config_load 6relayd + config_foreach start_6relayd server + config_foreach start_6relayd relay relay +} diff --git a/package/network/ipv6/6relayd/files/6relayd.config b/package/network/ipv6/6relayd/files/6relayd.config new file mode 100644 index 0000000..a4376c0 --- /dev/null +++ b/package/network/ipv6/6relayd/files/6relayd.config @@ -0,0 +1,28 @@ +config server default + option master wan6 + list network lan + option rd server + option dhcpv6 server + option fallback_relay 'rd dhcpv6 ndp' + option compat_ula 1 + + +# Example #1: Create a relay for several networks in proxy mode +# This can be used to proxy Router Discovery, DHCPv6 and NDP. + +#config server examplerelay +# option master 'wan' +# option network 'lan' +# option rd 'relay' +# option dhcpv6 'relay' +# option ndp 'relay' + + +# Example #2: Provide Router Discovery and stateless DHCPv6 in server mode +# This can be used as a small radvd and stateless DHCPv6-server replacement. + +#config server exampleserver +# option network 'lan' +# option rd 'server' +# option dhcpv6 'server' + diff --git a/package/network/ipv6/6relayd/files/6relayd.hotplug b/package/network/ipv6/6relayd/files/6relayd.hotplug new file mode 100644 index 0000000..7905282 --- /dev/null +++ b/package/network/ipv6/6relayd/files/6relayd.hotplug @@ -0,0 +1,6 @@ +#!/bin/sh +/etc/init.d/6relayd enabled || exit 0 +[ -n "$INTERFACE" ] || exit 0 + +. /etc/init.d/6relayd +restart_affected "$INTERFACE" diff --git a/package/network/ipv6/6relayd/files/6relayd.init b/package/network/ipv6/6relayd/files/6relayd.init new file mode 100644 index 0000000..ef0c711 --- /dev/null +++ b/package/network/ipv6/6relayd/files/6relayd.init @@ -0,0 +1,135 @@ +#!/bin/sh /etc/rc.common +# Copyright (c) 2011-2012 OpenWrt.org +START=80 + +start_6relayd() { + local cfg="$1" + local mode="$2" + local args="" + + SERVICE_DAEMONIZE=1 + SERVICE_WRITE_PID=1 + SERVICE_PID_FILE="/var/run/6relayd-$cfg.pid" + [ -f "$SERVICE_PID_FILE" ] && { + if grep -q 6relayd "/proc/$(cat $SERVICE_PID_FILE)/cmdline"; then + return 0 + else + rm -f "$SERVICE_PID_FILE" + fi + } + + # Detect master interface + local master masterif + config_get masterif "$cfg" master + network_get_device master "$masterif" + [ -z "$master" ] && master="." + + # Detect slave interfaces + local slaves="" + local slaveifs + config_get slaveifs "$cfg" network + for slaveif in $slaveifs; do + local slave + network_get_device slave "$slaveif" + # Compatibility with old config format + if [ "$mode" = "relay" -a "$master" = "." ]; then + [ -z "$slave" ] && return 0 + master="$slave" + else + [ -n "$slave" ] && append slaves "$slave" + fi + done + + # Bail if no slaves are active + [ -z "$slaves" ] && return 0 + + # Configure services + local rd dhcpv6 ndp + config_get rd "$cfg" rd + config_get dhcpv6 "$cfg" dhcpv6 + config_get ndp "$cfg" ndp + + # Test for fallback mode + local fallback fallback_relay + config_get fallback_relay "$cfg" fallback_relay + + if [ -n "$fallback_relay" -a "$master" != "." ]; then + local prefix + network_get_prefix6 prefix "$masterif" + [ -z "$prefix" ] && fallback=1 + fi + + if [ -n "$fallback" ]; then + for service in $fallback_relay; do + eval "$service=relay" + done + fi + + # Configure feature options + local always_rewrite_dns rewrite_dns_addr + config_get_bool always_rewrite_dns "$cfg" always_rewrite_dns 0 + config_get rewrite_dns_addr "$cfg" rewrite_dns_addr + [ "$always_rewrite_dns" -eq 1 -o -n "$rewrite_dns_addr" ] && append args "-n$rewrite_dns_addr" + + local always_assume_default + config_get_bool always_assume_default "$cfg" always_assume_default 0 + [ "$always_assume_default" -eq 1 ] && append args "-u" + + local compat_ula + config_get_bool compat_ula "$cfg" compat_ula 0 + [ "$compat_ula" -eq 1 ] && append args "-c" + + [ "$ndp" = "relay" ] && append args "-N -s -l" + [ "$rd" = "relay" ] && append args "-Rrelay" + [ "$rd" = "server" ] && append args "-Rserver" + [ "$dhcpv6" = "relay" ] && append args "-Drelay" + [ "$dhcpv6" = "server" ] && append args "-Dserver" + [ "$ndp" != "relay" -a "$rd" != "relay" -a "$dhcpv6" != "relay" ] && master="." + + service_start /usr/sbin/6relayd $args $master $slaves +} + +restart_affected_6relayd() { + local cfg="$1" + local net="$2" + local mode="$3" + + local master slaves + config_get master "$cfg" master + config_get slaves "$cfg" network + + for iface in $master $slaves; do + if [ "$iface" = "$net" ]; then + SERVICE_PID_FILE="/var/run/6relayd-$cfg.pid" + service_stop /usr/sbin/6relayd + rm -f "$SERVICE_PID_FILE" + start_6relayd "$cfg" "$mode" + fi + done +} + +restart_affected() { + . /lib/functions/service.sh + . /lib/functions/network.sh + local net="$1" + config_load 6relayd + config_foreach restart_affected_6relayd server "$net" + config_foreach restart_affected_6relayd relay "$net" "relay" +} + +stop() { + . /lib/functions/service.sh + for pid in /var/run/6relayd-*.pid; do + SERVICE_PID_FILE="$pid" + service_stop /usr/sbin/6relayd + rm -f "$SERVICE_PID_FILE" + done +} + +start() { + . /lib/functions/service.sh + . /lib/functions/network.sh + config_load 6relayd + config_foreach start_6relayd server + config_foreach start_6relayd relay relay +} diff --git a/package/network/ipv6/6to4/.svn/entries b/package/network/ipv6/6to4/.svn/entries new file mode 100644 index 0000000..bfbf976 --- /dev/null +++ b/package/network/ipv6/6to4/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6to4 +svn://svn.openwrt.org/openwrt + + + +2013-01-15T13:08:10.006426Z +35172 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +8a7e3024fccac4d28a34f17581091319 +2013-01-15T13:08:10.006426Z +35172 +cyrus + + + + + + + + + + + + + + + + + + + + + +867 + diff --git a/package/network/ipv6/6to4/.svn/text-base/Makefile.svn-base b/package/network/ipv6/6to4/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..72906fb --- /dev/null +++ b/package/network/ipv6/6to4/.svn/text-base/Makefile.svn-base @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010-2012 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:=6to4 +PKG_VERSION:=12 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6to4 + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=IPv6-to-IPv4 configuration support + MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> + PKGARCH:=all +endef + +define Package/6to4/description +Provides support for 6to4 tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/6to4/install + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6to4.sh $(1)/lib/netifd/proto/6to4.sh +endef + +$(eval $(call BuildPackage,6to4)) diff --git a/package/network/ipv6/6to4/Makefile b/package/network/ipv6/6to4/Makefile new file mode 100644 index 0000000..72906fb --- /dev/null +++ b/package/network/ipv6/6to4/Makefile @@ -0,0 +1,42 @@ +# +# Copyright (C) 2010-2012 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:=6to4 +PKG_VERSION:=12 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/6to4 + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +kmod-sit + TITLE:=IPv6-to-IPv4 configuration support + MAINTAINER:=Jo-Philipp Wich <xm@subsignal.org> + PKGARCH:=all +endef + +define Package/6to4/description +Provides support for 6to4 tunnels in /etc/config/network. +Refer to http://wiki.openwrt.org/doc/uci/network for +configuration details. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/6to4/install + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/6to4.sh $(1)/lib/netifd/proto/6to4.sh +endef + +$(eval $(call BuildPackage,6to4)) diff --git a/package/network/ipv6/6to4/files/.svn/entries b/package/network/ipv6/6to4/files/.svn/entries new file mode 100644 index 0000000..025ec07 --- /dev/null +++ b/package/network/ipv6/6to4/files/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/6to4/files +svn://svn.openwrt.org/openwrt + + + +2013-01-15T13:08:10.006426Z +35172 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +6to4.sh +file + + + + +2013-03-17T12:13:19.000000Z +4a28c5c1df028f23d81f88924d2b5cda +2013-01-15T13:08:10.006426Z +35172 +cyrus +has-props + + + + + + + + + + + + + + + + + + + + +1853 + diff --git a/package/network/ipv6/6to4/files/.svn/prop-base/6to4.sh.svn-base b/package/network/ipv6/6to4/files/.svn/prop-base/6to4.sh.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/package/network/ipv6/6to4/files/.svn/prop-base/6to4.sh.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/package/network/ipv6/6to4/files/.svn/text-base/6to4.sh.svn-base b/package/network/ipv6/6to4/files/.svn/text-base/6to4.sh.svn-base new file mode 100644 index 0000000..6f2fbd8 --- /dev/null +++ b/package/network/ipv6/6to4/files/.svn/text-base/6to4.sh.svn-base @@ -0,0 +1,94 @@ +#!/bin/sh +# 6to4.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +find_6to4_prefix() { + local ip4="$1" + local oIFS="$IFS"; IFS="."; set -- $ip4; IFS="$oIFS" + + printf "2002:%02x%02x:%02x%02x\n" $1 $2 $3 $4 +} + +test_6to4_rfc1918() +{ + local oIFS="$IFS"; IFS="."; set -- $1; IFS="$oIFS" + [ $1 -eq 10 ] && return 0 + [ $1 -eq 192 ] && [ $2 -eq 168 ] && return 0 + [ $1 -eq 172 ] && [ $2 -ge 16 ] && [ $2 -le 31 ] && return 0 + + # RFC 6598 + [ $1 -eq 100 ] && [ $2 -ge 64 ] && [ $2 -le 127 ] && return 0 + + return 1 +} + +proto_6to4_setup() { + local cfg="$1" + local iface="$2" + local link="6to4-$cfg" + + local mtu ttl ipaddr + json_get_vars mtu ttl ipaddr + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + local wanif + if ! network_find_wan wanif; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + + [ -z "$ipaddr" ] && { + if ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_ADDRESS" + return + fi + } + + test_6to4_rfc1918 "$ipaddr" && { + proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS" + return + } + + # find our local prefix + local prefix6=$(find_6to4_prefix "$ipaddr") + local local6="$prefix6::1" + + proto_init_update "$link" 1 + proto_add_ipv6_address "$local6" 16 + proto_add_ipv6_prefix "$prefix6::/48" + proto_add_ipv6_route "::" 0 "::192.88.99.1" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + proto_close_tunnel + + proto_send_update "$cfg" +} + +proto_6to4_teardown() { + local cfg="$1" +} + +proto_6to4_init_config() { + no_device=1 + available=1 + + proto_config_add_string "ipaddr" + proto_config_add_int "mtu" + proto_config_add_int "ttl" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6to4 +} diff --git a/package/network/ipv6/6to4/files/6to4.sh b/package/network/ipv6/6to4/files/6to4.sh new file mode 100755 index 0000000..6f2fbd8 --- /dev/null +++ b/package/network/ipv6/6to4/files/6to4.sh @@ -0,0 +1,94 @@ +#!/bin/sh +# 6to4.sh - IPv6-in-IPv4 tunnel backend +# Copyright (c) 2010-2012 OpenWrt.org + +[ -n "$INCLUDE_ONLY" ] || { + . /lib/functions.sh + . /lib/functions/network.sh + . ../netifd-proto.sh + init_proto "$@" +} + +find_6to4_prefix() { + local ip4="$1" + local oIFS="$IFS"; IFS="."; set -- $ip4; IFS="$oIFS" + + printf "2002:%02x%02x:%02x%02x\n" $1 $2 $3 $4 +} + +test_6to4_rfc1918() +{ + local oIFS="$IFS"; IFS="."; set -- $1; IFS="$oIFS" + [ $1 -eq 10 ] && return 0 + [ $1 -eq 192 ] && [ $2 -eq 168 ] && return 0 + [ $1 -eq 172 ] && [ $2 -ge 16 ] && [ $2 -le 31 ] && return 0 + + # RFC 6598 + [ $1 -eq 100 ] && [ $2 -ge 64 ] && [ $2 -le 127 ] && return 0 + + return 1 +} + +proto_6to4_setup() { + local cfg="$1" + local iface="$2" + local link="6to4-$cfg" + + local mtu ttl ipaddr + json_get_vars mtu ttl ipaddr + + ( proto_add_host_dependency "$cfg" 0.0.0.0 ) + + local wanif + if ! network_find_wan wanif; then + proto_notify_error "$cfg" "NO_WAN_LINK" + return + fi + + [ -z "$ipaddr" ] && { + if ! network_get_ipaddr ipaddr "$wanif"; then + proto_notify_error "$cfg" "NO_WAN_ADDRESS" + return + fi + } + + test_6to4_rfc1918 "$ipaddr" && { + proto_notify_error "$cfg" "INVALID_LOCAL_ADDRESS" + return + } + + # find our local prefix + local prefix6=$(find_6to4_prefix "$ipaddr") + local local6="$prefix6::1" + + proto_init_update "$link" 1 + proto_add_ipv6_address "$local6" 16 + proto_add_ipv6_prefix "$prefix6::/48" + proto_add_ipv6_route "::" 0 "::192.88.99.1" + + proto_add_tunnel + json_add_string mode sit + json_add_int mtu "${mtu:-1280}" + json_add_int ttl "${ttl:-64}" + json_add_string local "$ipaddr" + proto_close_tunnel + + proto_send_update "$cfg" +} + +proto_6to4_teardown() { + local cfg="$1" +} + +proto_6to4_init_config() { + no_device=1 + available=1 + + proto_config_add_string "ipaddr" + proto_config_add_int "mtu" + proto_config_add_int "ttl" +} + +[ -n "$INCLUDE_ONLY" ] || { + add_protocol 6to4 +} diff --git a/package/network/ipv6/ipv6-support/.svn/entries b/package/network/ipv6/ipv6-support/.svn/entries new file mode 100644 index 0000000..bf569ea --- /dev/null +++ b/package/network/ipv6/ipv6-support/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/ipv6-support +svn://svn.openwrt.org/openwrt + + + +2013-01-23T08:15:09.884089Z +35302 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +9718fb88ca6a0a8205862cb406c6eac4 +2013-01-23T08:15:09.884089Z +35302 +cyrus + + + + + + + + + + + + + + + + + + + + + +976 + diff --git a/package/network/ipv6/ipv6-support/.svn/text-base/Makefile.svn-base b/package/network/ipv6/ipv6-support/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..5ad52f8 --- /dev/null +++ b/package/network/ipv6/ipv6-support/.svn/text-base/Makefile.svn-base @@ -0,0 +1,41 @@ +# +# Copyright (C) 2010-2012 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:=ipv6-support +PKG_VERSION:=2013-01-23 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipv6-support + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +6relayd +odhcp6c +ip6tables + TITLE:=Basic IPv6-support for Customer Edge Routers + MAINTAINER:=Steven Barth <steven@midlink.org> + PKGARCH:=all +endef + +define Package/ipv6-support/description +This package provides basic IPv6 support including Router Discovery, +DHCPv6 (client & server), prefix delegation and distribution. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/ipv6-support/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/network-enable-ipv6.defaults $(1)/etc/uci-defaults/10_network-enable-ipv6 +endef + +$(eval $(call BuildPackage,ipv6-support)) diff --git a/package/network/ipv6/ipv6-support/Makefile b/package/network/ipv6/ipv6-support/Makefile new file mode 100644 index 0000000..5ad52f8 --- /dev/null +++ b/package/network/ipv6/ipv6-support/Makefile @@ -0,0 +1,41 @@ +# +# Copyright (C) 2010-2012 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:=ipv6-support +PKG_VERSION:=2013-01-23 +PKG_RELEASE:=1 + +include $(INCLUDE_DIR)/package.mk + +define Package/ipv6-support + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+kmod-ipv6 +6relayd +odhcp6c +ip6tables + TITLE:=Basic IPv6-support for Customer Edge Routers + MAINTAINER:=Steven Barth <steven@midlink.org> + PKGARCH:=all +endef + +define Package/ipv6-support/description +This package provides basic IPv6 support including Router Discovery, +DHCPv6 (client & server), prefix delegation and distribution. +endef + +define Build/Compile +endef + +define Build/Configure +endef + +define Package/ipv6-support/install + $(INSTALL_DIR) $(1)/etc/uci-defaults + $(INSTALL_BIN) ./files/network-enable-ipv6.defaults $(1)/etc/uci-defaults/10_network-enable-ipv6 +endef + +$(eval $(call BuildPackage,ipv6-support)) diff --git a/package/network/ipv6/ipv6-support/files/.svn/entries b/package/network/ipv6/ipv6-support/files/.svn/entries new file mode 100644 index 0000000..b83bd5e --- /dev/null +++ b/package/network/ipv6/ipv6-support/files/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/ipv6-support/files +svn://svn.openwrt.org/openwrt + + + +2013-01-23T08:15:09.884089Z +35302 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +network-enable-ipv6.defaults +file + + + + +2013-03-17T12:13:19.000000Z +4c1917685a599be500f2b52c82c50c89 +2013-01-23T08:15:09.884089Z +35302 +cyrus + + + + + + + + + + + + + + + + + + + + + +340 + diff --git a/package/network/ipv6/ipv6-support/files/.svn/text-base/network-enable-ipv6.defaults.svn-base b/package/network/ipv6/ipv6-support/files/.svn/text-base/network-enable-ipv6.defaults.svn-base new file mode 100644 index 0000000..3da74b1 --- /dev/null +++ b/package/network/ipv6/ipv6-support/files/.svn/text-base/network-enable-ipv6.defaults.svn-base @@ -0,0 +1,14 @@ +#!/bin/sh +# Don't override existing settings +uci get network.globals && exit 0 + +uci -q batch <<-EOF >/dev/null + set network.globals=globals + set network.globals.ula_prefix=auto + set network.wan6=interface + set network.wan6.proto=dhcpv6 + set network.wan6.ifname=@wan + set network.lan.ip6assign=64 + set network.wan.ipv6=1 + commit network +EOF diff --git a/package/network/ipv6/ipv6-support/files/network-enable-ipv6.defaults b/package/network/ipv6/ipv6-support/files/network-enable-ipv6.defaults new file mode 100644 index 0000000..3da74b1 --- /dev/null +++ b/package/network/ipv6/ipv6-support/files/network-enable-ipv6.defaults @@ -0,0 +1,14 @@ +#!/bin/sh +# Don't override existing settings +uci get network.globals && exit 0 + +uci -q batch <<-EOF >/dev/null + set network.globals=globals + set network.globals.ula_prefix=auto + set network.wan6=interface + set network.wan6.proto=dhcpv6 + set network.wan6.ifname=@wan + set network.lan.ip6assign=64 + set network.wan.ipv6=1 + commit network +EOF diff --git a/package/network/ipv6/odhcp6c/.svn/entries b/package/network/ipv6/odhcp6c/.svn/entries new file mode 100644 index 0000000..a3e7ce9 --- /dev/null +++ b/package/network/ipv6/odhcp6c/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/odhcp6c +svn://svn.openwrt.org/openwrt + + + +2013-03-08T07:04:38.512412Z +35902 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +files +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +b68e611d0879b02a6c3bdccacc091507 +2013-03-08T07:04:38.512412Z +35902 +cyrus + + + + + + + + + + + + + + + + + + + + + +1051 + diff --git a/package/network/ipv6/odhcp6c/.svn/text-base/Makefile.svn-base b/package/network/ipv6/odhcp6c/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..f1509f7 --- /dev/null +++ b/package/network/ipv6/odhcp6c/.svn/text-base/Makefile.svn-base @@ -0,0 +1,39 @@ +# +# Copyright (C) 2012 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:=odhcp6c +PKG_VERSION:=2013-03-08 +PKG_RELEASE=$(PKG_SOURCE_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://github.com/sbyx/odhcp6c.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=e8b07f018cbdf8f2a08f93af46904e7ffb9eb123 +PKG_MAINTAINER:=Steven Barth <steven@midlink.org> + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/odhcp6c + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=Embedded DHCPv6-client for OpenWrt + DEPENDS:=+kmod-ipv6 +endef + +define Package/odhcp6c/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/dhcpv6.sh $(1)/lib/netifd/proto/dhcpv6.sh + $(INSTALL_BIN) ./files/dhcpv6.script $(1)/lib/netifd/ +endef + +$(eval $(call BuildPackage,odhcp6c)) diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile new file mode 100644 index 0000000..f1509f7 --- /dev/null +++ b/package/network/ipv6/odhcp6c/Makefile @@ -0,0 +1,39 @@ +# +# Copyright (C) 2012 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:=odhcp6c +PKG_VERSION:=2013-03-08 +PKG_RELEASE=$(PKG_SOURCE_VERSION) + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION) +PKG_SOURCE_URL:=git://github.com/sbyx/odhcp6c.git +PKG_SOURCE_PROTO:=git +PKG_SOURCE_VERSION:=e8b07f018cbdf8f2a08f93af46904e7ffb9eb123 +PKG_MAINTAINER:=Steven Barth <steven@midlink.org> + +include $(INCLUDE_DIR)/package.mk +include $(INCLUDE_DIR)/cmake.mk + +define Package/odhcp6c + SECTION:=ipv6 + CATEGORY:=IPv6 + TITLE:=Embedded DHCPv6-client for OpenWrt + DEPENDS:=+kmod-ipv6 +endef + +define Package/odhcp6c/install + $(INSTALL_DIR) $(1)/usr/sbin/ + $(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/lib/netifd/proto + $(INSTALL_BIN) ./files/dhcpv6.sh $(1)/lib/netifd/proto/dhcpv6.sh + $(INSTALL_BIN) ./files/dhcpv6.script $(1)/lib/netifd/ +endef + +$(eval $(call BuildPackage,odhcp6c)) diff --git a/package/network/ipv6/odhcp6c/files/.svn/entries b/package/network/ipv6/odhcp6c/files/.svn/entries new file mode 100644 index 0000000..9f8b8b4 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/.svn/entries @@ -0,0 +1,96 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/odhcp6c/files +svn://svn.openwrt.org/openwrt + + + +2013-03-08T07:04:38.512412Z +35902 +cyrus + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +dhcpv6.sh +file + + + + +2013-03-17T12:13:19.000000Z +d1079bcf1d652c45a8ed50ec66c645b0 +2013-03-08T07:04:38.512412Z +35902 +cyrus +has-props + + + + + + + + + + + + + + + + + + + + +1273 + +dhcpv6.script +file + + + + +2013-03-17T12:13:19.000000Z +da23dd6bd1f991b29d86582d16d817b5 +2013-02-12T08:23:54.096583Z +35570 +cyrus +has-props + + + + + + + + + + + + + + + + + + + + +1913 + diff --git a/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.script.svn-base b/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.script.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.script.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.sh.svn-base b/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.sh.svn-base new file mode 100644 index 0000000..869ac71 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/.svn/prop-base/dhcpv6.sh.svn-base @@ -0,0 +1,5 @@ +K 14 +svn:executable +V 1 +* +END diff --git a/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.script.svn-base b/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.script.svn-base new file mode 100644 index 0000000..56f8c39 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.script.svn-base @@ -0,0 +1,92 @@ +#!/bin/sh +[ -z "$2" ] && echo "Error: should be run by odhcpc6c" && exit 1 +. /lib/functions.sh +. /lib/netifd/netifd-proto.sh + +setup_interface () { + local device="$1" + proto_init_update "*" 1 + + # Merge RA-DNS + for radns in $RA_DNS; do + local duplicate=0 + for dns in $RDNSS; do + [ "$radns" = "$dns" ] && duplicate=1 + done + [ "$duplicate" = 0 ] && RDNSS="$RDNSS $radns" + done + + for dns in $RDNSS; do + proto_add_dns_server "$dns" + done + + for domain in $DOMAINS; do + proto_add_dns_search "$domain" + done + + for prefix in $PREFIXES; do + proto_add_ipv6_prefix "$prefix" + done + + [ -n "$USERPREFIX" ] && proto_add_ipv6_prefix "$USERPREFIX" + + # Merge addresses + for entry in $RA_ADDRESSES; do + local duplicate=0 + local addr="${entry%%/*}" + for dentry in $ADDRESSES; do + local daddr="${dentry%%/*}" + [ "$addr" = "$daddr" ] && duplicate=1 + done + [ "$duplicate" = "0" ] && ADDRESSES="$ADDRESSES $entry" + done + + for entry in $ADDRESSES; do + local addr="${entry%%/*}" + entry="${entry#*/}" + local mask="${entry%%,*}" + entry="${entry#*,}" + local preferred="${entry%%,*}" + entry="${entry#*,}" + local valid="${entry%%,*}" + + proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1 + done + + for entry in $RA_ROUTES; do + local addr="${entry%%/*}" + entry="${entry#*/}" + local mask="${entry%%,*}" + entry="${entry#*,}" + local gw="${entry%%,*}" + entry="${entry#*,}" + local valid="${entry%%,*}" + entry="${entry#*,}" + local metric="${entry%%,*}" + + proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" + done + + proto_send_update "$INTERFACE" + + # TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN +} + +teardown_interface() { + proto_init_update "*" 0 + proto_send_update "$INTERFACE" +} + +case "$2" in + informed|bound|updated|rebound|ra-updated) + setup_interface "$1" + ;; + started|stopped|unbound) + teardown_interface "$1" + ;; +esac + +# user rules +[ -f /etc/odhcp6c.user ] && . /etc/odhcp6c.user + +exit 0 diff --git a/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.sh.svn-base b/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.sh.svn-base new file mode 100644 index 0000000..6cf7521 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/.svn/text-base/dhcpv6.sh.svn-base @@ -0,0 +1,56 @@ +#!/bin/sh + +. /lib/functions.sh +. ../netifd-proto.sh +init_proto "$@" + +proto_dhcpv6_init_config() { + proto_config_add_string "reqaddress" + proto_config_add_string "reqprefix" + proto_config_add_string "clientid" + proto_config_add_string "reqopts" + proto_config_add_string "noslaaconly" + proto_config_add_string "norelease" + proto_config_add_string "ip6prefix" +} + +proto_dhcpv6_setup() { + local config="$1" + local iface="$2" + + local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix + + + # Configure + local opts="" + [ -n "$reqaddress" ] && append opts "-N$reqaddress" + + [ -z "$reqprefix" -o "$reqprefix" = "auto" ] && reqprefix=0 + [ "$reqprefix" != "no" ] && append opts "-P$reqprefix" + + [ -n "$clientid" ] && append opts "-c$clientid" + + [ "$noslaaconly" = "1" ] && append opts "-S" + + [ "$norelease" = "1" ] && append opts "-k" + + for opt in $reqopts; do + append opts "-r$opt" + done + + [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix" + + proto_export "INTERFACE=$config" + proto_run_command "$config" odhcp6c \ + -s /lib/netifd/dhcpv6.script \ + $opts $iface +} + +proto_dhcpv6_teardown() { + local interface="$1" + proto_kill_command "$interface" +} + +add_protocol dhcpv6 + diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.script b/package/network/ipv6/odhcp6c/files/dhcpv6.script new file mode 100755 index 0000000..56f8c39 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.script @@ -0,0 +1,92 @@ +#!/bin/sh +[ -z "$2" ] && echo "Error: should be run by odhcpc6c" && exit 1 +. /lib/functions.sh +. /lib/netifd/netifd-proto.sh + +setup_interface () { + local device="$1" + proto_init_update "*" 1 + + # Merge RA-DNS + for radns in $RA_DNS; do + local duplicate=0 + for dns in $RDNSS; do + [ "$radns" = "$dns" ] && duplicate=1 + done + [ "$duplicate" = 0 ] && RDNSS="$RDNSS $radns" + done + + for dns in $RDNSS; do + proto_add_dns_server "$dns" + done + + for domain in $DOMAINS; do + proto_add_dns_search "$domain" + done + + for prefix in $PREFIXES; do + proto_add_ipv6_prefix "$prefix" + done + + [ -n "$USERPREFIX" ] && proto_add_ipv6_prefix "$USERPREFIX" + + # Merge addresses + for entry in $RA_ADDRESSES; do + local duplicate=0 + local addr="${entry%%/*}" + for dentry in $ADDRESSES; do + local daddr="${dentry%%/*}" + [ "$addr" = "$daddr" ] && duplicate=1 + done + [ "$duplicate" = "0" ] && ADDRESSES="$ADDRESSES $entry" + done + + for entry in $ADDRESSES; do + local addr="${entry%%/*}" + entry="${entry#*/}" + local mask="${entry%%,*}" + entry="${entry#*,}" + local preferred="${entry%%,*}" + entry="${entry#*,}" + local valid="${entry%%,*}" + + proto_add_ipv6_address "$addr" "$mask" "$preferred" "$valid" 1 + done + + for entry in $RA_ROUTES; do + local addr="${entry%%/*}" + entry="${entry#*/}" + local mask="${entry%%,*}" + entry="${entry#*,}" + local gw="${entry%%,*}" + entry="${entry#*,}" + local valid="${entry%%,*}" + entry="${entry#*,}" + local metric="${entry%%,*}" + + proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" + done + + proto_send_update "$INTERFACE" + + # TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN +} + +teardown_interface() { + proto_init_update "*" 0 + proto_send_update "$INTERFACE" +} + +case "$2" in + informed|bound|updated|rebound|ra-updated) + setup_interface "$1" + ;; + started|stopped|unbound) + teardown_interface "$1" + ;; +esac + +# user rules +[ -f /etc/odhcp6c.user ] && . /etc/odhcp6c.user + +exit 0 diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh new file mode 100755 index 0000000..6cf7521 --- /dev/null +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -0,0 +1,56 @@ +#!/bin/sh + +. /lib/functions.sh +. ../netifd-proto.sh +init_proto "$@" + +proto_dhcpv6_init_config() { + proto_config_add_string "reqaddress" + proto_config_add_string "reqprefix" + proto_config_add_string "clientid" + proto_config_add_string "reqopts" + proto_config_add_string "noslaaconly" + proto_config_add_string "norelease" + proto_config_add_string "ip6prefix" +} + +proto_dhcpv6_setup() { + local config="$1" + local iface="$2" + + local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix + json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix + + + # Configure + local opts="" + [ -n "$reqaddress" ] && append opts "-N$reqaddress" + + [ -z "$reqprefix" -o "$reqprefix" = "auto" ] && reqprefix=0 + [ "$reqprefix" != "no" ] && append opts "-P$reqprefix" + + [ -n "$clientid" ] && append opts "-c$clientid" + + [ "$noslaaconly" = "1" ] && append opts "-S" + + [ "$norelease" = "1" ] && append opts "-k" + + for opt in $reqopts; do + append opts "-r$opt" + done + + [ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix" + + proto_export "INTERFACE=$config" + proto_run_command "$config" odhcp6c \ + -s /lib/netifd/dhcpv6.script \ + $opts $iface +} + +proto_dhcpv6_teardown() { + local interface="$1" + proto_kill_command "$interface" +} + +add_protocol dhcpv6 + diff --git a/package/network/ipv6/thc-ipv6/.svn/entries b/package/network/ipv6/thc-ipv6/.svn/entries new file mode 100644 index 0000000..07a4929 --- /dev/null +++ b/package/network/ipv6/thc-ipv6/.svn/entries @@ -0,0 +1,65 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/thc-ipv6 +svn://svn.openwrt.org/openwrt + + + +2012-10-11T21:57:56.970004Z +33728 +jow + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +patches +dir + +Makefile +file + + + + +2013-03-17T12:13:19.000000Z +311e62358a8e54684e10d17581ca399e +2012-10-11T21:57:56.970004Z +33728 +jow + + + + + + + + + + + + + + + + + + + + + +1955 + diff --git a/package/network/ipv6/thc-ipv6/.svn/text-base/Makefile.svn-base b/package/network/ipv6/thc-ipv6/.svn/text-base/Makefile.svn-base new file mode 100644 index 0000000..c5bbe61 --- /dev/null +++ b/package/network/ipv6/thc-ipv6/.svn/text-base/Makefile.svn-base @@ -0,0 +1,59 @@ +# +# Copyright (C) 2009-2012 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:=thc-ipv6 +PKG_VERSION:=2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freeworld.thc.org/releases/ +PKG_MD5SUM:=5c9be9ad38ac15c368bb5140d031c051 + +PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org> + +include $(INCLUDE_DIR)/package.mk + +THC_APPLETS := \ + address6 alive6 covert_send6 covert_send6d denial6 detect-new-ip6 \ + detect_sniffer6 dnsdict6 dnsrevenum6 dos-new-ip6 \ + dump_router6 exploit6 fake_advertise6 fake_dhcps6 fake_dns6d \ + fake_dnsupdate6 fake_mipv6 fake_mld26 fake_mld6 fake_mldrouter6 \ + fake_router26 fake_router6 fake_solicitate6 flood_advertise6 \ + flood_dhcpc6 flood_mld26 flood_mld6 flood_mldrouter6 flood_router26 \ + flood_router6 flood_solicitate6 fragmentation6 fuzz_ip6 \ + implementation6 implementation6d inverse_lookup6 kill_router6 \ + ndpexhaust6 node_query6 parasite6 passive_discovery6 randicmp6 \ + redir6 rsmurf6 sendpees6 sendpeesmp6 smurf6 thcping6 toobig6 trace6 + +THC_DEPENDS_dnsdict6 := +libpthread +THC_DEPENDS_thcping6 := +librt + +define BuildTool + define Package/thc-ipv6-$(subst _,-,$(1)) + TITLE:=THC-IPv6 $(1) utility + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpcap $(THC_DEPENDS_$(1)) + URL:=http://freeworld.thc.org/ + SUBMENU:=THC-IPv6 attack and analyzing toolkit + endef + + define Package/thc-ipv6-$(subst _,-,$(1))/description + This package contains the $(1) utility of the THC-IPv6 toolkit. + endef + + define Package/thc-ipv6-$(subst _,-,$(1))/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1) $$(1)/usr/sbin/$(1) + endef + + $$(eval $$(call BuildPackage,thc-ipv6-$(subst _,-,$(1)))) +endef + +$(foreach a,$(THC_APPLETS),$(eval $(call BuildTool,$(a)))) diff --git a/package/network/ipv6/thc-ipv6/Makefile b/package/network/ipv6/thc-ipv6/Makefile new file mode 100644 index 0000000..c5bbe61 --- /dev/null +++ b/package/network/ipv6/thc-ipv6/Makefile @@ -0,0 +1,59 @@ +# +# Copyright (C) 2009-2012 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:=thc-ipv6 +PKG_VERSION:=2.0 +PKG_RELEASE:=1 + +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz +PKG_SOURCE_URL:=http://freeworld.thc.org/releases/ +PKG_MD5SUM:=5c9be9ad38ac15c368bb5140d031c051 + +PKG_MAINTAINER:=Jo-Philipp Wich <jow@openwrt.org> + +include $(INCLUDE_DIR)/package.mk + +THC_APPLETS := \ + address6 alive6 covert_send6 covert_send6d denial6 detect-new-ip6 \ + detect_sniffer6 dnsdict6 dnsrevenum6 dos-new-ip6 \ + dump_router6 exploit6 fake_advertise6 fake_dhcps6 fake_dns6d \ + fake_dnsupdate6 fake_mipv6 fake_mld26 fake_mld6 fake_mldrouter6 \ + fake_router26 fake_router6 fake_solicitate6 flood_advertise6 \ + flood_dhcpc6 flood_mld26 flood_mld6 flood_mldrouter6 flood_router26 \ + flood_router6 flood_solicitate6 fragmentation6 fuzz_ip6 \ + implementation6 implementation6d inverse_lookup6 kill_router6 \ + ndpexhaust6 node_query6 parasite6 passive_discovery6 randicmp6 \ + redir6 rsmurf6 sendpees6 sendpeesmp6 smurf6 thcping6 toobig6 trace6 + +THC_DEPENDS_dnsdict6 := +libpthread +THC_DEPENDS_thcping6 := +librt + +define BuildTool + define Package/thc-ipv6-$(subst _,-,$(1)) + TITLE:=THC-IPv6 $(1) utility + SECTION:=ipv6 + CATEGORY:=IPv6 + DEPENDS:=+libpcap $(THC_DEPENDS_$(1)) + URL:=http://freeworld.thc.org/ + SUBMENU:=THC-IPv6 attack and analyzing toolkit + endef + + define Package/thc-ipv6-$(subst _,-,$(1))/description + This package contains the $(1) utility of the THC-IPv6 toolkit. + endef + + define Package/thc-ipv6-$(subst _,-,$(1))/install + $(INSTALL_DIR) $$(1)/usr/sbin + $(INSTALL_BIN) $(PKG_BUILD_DIR)/$(1) $$(1)/usr/sbin/$(1) + endef + + $$(eval $$(call BuildPackage,thc-ipv6-$(subst _,-,$(1)))) +endef + +$(foreach a,$(THC_APPLETS),$(eval $(call BuildTool,$(a)))) diff --git a/package/network/ipv6/thc-ipv6/patches/.svn/entries b/package/network/ipv6/thc-ipv6/patches/.svn/entries new file mode 100644 index 0000000..28e4e12 --- /dev/null +++ b/package/network/ipv6/thc-ipv6/patches/.svn/entries @@ -0,0 +1,62 @@ +10 + +dir +36060 +svn://svn.openwrt.org/openwrt/trunk/package/network/ipv6/thc-ipv6/patches +svn://svn.openwrt.org/openwrt + + + +2012-10-11T21:57:56.970004Z +33728 +jow + + + + + + + + + + + + + + +3c298f89-4303-0410-b956-a3cf2f4a3e73 + +100-no-ssl.patch +file + + + + +2013-03-17T12:13:19.000000Z +5c5c337b521c2bbb9ccdac35c5519e0e +2012-10-11T21:57:56.970004Z +33728 +jow + + + + + + + + + + + + + + + + + + + + + +780 + diff --git a/package/network/ipv6/thc-ipv6/patches/.svn/text-base/100-no-ssl.patch.svn-base b/package/network/ipv6/thc-ipv6/patches/.svn/text-base/100-no-ssl.patch.svn-base new file mode 100644 index 0000000..5f87bcd --- /dev/null +++ b/package/network/ipv6/thc-ipv6/patches/.svn/text-base/100-no-ssl.patch.svn-base @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + CC=gcc + #CFLAGS?=-Wall -ggdb + CFLAGS?=-O2 +-LDFLAGS+=-lpcap -lssl -lcrypto ++LDFLAGS+=-lpcap + PROGRAMS=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_solicitate6 fake_mld6 fake_mld26 fake_mldrouter6 flood_mldrouter6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 implementation6 implementation6d sendpees6 sendpeesmp6 randicmp6 fuzz_ip6 flood_mld6 flood_mld26 flood_router6 flood_router26 flood_advertise6 flood_solicitate6 trace6 exploit6 denial6 fake_dhcps6 flood_dhcpc6 fake_dns6d fragmentation6 kill_router6 fake_dnsupdate6 ndpexhaust6 detect_sniffer6 dump_router6 fake_router26 passive_discovery6 dnsrevenum6 inverse_lookup6 node_query6 address6 thcping6 covert_send6 covert_send6d + LIBS=thc-ipv6-lib.o + diff --git a/package/network/ipv6/thc-ipv6/patches/100-no-ssl.patch b/package/network/ipv6/thc-ipv6/patches/100-no-ssl.patch new file mode 100644 index 0000000..5f87bcd --- /dev/null +++ b/package/network/ipv6/thc-ipv6/patches/100-no-ssl.patch @@ -0,0 +1,11 @@ +--- a/Makefile ++++ b/Makefile +@@ -1,7 +1,7 @@ + CC=gcc + #CFLAGS?=-Wall -ggdb + CFLAGS?=-O2 +-LDFLAGS+=-lpcap -lssl -lcrypto ++LDFLAGS+=-lpcap + PROGRAMS=parasite6 dos-new-ip6 detect-new-ip6 fake_router6 fake_advertise6 fake_solicitate6 fake_mld6 fake_mld26 fake_mldrouter6 flood_mldrouter6 fake_mipv6 redir6 smurf6 alive6 toobig6 rsmurf6 implementation6 implementation6d sendpees6 sendpeesmp6 randicmp6 fuzz_ip6 flood_mld6 flood_mld26 flood_router6 flood_router26 flood_advertise6 flood_solicitate6 trace6 exploit6 denial6 fake_dhcps6 flood_dhcpc6 fake_dns6d fragmentation6 kill_router6 fake_dnsupdate6 ndpexhaust6 detect_sniffer6 dump_router6 fake_router26 passive_discovery6 dnsrevenum6 inverse_lookup6 node_query6 address6 thcping6 covert_send6 covert_send6d + LIBS=thc-ipv6-lib.o + |