aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2013-05-17 14:44:07 +0000
committerSteven Barth <cyrus@openwrt.org>2013-05-17 14:44:07 +0000
commit334c40da1465e03cbc2f3448c9fee9f5de52e980 (patch)
tree3810308a04e8177b379cb5d71f070d4ef9d7b5d7
parent0f1be4425f5154d773cd1d56d9d37855617cd22a (diff)
downloadupstream-334c40da1465e03cbc2f3448c9fee9f5de52e980.tar.gz
upstream-334c40da1465e03cbc2f3448c9fee9f5de52e980.tar.bz2
upstream-334c40da1465e03cbc2f3448c9fee9f5de52e980.zip
6relayd: Add stateful DHCPv6-support (IA_NA) * Add management_level option (0: set O-flag, >=1: set M-flag) * Add support for static DHCPv6-leases * Various fixes for DHCPv6-PD
SVN-Revision: 36654
-rw-r--r--package/network/ipv6/6relayd/Makefile5
-rwxr-xr-xpackage/network/ipv6/6relayd/files/6relayd-update3
-rw-r--r--package/network/ipv6/6relayd/files/6relayd.init20
3 files changed, 25 insertions, 3 deletions
diff --git a/package/network/ipv6/6relayd/Makefile b/package/network/ipv6/6relayd/Makefile
index 8d2e3224e5..6e7df9f55e 100644
--- a/package/network/ipv6/6relayd/Makefile
+++ b/package/network/ipv6/6relayd/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=6relayd
-PKG_VERSION:=2013-05-13
+PKG_VERSION:=2013-05-17
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:=29454ff5fb3763fb61a672860de9dde62799f25b
+PKG_SOURCE_VERSION:=24aada7911a50c5fdb3517679095e54a581950aa
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
@@ -45,6 +45,7 @@ endef
define Package/6relayd/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/6relayd $(1)/usr/sbin/
+ $(INSTALL_BIN) ./files/6relayd-update $(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
diff --git a/package/network/ipv6/6relayd/files/6relayd-update b/package/network/ipv6/6relayd/files/6relayd-update
new file mode 100755
index 0000000000..20980f2228
--- /dev/null
+++ b/package/network/ipv6/6relayd/files/6relayd-update
@@ -0,0 +1,3 @@
+#!/bin/sh
+# Make dnsmasq reread hostfile
+killall -SIGHUP dnsmasq
diff --git a/package/network/ipv6/6relayd/files/6relayd.init b/package/network/ipv6/6relayd/files/6relayd.init
index f6d5183716..b26d6c5e3d 100644
--- a/package/network/ipv6/6relayd/files/6relayd.init
+++ b/package/network/ipv6/6relayd/files/6relayd.init
@@ -1,11 +1,23 @@
#!/bin/sh /etc/rc.common
# Copyright (c) 2011-2012 OpenWrt.org
START=80
+args=""
+
+add_static_lease() {
+ local cfg="$1"
+
+ local duid id
+ config_get duid "$cfg" duid
+ config_get id "$cfg" id
+
+ [ -n "$duid" -a -n "$id" ] && append args "-a$duid:$id"
+
+}
start_6relayd() {
local cfg="$1"
local mode="$2"
- local args=""
+ args="-l/tmp/hosts/6relayd,/usr/sbin/6relayd-update"
SERVICE_DAEMONIZE=1
SERVICE_WRITE_PID=1
@@ -79,6 +91,12 @@ start_6relayd() {
config_get_bool compat_ula "$cfg" compat_ula 0
[ "$compat_ula" -eq 1 ] && append args "-c"
+ local management_level
+ config_get management_level "$cfg" management_level
+ [ -n "$management_level" ] && append args "-m$management_level"
+
+ config_foreach add_static_lease lease
+
[ "$ndp" = "relay" ] && append args "-N -s"
[ "$rd" = "relay" ] && append args "-Rrelay"
[ "$rd" = "server" ] && append args "-Rserver"