mirror of
https://github.com/Lienol/openwrt
synced 2025-01-07 03:06:49 +08:00
odhcp6c: Update to 2023-05-12
This commit is contained in:
parent
3f9ead3eaf
commit
2313633cbd
@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=odhcp6c
|
||||
PKG_RELEASE:=16
|
||||
PKG_RELEASE:=20
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||
PKG_SOURCE_DATE:=2021-01-09
|
||||
PKG_SOURCE_VERSION:=53f07e90b7f1da6977143a488dd5cb73a33b233b
|
||||
PKG_MIRROR_HASH:=ad3665b611d19177996771b11df28d92f066b0125484ea3bdfc0b3185c14f90e
|
||||
PKG_SOURCE_DATE:=2023-05-12
|
||||
PKG_SOURCE_VERSION:=bcd283632ac13391aac3ebdd074d1fd832d76fa3
|
||||
PKG_MIRROR_HASH:=0f3508a5a148ca831ae30b49b21919535f9dfbbd003a942baa6cb5388d207878
|
||||
PKG_MAINTAINER:=Hans Dedecker <dedeckeh@gmail.com>
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
@ -42,12 +42,19 @@ define Package/odhcp6c/config
|
||||
default 0
|
||||
endef
|
||||
|
||||
define Package/odhcp6c/conffiles
|
||||
/etc/odhcp6c.user
|
||||
/etc/odhcp6c.user.d/
|
||||
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/
|
||||
$(INSTALL_DIR) $(1)/etc/odhcp6c.user.d/
|
||||
$(INSTALL_CONF) ./files/odhcp6c.user $(1)/etc/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,odhcp6c))
|
||||
|
@ -237,5 +237,8 @@ esac
|
||||
|
||||
# user rules
|
||||
[ -f /etc/odhcp6c.user ] && . /etc/odhcp6c.user "$@"
|
||||
for f in /etc/odhcp6c.user.d/*; do
|
||||
[ -f "$f" ] && (. "$f" "$@")
|
||||
done
|
||||
|
||||
exit 0
|
||||
|
@ -34,11 +34,13 @@ proto_dhcpv6_init_config() {
|
||||
proto_config_add_string "vendorclass"
|
||||
proto_config_add_array "sendopts:list(string)"
|
||||
proto_config_add_boolean delegate
|
||||
proto_config_add_int skpriority
|
||||
proto_config_add_int "soltimeout"
|
||||
proto_config_add_boolean fakeroutes
|
||||
proto_config_add_boolean sourcefilter
|
||||
proto_config_add_boolean keep_ra_dnslifetime
|
||||
proto_config_add_int "ra_holdoff"
|
||||
proto_config_add_boolean verbose
|
||||
}
|
||||
|
||||
proto_dhcpv6_add_prefix() {
|
||||
@ -53,8 +55,8 @@ proto_dhcpv6_setup() {
|
||||
local config="$1"
|
||||
local iface="$2"
|
||||
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff
|
||||
local reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig ip6prefix ip6prefixes iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass sendopts delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map skpriority soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_get_vars reqaddress reqprefix clientid reqopts defaultreqopts noslaaconly forceprefix extendprefix norelease noserverunicast noclientfqdn noacceptreconfig iface_dslite iface_map iface_464xlat ifaceid userclass vendorclass delegate zone_dslite zone_map zone_464xlat zone encaplimit_dslite encaplimit_map skpriority soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
|
||||
json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes
|
||||
|
||||
# Configure
|
||||
@ -88,8 +90,12 @@ proto_dhcpv6_setup() {
|
||||
|
||||
[ "$keep_ra_dnslifetime" = "1" ] && append opts "-L"
|
||||
|
||||
[ -n "$skpriority" ] && append opts "-K$skpriority"
|
||||
|
||||
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
|
||||
|
||||
[ "$verbose" = "1" ] && append opts "-v"
|
||||
|
||||
local opt
|
||||
for opt in $reqopts; do
|
||||
append opts "-r$opt"
|
||||
@ -105,6 +111,7 @@ proto_dhcpv6_setup() {
|
||||
[ -n "$iface_464xlat" ] && proto_export "IFACE_464XLAT=$iface_464xlat"
|
||||
[ "$delegate" = "0" ] && proto_export "IFACE_DSLITE_DELEGATE=0"
|
||||
[ "$delegate" = "0" ] && proto_export "IFACE_MAP_DELEGATE=0"
|
||||
[ "$delegate" = "0" ] && proto_export "IFACE_464XLAT_DELEGATE=0"
|
||||
[ -n "$zone_dslite" ] && proto_export "ZONE_DSLITE=$zone_dslite"
|
||||
[ -n "$zone_map" ] && proto_export "ZONE_MAP=$zone_map"
|
||||
[ -n "$zone_464xlat" ] && proto_export "ZONE_464XLAT=$zone_464xlat"
|
||||
|
1
package/network/ipv6/odhcp6c/files/odhcp6c.user
Normal file
1
package/network/ipv6/odhcp6c/files/odhcp6c.user
Normal file
@ -0,0 +1 @@
|
||||
# This script is sourced by odhcp6c's dhcpv6.script at every DHCPv6 event.
|
Loading…
Reference in New Issue
Block a user