mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-18 02:40:19 +00:00
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>
This commit is contained in:
parent
7b7edd25a5
commit
8dea8bde2a
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=odhcp6c
|
PKG_NAME:=odhcp6c
|
||||||
PKG_RELEASE:=19
|
PKG_RELEASE:=20
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
|
||||||
|
@ -39,6 +39,7 @@ proto_dhcpv6_init_config() {
|
|||||||
proto_config_add_boolean sourcefilter
|
proto_config_add_boolean sourcefilter
|
||||||
proto_config_add_boolean keep_ra_dnslifetime
|
proto_config_add_boolean keep_ra_dnslifetime
|
||||||
proto_config_add_int "ra_holdoff"
|
proto_config_add_int "ra_holdoff"
|
||||||
|
proto_config_add_boolean verbose
|
||||||
}
|
}
|
||||||
|
|
||||||
proto_dhcpv6_add_prefix() {
|
proto_dhcpv6_add_prefix() {
|
||||||
@ -53,8 +54,8 @@ proto_dhcpv6_setup() {
|
|||||||
local config="$1"
|
local config="$1"
|
||||||
local iface="$2"
|
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
|
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
|
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
|
json_for_each_item proto_dhcpv6_add_prefix ip6prefix ip6prefixes
|
||||||
|
|
||||||
# Configure
|
# Configure
|
||||||
@ -90,6 +91,8 @@ proto_dhcpv6_setup() {
|
|||||||
|
|
||||||
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
|
[ -n "$ra_holdoff" ] && append opts "-m$ra_holdoff"
|
||||||
|
|
||||||
|
[ "$verbose" = "1" ] && append opts "-v"
|
||||||
|
|
||||||
local opt
|
local opt
|
||||||
for opt in $reqopts; do
|
for opt in $reqopts; do
|
||||||
append opts "-r$opt"
|
append opts "-r$opt"
|
||||||
|
Loading…
Reference in New Issue
Block a user