diff options
author | Mark Mentovai <mark@mentovai.com> | 2022-11-11 11:41:37 -0500 |
---|---|---|
committer | Christian Marangi <ansuelsmth@gmail.com> | 2023-03-14 22:47:34 +0100 |
commit | 8dea8bde2a392a0c75eaf4886508566251fc2bd1 (patch) | |
tree | 29d83496529ba766b4573e9aeec67215cfdad193 | |
parent | 7b7edd25a571568438c886529d3443054e02f55f (diff) | |
download | upstream-8dea8bde2a392a0c75eaf4886508566251fc2bd1.tar.gz upstream-8dea8bde2a392a0c75eaf4886508566251fc2bd1.tar.bz2 upstream-8dea8bde2a392a0c75eaf4886508566251fc2bd1.zip |
odhcp6c: add "verbose" option
odhcp6c logs messages related to its activity when invoked with -v, but
there is no way to configure this from within OpenWrt. This adds a UCI
option to turn on odhcp6c logging, disabled by default. To enable, set,
for example, network.wan6.verbose = 1.
Signed-off-by: Mark Mentovai <mark@mentovai.com>
-rw-r--r-- | package/network/ipv6/odhcp6c/Makefile | 2 | ||||
-rwxr-xr-x | package/network/ipv6/odhcp6c/files/dhcpv6.sh | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile index 505aa56e41..7ad3a1cfcd 100644 --- a/package/network/ipv6/odhcp6c/Makefile +++ b/package/network/ipv6/odhcp6c/Makefile @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=odhcp6c -PKG_RELEASE:=19 +PKG_RELEASE:=20 PKG_SOURCE_PROTO:=git PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git diff --git a/package/network/ipv6/odhcp6c/files/dhcpv6.sh b/package/network/ipv6/odhcp6c/files/dhcpv6.sh index ac8c7797fb..8c2a0859cb 100755 --- a/package/network/ipv6/odhcp6c/files/dhcpv6.sh +++ b/package/network/ipv6/odhcp6c/files/dhcpv6.sh @@ -39,6 +39,7 @@ proto_dhcpv6_init_config() { 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 +54,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 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 json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes # Configure @@ -90,6 +91,8 @@ proto_dhcpv6_setup() { [ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff" + [ "$verbose" = "1" ] && append opts "-v" + local opt for opt in $reqopts; do append opts "-r$opt" |