aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorPacien TRAN-GIRARD <pacien.trangirard@pacien.net>2023-05-08 00:46:11 +0200
committerChristian Marangi <ansuelsmth@gmail.com>2023-05-12 13:19:50 +0200
commitd5182de637986a62bf654d75d6d8a8dc720b1f28 (patch)
tree5a2d70850514e1a898c832870f62032270ba76e7 /package/network
parentdbc34a8e36801cf232bfac600bf22c27a4315826 (diff)
downloadupstream-d5182de637986a62bf654d75d6d8a8dc720b1f28.tar.gz
upstream-d5182de637986a62bf654d75d6d8a8dc720b1f28.tar.bz2
upstream-d5182de637986a62bf654d75d6d8a8dc720b1f28.zip
odhcp6c: add skpriority option
Allowing the (kernel) packet priority to be set through UCI. This makes it straightforward to set some VLAN priority for DHCP requests through a simple egress qos map. (Avoiding the need for firewall matching and marking through iptables, which prevents using flow offloading). (Such priority tag is a hard requirement for some ISPs, such as Orange in France). Depends on: https://github.com/openwrt/odhcp6c/pull/74 Signed-off-by: Pacien TRAN-GIRARD <pacien.trangirard@pacien.net>
Diffstat (limited to 'package/network')
-rwxr-xr-xpackage/network/ipv6/odhcp6c/files/dhcpv6.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
index 8c2a0859cb..18c24febd6 100755
--- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh
+++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh
@@ -34,6 +34,7 @@ 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
@@ -54,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 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 soltimeout fakeroutes sourcefilter keep_ra_dnslifetime ra_holdoff verbose
+ 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
@@ -89,6 +90,8 @@ 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"