Skip to content
Snippets Groups Projects
Commit 838e0567 authored by Matthias Schiffer's avatar Matthias Schiffer
Browse files

Use upstream odhcp6c again

parent c2ad15cd
No related branches found
No related tags found
No related merge requests found
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Thu, 9 Jan 2014 20:17:09 +0100
Subject: Update netifd and odhcp6c from Barrier Breaker
Date: Sat, 11 Jan 2014 11:47:31 +0100
Subject: Update netifd from Barrier Breaker
diff --git a/package/netifd/Makefile b/package/netifd/Makefile
index 5f2ee03..6f6f30e 100644
......@@ -126,138 +126,3 @@ index 0000000..510ee05
+
+ void
+ __vlist_simple_init(struct vlist_simple_tree *tree, int offset)
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile
index e37b72e..7d0c48d 100644
--- a/package/odhcp6c/Makefile
+++ b/package/odhcp6c/Makefile
@@ -8,26 +8,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_VERSION:=2013-10-02
+PKG_VERSION:=2013-12-15
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:=357ecc1f5163bc7f74c64f4bca387e8d44a2eac5
+PKG_SOURCE_VERSION:=be05c0ded0257cbb82857f6d01226ef6de28befe
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
+ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_prefix_class),0)
+ CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcp6c_ext_prefix_class)
+endif
+
define Package/odhcp6c
- SECTION:=ipv6
- CATEGORY:=IPv6
+ SECTION:=net
+ CATEGORY:=Network
TITLE:=Embedded DHCPv6-client for OpenWrt
DEPENDS:=+kmod-ipv6
endef
+define Package/odhcp6c/config
+ config PACKAGE_odhcp6c_ext_prefix_class
+ int "Prefix Class Extension ID (0 = disabled)"
+ depends on PACKAGE_odhcp6c
+ default 0
+endef
+
define Package/odhcp6c/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/
diff --git a/package/odhcp6c/files/dhcpv6.script b/package/odhcp6c/files/dhcpv6.script
index 324a823..8bcf766 100755
--- a/package/odhcp6c/files/dhcpv6.script
+++ b/package/odhcp6c/files/dhcpv6.script
@@ -64,23 +64,28 @@ setup_interface () {
entry="${entry#*,}"
local metric="${entry%%,*}"
- proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ if [ -z "$SOURCE_ROUTING" -o -z "$gw" ]; then
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ else
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "::/128"
+ for prefix in $PREFIXES; do
+ local paddr="${prefix%%,*}"
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "$paddr"
+ done
+ fi
done
proto_send_update "$INTERFACE"
if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
-uci -q batch <<-EOF >/dev/null
-set network.$IFACE_DSLITE.proto=dslite
-set network.$IFACE_DSLITE.auto=0
-set network.$IFACE_DSLITE.peeraddr=$AFTR_IP
-set network.$IFACE_DSLITE.tunlink=$INTERFACE
-commit network
-EOF
-
- ifdown "$IFACE_DSLITE"
- /etc/init.d/network reload
- ifup "$IFACE_DSLITE"
+ json_init
+ json_add_string name "$IFACE_DSLITE"
+ json_add_string ifname "@$INTERFACE"
+ json_add_string proto "dslite"
+ json_add_string peeraddr "$AFTR_IP"
+ json_add_string tunlink "$INTERFACE"
+ json_close_object
+ ubus call network add_dynamic "$(json_dump)"
fi
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
diff --git a/package/odhcp6c/files/dhcpv6.sh b/package/odhcp6c/files/dhcpv6.sh
index bf6cd9a..0638d28 100755
--- a/package/odhcp6c/files/dhcpv6.sh
+++ b/package/odhcp6c/files/dhcpv6.sh
@@ -10,18 +10,20 @@ proto_dhcpv6_init_config() {
proto_config_add_string "clientid"
proto_config_add_string "reqopts"
proto_config_add_string "noslaaconly"
+ proto_config_add_string "forceprefix"
proto_config_add_string "norelease"
proto_config_add_string "ip6prefix"
proto_config_add_string "iface_dslite"
proto_config_add_string "ifaceid"
+ proto_config_add_string "sourcerouting"
}
proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting
# Configure
@@ -35,6 +37,8 @@ proto_dhcpv6_setup() {
[ "$noslaaconly" = "1" ] && append opts "-S"
+ [ "$forceprefix" = "1" ] && append opts "-F"
+
[ "$norelease" = "1" ] && append opts "-k"
[ -n "$ifaceid" ] && append opts "-i$ifaceid"
@@ -45,6 +49,7 @@ proto_dhcpv6_setup() {
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
[ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
+ [ "$sourcerouting" = "1" ] && proto_export "SOURCE_ROUTING=1"
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Fri, 10 Jan 2014 22:43:19 +0100
Subject: Temporarily use forked odhcp6c version until our patches are merged
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile
index 7d0c48d..7badd2c 100644
--- a/package/odhcp6c/Makefile
+++ b/package/odhcp6c/Makefile
@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_VERSION:=2013-12-15
+PKG_VERSION:=2014-01-10
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_URL:=git://github.com/NeoRaider/odhcp6c.git
PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=be05c0ded0257cbb82857f6d01226ef6de28befe
+PKG_SOURCE_VERSION:=3d77dda32f4d7525b4553eaa99eb44bb28bcc113
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
include $(INCLUDE_DIR)/package.mk
From: Matthias Schiffer <mschiffer@universe-factory.net>
Date: Sat, 11 Jan 2014 11:47:58 +0100
Subject: Update odhcp6c to latest git master
diff --git a/package/odhcp6c/Makefile b/package/odhcp6c/Makefile
index e37b72e..ed51b98 100644
--- a/package/odhcp6c/Makefile
+++ b/package/odhcp6c/Makefile
@@ -8,26 +8,37 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=odhcp6c
-PKG_VERSION:=2013-10-02
+PKG_VERSION:=2014-01-11
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:=357ecc1f5163bc7f74c64f4bca387e8d44a2eac5
+PKG_SOURCE_VERSION:=8152153cb9c5b09862bf0c8a0d1005fa8dfdf262
PKG_MAINTAINER:=Steven Barth <steven@midlink.org>
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk
+ifneq ($(CONFIG_PACKAGE_odhcp6c_ext_prefix_class),0)
+ CMAKE_OPTIONS += -DEXT_PREFIX_CLASS=$(CONFIG_PACKAGE_odhcp6c_ext_prefix_class)
+endif
+
define Package/odhcp6c
- SECTION:=ipv6
- CATEGORY:=IPv6
+ SECTION:=net
+ CATEGORY:=Network
TITLE:=Embedded DHCPv6-client for OpenWrt
DEPENDS:=+kmod-ipv6
endef
+define Package/odhcp6c/config
+ config PACKAGE_odhcp6c_ext_prefix_class
+ int "Prefix Class Extension ID (0 = disabled)"
+ depends on PACKAGE_odhcp6c
+ default 0
+endef
+
define Package/odhcp6c/install
$(INSTALL_DIR) $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/odhcp6c $(1)/usr/sbin/
diff --git a/package/odhcp6c/files/dhcpv6.script b/package/odhcp6c/files/dhcpv6.script
index 324a823..8bcf766 100755
--- a/package/odhcp6c/files/dhcpv6.script
+++ b/package/odhcp6c/files/dhcpv6.script
@@ -64,23 +64,28 @@ setup_interface () {
entry="${entry#*,}"
local metric="${entry%%,*}"
- proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ if [ -z "$SOURCE_ROUTING" -o -z "$gw" ]; then
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid"
+ else
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "::/128"
+ for prefix in $PREFIXES; do
+ local paddr="${prefix%%,*}"
+ proto_add_ipv6_route "$addr" "$mask" "$gw" "$metric" "$valid" "$paddr"
+ done
+ fi
done
proto_send_update "$INTERFACE"
if [ -n "$AFTR_IP " -a -n "$IFACE_DSLITE" ]; then
-uci -q batch <<-EOF >/dev/null
-set network.$IFACE_DSLITE.proto=dslite
-set network.$IFACE_DSLITE.auto=0
-set network.$IFACE_DSLITE.peeraddr=$AFTR_IP
-set network.$IFACE_DSLITE.tunlink=$INTERFACE
-commit network
-EOF
-
- ifdown "$IFACE_DSLITE"
- /etc/init.d/network reload
- ifup "$IFACE_DSLITE"
+ json_init
+ json_add_string name "$IFACE_DSLITE"
+ json_add_string ifname "@$INTERFACE"
+ json_add_string proto "dslite"
+ json_add_string peeraddr "$AFTR_IP"
+ json_add_string tunlink "$INTERFACE"
+ json_close_object
+ ubus call network add_dynamic "$(json_dump)"
fi
# TODO: $SNTP_IP $SIP_IP $SNTP_FQDN $SIP_DOMAIN
diff --git a/package/odhcp6c/files/dhcpv6.sh b/package/odhcp6c/files/dhcpv6.sh
index bf6cd9a..0638d28 100755
--- a/package/odhcp6c/files/dhcpv6.sh
+++ b/package/odhcp6c/files/dhcpv6.sh
@@ -10,18 +10,20 @@ proto_dhcpv6_init_config() {
proto_config_add_string "clientid"
proto_config_add_string "reqopts"
proto_config_add_string "noslaaconly"
+ proto_config_add_string "forceprefix"
proto_config_add_string "norelease"
proto_config_add_string "ip6prefix"
proto_config_add_string "iface_dslite"
proto_config_add_string "ifaceid"
+ proto_config_add_string "sourcerouting"
}
proto_dhcpv6_setup() {
local config="$1"
local iface="$2"
- local reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
- json_get_vars reqaddress reqprefix clientid reqopts noslaaconly norelease ip6prefix iface_dslite ifaceid
+ local reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting
+ json_get_vars reqaddress reqprefix clientid reqopts noslaaconly forceprefix norelease ip6prefix iface_dslite ifaceid sourcerouting
# Configure
@@ -35,6 +37,8 @@ proto_dhcpv6_setup() {
[ "$noslaaconly" = "1" ] && append opts "-S"
+ [ "$forceprefix" = "1" ] && append opts "-F"
+
[ "$norelease" = "1" ] && append opts "-k"
[ -n "$ifaceid" ] && append opts "-i$ifaceid"
@@ -45,6 +49,7 @@ proto_dhcpv6_setup() {
[ -n "$ip6prefix" ] && proto_export "USERPREFIX=$ip6prefix"
[ -n "$iface_dslite" ] && proto_export "IFACE_DSLITE=$iface_dslite"
+ [ "$sourcerouting" = "1" ] && proto_export "SOURCE_ROUTING=1"
proto_export "INTERFACE=$config"
proto_run_command "$config" odhcp6c \
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment