mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-10 07:44:39 +01:00
Add configs to cover all datamdoel and fix memory leak
This commit is contained in:
parent
da27610783
commit
e7fb7a60b1
40 changed files with 3271 additions and 131 deletions
|
|
@ -83,10 +83,14 @@ run_memory_test:
|
|||
when: always
|
||||
paths:
|
||||
- timestamp.log
|
||||
- memory-report-get.xml
|
||||
- memory-report-operate.xml
|
||||
- memory-report-schema.xml
|
||||
- memory-report-instances.xml
|
||||
- memory-report-usp-get.xml
|
||||
- memory-report-usp-operate.xml
|
||||
- memory-report-usp-schema.xml
|
||||
- memory-report-usp-instances.xml
|
||||
- memory-report-cwmp-get.xml
|
||||
- memory-report-cwmp-operate.xml
|
||||
- memory-report-cwmp-schema.xml
|
||||
- memory-report-cwmp-instances.xml
|
||||
- memory-test-coverage.xml
|
||||
|
||||
run_uspd:
|
||||
|
|
|
|||
|
|
@ -17,21 +17,33 @@ supervisorctl status all
|
|||
|
||||
echo "Running memory check on datamodel"
|
||||
ret=0
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-get.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u get Device.
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-usp-get.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u get Device.
|
||||
ret=$?
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-operate.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u list_operate
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-usp-operate.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u list_operate
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-schema.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u get_schema
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-usp-schema.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u get_schema
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-instances.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u instances Device.
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-usp-instances.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -u instances Device.
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-cwmp-get.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -c get Device.
|
||||
ret=$?
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-cwmp-operate.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -c list_operate
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-cwmp-schema.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -c get_schema
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
valgrind --xml=yes --xml-file=/builds/iopsys/bbf/memory-report-cwmp-instances.xml --leak-check=full --show-reachable=yes --show-leak-kinds=all --errors-for-leak-kinds=all --error-exitcode=1 --track-origins=yes /builds/iopsys/bbf/test/bbf_test/bbf_dm -c instances Device.
|
||||
ret=$(( ret + $? ))
|
||||
|
||||
if [ "$ret" -ne 0 ]; then
|
||||
echo "Memory check failed"
|
||||
return $ret
|
||||
check_ret $ret
|
||||
fi
|
||||
|
||||
supervisorctl stop all
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ cp -r ./test/files/etc/* /etc/
|
|||
cp -r ./test/files/usr/* /usr/
|
||||
cp -r ./test/files/var/* /var/
|
||||
cp -r ./test/files/tmp/* /tmp/
|
||||
cp -r ./test/files/lib/* /lib/
|
||||
|
||||
cp ./gitlab-ci/iopsys-supervisord.conf /etc/supervisor/conf.d/
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
config asterisk 'general'
|
||||
option enabled '1'
|
||||
option log_stderr '1'
|
||||
|
|
@ -57,6 +58,34 @@ config tel_line 'telline3'
|
|||
option clir '0'
|
||||
option callwaiting_enabled '0'
|
||||
option do_not_disturb '0'
|
||||
option name 'DECT 4'
|
||||
|
||||
config tel_line 'telline4'
|
||||
option enabled '1'
|
||||
option extension '4444'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain '4'
|
||||
option rxgain '4'
|
||||
option echo_cancel '1'
|
||||
option clir '0'
|
||||
option callwaiting_enabled '0'
|
||||
option do_not_disturb '0'
|
||||
option name 'Tel 2'
|
||||
|
||||
config tel_line 'telline5'
|
||||
option enabled '1'
|
||||
option extension '5555'
|
||||
option sip_account 'sip0'
|
||||
option noise '0'
|
||||
option vad '0'
|
||||
option txgain '4'
|
||||
option rxgain '4'
|
||||
option echo_cancel '1'
|
||||
option clir '0'
|
||||
option callwaiting_enabled '0'
|
||||
option do_not_disturb '0'
|
||||
option name 'Tel 1'
|
||||
|
||||
config dialplan 'custom_dialplan'
|
||||
|
|
@ -144,3 +173,4 @@ config sip_service_provider 'sip0'
|
|||
option encryption 'no'
|
||||
option mediasec '0'
|
||||
option dtmf_mode 'rfc4733'
|
||||
|
||||
|
|
|
|||
43
test/files/etc/config/bulkdata
Normal file
43
test/files/etc/config/bulkdata
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
|
||||
config bulkdata 'bulkdata'
|
||||
option enable '0'
|
||||
#Log levels: Critical=0, Warning=1, Notice=2, Info=3, Debug=4
|
||||
option log_level '3'
|
||||
|
||||
config profile
|
||||
option profile_id '1'
|
||||
option enable '0'
|
||||
option name ''
|
||||
option nbre_of_retained_failed_reports '0'
|
||||
option protocol 'http'
|
||||
option encoding_type ''
|
||||
option reporting_interval '86400'
|
||||
option time_reference '0'
|
||||
option csv_encoding_field_separator ','
|
||||
option csv_encoding_row_separator ' '
|
||||
option csv_encoding_escape_character '"'
|
||||
option csv_encoding_report_format 'column'
|
||||
option csv_encoding_row_time_stamp 'unix'
|
||||
option json_encoding_report_format 'objecthierarchy'
|
||||
option json_encoding_report_time_stamp 'unix'
|
||||
option http_url ''
|
||||
option http_username ''
|
||||
option http_password ''
|
||||
option http_compression 'none'
|
||||
option http_method 'post'
|
||||
option http_use_date_header '1'
|
||||
option http_retry_enable '0'
|
||||
option http_retry_minimum_wait_interval '5'
|
||||
option http_retry_interval_multiplier '2000'
|
||||
option http_persist_across_reboot '0'
|
||||
|
||||
config profile_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
|
||||
config profile_http_request_uri_parameter
|
||||
option profile_id '1'
|
||||
option name ''
|
||||
option reference ''
|
||||
|
||||
|
|
@ -36,7 +36,6 @@ config cpe 'cpe'
|
|||
option instance_mode 'InstanceNumber'
|
||||
option session_timeout '60'
|
||||
option notification '1'
|
||||
option datamodel 'tr181'
|
||||
option exec_download '0'
|
||||
option periodic_notify_enable '1'
|
||||
option periodic_notify_interval '10'
|
||||
|
|
|
|||
33
test/files/etc/config/ddns
Normal file
33
test/files/etc/config/ddns
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#
|
||||
# Please read https://openwrt.org/docs/guide-user/base-system/ddns
|
||||
#
|
||||
config ddns "global"
|
||||
option ddns_dateformat "%F %R"
|
||||
# option ddns_rundir "/var/run/ddns"
|
||||
# option ddns_logdir "/var/log/ddns"
|
||||
option ddns_loglines "250"
|
||||
option upd_privateip "0"
|
||||
option use_curl "1"
|
||||
|
||||
|
||||
config service "myddns_ipv4"
|
||||
option service_name "dyndns.org"
|
||||
option lookup_host "yourhost.example.com"
|
||||
option domain "yourhost.example.com"
|
||||
option username "your_username"
|
||||
option password "your_password"
|
||||
option interface "wan"
|
||||
option ip_source "network"
|
||||
option ip_network "wan"
|
||||
|
||||
config service "myddns_ipv6"
|
||||
option update_url "http://[USERNAME]:[PASSWORD]@your.provider.net/nic/update?hostname=[DOMAIN]&myip=[IP]"
|
||||
option lookup_host "yourhost.example.com"
|
||||
option domain "yourhost.example.com"
|
||||
option username "your_username"
|
||||
option password "your_password"
|
||||
option use_ipv6 "1"
|
||||
option interface "wan6"
|
||||
option ip_source "network"
|
||||
option ip_network "wan6"
|
||||
|
||||
53
test/files/etc/config/dhcp
Normal file
53
test/files/etc/config/dhcp
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
|
||||
config dnsmasq
|
||||
option domainneeded '1'
|
||||
option boguspriv '1'
|
||||
option filterwin2k '0'
|
||||
option localise_queries '1'
|
||||
option rebind_protection '0'
|
||||
option rebind_localhost '1'
|
||||
option local '/lan/'
|
||||
option domain 'lan'
|
||||
option expandhosts '1'
|
||||
option nonegcache '0'
|
||||
option authoritative '1'
|
||||
option readethers '1'
|
||||
option leasefile '/tmp/dhcp.leases'
|
||||
option resolvfile '/tmp/resolv.conf.d/resolv.conf.auto'
|
||||
option nonwildcard '1'
|
||||
option localservice '1'
|
||||
option dhcpscript '/usr/lib/dnsmasq/user-dhcp-script.sh'
|
||||
option ednspacket_max '1232'
|
||||
|
||||
config domain
|
||||
list name 'www.routerlogin.net'
|
||||
list name 'routerlogin.net'
|
||||
list name 'www.routerlogin.com'
|
||||
list name 'routerlogin.com'
|
||||
list name 'www.login.lan'
|
||||
list name 'login.lan'
|
||||
list name 'login'
|
||||
list name 'iopsys.lan'
|
||||
|
||||
config dhcp 'lan'
|
||||
option interface 'lan'
|
||||
option start '100'
|
||||
option limit '150'
|
||||
option leasetime '1h'
|
||||
option dhcpv4 'server'
|
||||
option dhcpv6 'server'
|
||||
option ra 'server'
|
||||
option ra_slaac '1'
|
||||
list ra_flags 'managed-config'
|
||||
list ra_flags 'other-config'
|
||||
|
||||
config dhcp 'wan'
|
||||
option interface 'wan'
|
||||
option ignore '1'
|
||||
|
||||
config odhcpd 'odhcpd'
|
||||
option maindhcp '0'
|
||||
option leasefile '/tmp/hosts/odhcpd'
|
||||
option leasetrigger '/usr/sbin/odhcpd-update'
|
||||
option loglevel '4'
|
||||
|
||||
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
config globals 'globals'
|
||||
option enabled '1'
|
||||
|
||||
|
|
@ -35,7 +36,6 @@ config rule
|
|||
option dest_port '68'
|
||||
option target 'ACCEPT'
|
||||
option family 'ipv4'
|
||||
option dest 'lan'
|
||||
|
||||
config rule
|
||||
option name 'Allow-Ping'
|
||||
|
|
@ -124,6 +124,15 @@ config rule
|
|||
option proto 'udp'
|
||||
option target 'ACCEPT'
|
||||
|
||||
config rule
|
||||
option name 'Support-UDP-Traceroute'
|
||||
option src 'wan'
|
||||
option dest_port '33434:33689'
|
||||
option proto 'udp'
|
||||
option family 'ipv4'
|
||||
option target 'REJECT'
|
||||
option enabled 'false'
|
||||
|
||||
config dmz 'dmz'
|
||||
option enabled '0'
|
||||
option exclude_ports '5060 7547'
|
||||
|
|
|
|||
4
test/files/etc/config/hosts
Normal file
4
test/files/etc/config/hosts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
|
||||
config global 'global'
|
||||
option ageing_timer '1440'
|
||||
option reboot_persistent '0'
|
||||
25
test/files/etc/config/ieee1905
Executable file
25
test/files/etc/config/ieee1905
Executable file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
config ieee1905 'ieee1905'
|
||||
option enabled '1'
|
||||
option extension '1'
|
||||
list extmodule 'map'
|
||||
option registrar '2 5'
|
||||
option macaddress '02:22:07:AB:9F:80'
|
||||
|
||||
config ap
|
||||
option band '2'
|
||||
option ssid 'TestSSID.2'
|
||||
option encryption 'psk2'
|
||||
option key '5555500000'
|
||||
|
||||
config ap
|
||||
option band '5'
|
||||
option ssid 'TestSSID.5'
|
||||
option encryption 'psk2'
|
||||
option key '2222200000'
|
||||
|
||||
config al-iface
|
||||
option enabled '1'
|
||||
option ifname 'br-lan'
|
||||
option type 'bridge'
|
||||
|
||||
29
test/files/etc/config/mcast
Normal file
29
test/files/etc/config/mcast
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
config igmp 'igmp'
|
||||
option max_membership '20'
|
||||
option max_msf '10'
|
||||
option qrv '2'
|
||||
option force_version '0'
|
||||
|
||||
config mld 'mld'
|
||||
option mldv1_unsolicited_report_interval '10'
|
||||
option mldv2_unsolicited_report_interval '1'
|
||||
option qrv '2'
|
||||
option force_version '0'
|
||||
|
||||
config proxy 'igmp_proxy_1'
|
||||
option enable '1'
|
||||
option proto 'igmp'
|
||||
option version '2'
|
||||
option robustness '2'
|
||||
option query_interval '125'
|
||||
option query_response_interval '100'
|
||||
option last_member_query_interval '10'
|
||||
option fast_leave '1'
|
||||
option snooping_mode '2'
|
||||
list downstream_interface 'br-lan'
|
||||
list upstream_interface 'atm0.1'
|
||||
list upstream_interface 'ptm0.1'
|
||||
list upstream_interface 'eth0.1'
|
||||
list filter '239.0.0.0/8'
|
||||
|
||||
|
|
@ -4,14 +4,88 @@ config interface 'loopback'
|
|||
option ipaddr '127.0.0.1'
|
||||
option netmask '255.0.0.0'
|
||||
|
||||
config globals 'globals'
|
||||
option ula_prefix 'fddb:7949:7caa::/48'
|
||||
|
||||
config device
|
||||
option name 'br-lan'
|
||||
option type 'bridge'
|
||||
list ports 'eth1'
|
||||
list ports 'eth2'
|
||||
list ports 'eth3'
|
||||
list ports 'eth4'
|
||||
option macaddr '44:D4:37:71:B8:11'
|
||||
|
||||
config interface 'lan'
|
||||
option device 'br-lan'
|
||||
option proto 'static'
|
||||
option ipaddr '192.168.1.1'
|
||||
option netmask '255.255.255.0'
|
||||
option ip6assign '60'
|
||||
option is_lan '1'
|
||||
option macaddr '44:D4:37:71:B8:11'
|
||||
|
||||
config interface 'wan'
|
||||
option proto 'dhcp'
|
||||
option hostname 'iopsysWrt-00220775DC6C'
|
||||
option hostname 'iopsysWrt-44D43771B810'
|
||||
option vendorid 'eg400'
|
||||
option device 'eth0'
|
||||
option reqopts '43'
|
||||
option device 'eth0.1'
|
||||
option reqopts '12 43'
|
||||
option sendopts '60:iopsystest 61:iopsys'
|
||||
option macaddr '44:D4:37:71:B8:12'
|
||||
|
||||
config interface 'wan6'
|
||||
option proto 'dhcpv6'
|
||||
option device '@wan'
|
||||
|
||||
config device 'ethwan'
|
||||
option type 'untagged'
|
||||
option ifname 'eth0'
|
||||
option name 'eth0.1'
|
||||
option macaddr '44:D4:37:71:B8:12'
|
||||
|
||||
config device 'br_test_1'
|
||||
option name 'br-test'
|
||||
option type 'bridge'
|
||||
list ports 'eth1.100'
|
||||
list ports 'eth2.100'
|
||||
list ports 'eth3.100'
|
||||
list ports 'eth4.100'
|
||||
option macaddr '44:D4:37:71:B8:13'
|
||||
|
||||
config interface 'lan100'
|
||||
option device 'br-test'
|
||||
option proto 'static'
|
||||
option ipaddr '172.32.1.1'
|
||||
option macaddr '44:D4:37:71:B8:13'
|
||||
|
||||
config device 'eth1_100'
|
||||
option type 'untagged'
|
||||
option ifname 'eth1'
|
||||
option name 'eth1.100'
|
||||
option vid '100'
|
||||
|
||||
config device 'eth2_100'
|
||||
option type 'untagged'
|
||||
option ifname 'eth2'
|
||||
option name 'eth2.100'
|
||||
option vid '100'
|
||||
|
||||
config device 'eth3_100'
|
||||
option type '8021q'
|
||||
option ifname 'eth3'
|
||||
option name 'eth3.100'
|
||||
option vid '100'
|
||||
|
||||
config device 'eth4_100'
|
||||
option type '8021q'
|
||||
option ifname 'eth4'
|
||||
option name 'eth4.100'
|
||||
option vid '100'
|
||||
|
||||
config interface 'ppp_wan'
|
||||
option proto 'pppoe'
|
||||
option username 'iopsys'
|
||||
option password 'iopsys'
|
||||
option device 'eth0.1'
|
||||
option macaddr '44:D4:37:71:B8:14'
|
||||
|
|
|
|||
506
test/files/etc/config/openvpn
Normal file
506
test/files/etc/config/openvpn
Normal file
|
|
@ -0,0 +1,506 @@
|
|||
package openvpn
|
||||
|
||||
#################################################
|
||||
# Sample to include a custom config file. #
|
||||
#################################################
|
||||
|
||||
config openvpn custom_config
|
||||
|
||||
# Set to 1 to enable this instance:
|
||||
option enabled 0
|
||||
|
||||
# Credentials to login
|
||||
#option username 'login'
|
||||
#option password 'password'
|
||||
|
||||
# Password for client certificate
|
||||
#option cert_password 'cert_password'
|
||||
|
||||
# Include OpenVPN configuration
|
||||
option config /etc/openvpn/my-vpn.conf
|
||||
|
||||
|
||||
#################################################
|
||||
# Sample OpenVPN 2.0 uci config for #
|
||||
# multi-client server. #
|
||||
#################################################
|
||||
|
||||
config openvpn sample_server
|
||||
|
||||
# Set to 1 to enable this instance:
|
||||
option enabled 0
|
||||
|
||||
# Which local IP address should OpenVPN
|
||||
# listen on? (optional)
|
||||
# option local 0.0.0.0
|
||||
|
||||
# Which TCP/UDP port should OpenVPN listen on?
|
||||
# If you want to run multiple OpenVPN instances
|
||||
# on the same machine, use a different port
|
||||
# number for each one. You will need to
|
||||
# open up this port on your firewall.
|
||||
option port 1194
|
||||
|
||||
# TCP or UDP server?
|
||||
# option proto tcp
|
||||
option proto udp
|
||||
|
||||
# "dev tun" will create a routed IP tunnel,
|
||||
# "dev tap" will create an ethernet tunnel.
|
||||
# Use "dev tap0" if you are ethernet bridging
|
||||
# and have precreated a tap0 virtual interface
|
||||
# and bridged it with your ethernet interface.
|
||||
# If you want to control access policies
|
||||
# over the VPN, you must create firewall
|
||||
# rules for the the TUN/TAP interface.
|
||||
# On non-Windows systems, you can give
|
||||
# an explicit unit number, such as tun0.
|
||||
# On Windows, use "dev-node" for this.
|
||||
# On most systems, the VPN will not function
|
||||
# unless you partially or fully disable
|
||||
# the firewall for the TUN/TAP interface.
|
||||
# option dev tap
|
||||
option dev tun
|
||||
|
||||
# SSL/TLS root certificate (ca), certificate
|
||||
# (cert), and private key (key). Each client
|
||||
# and the server must have their own cert and
|
||||
# key file. The server and all clients will
|
||||
# use the same ca file.
|
||||
#
|
||||
# See the "easy-rsa" directory for a series
|
||||
# of scripts for generating RSA certificates
|
||||
# and private keys. Remember to use
|
||||
# a unique Common Name for the server
|
||||
# and each of the client certificates.
|
||||
#
|
||||
# Any X509 key management system can be used.
|
||||
# OpenVPN can also use a PKCS #12 formatted key file
|
||||
# (see "pkcs12" directive in man page).
|
||||
option ca /etc/openvpn/ca.crt
|
||||
option cert /etc/openvpn/server.crt
|
||||
# This file should be kept secret:
|
||||
option key /etc/openvpn/server.key
|
||||
|
||||
# Diffie hellman parameters.
|
||||
# Generate your own with:
|
||||
# openssl dhparam -out dh2048.pem 2048
|
||||
# Substitute 2048 for 1024 if you are using
|
||||
# 1024 bit keys.
|
||||
option dh /etc/openvpn/dh2048.pem
|
||||
|
||||
# Configure server mode and supply a VPN subnet
|
||||
# for OpenVPN to draw client addresses from.
|
||||
# The server will take 10.8.0.1 for itself,
|
||||
# the rest will be made available to clients.
|
||||
# Each client will be able to reach the server
|
||||
# on 10.8.0.1. Comment this line out if you are
|
||||
# ethernet bridging. See the man page for more info.
|
||||
option server "10.8.0.0 255.255.255.0"
|
||||
|
||||
# Maintain a record of client <-> virtual IP address
|
||||
# associations in this file. If OpenVPN goes down or
|
||||
# is restarted, reconnecting clients can be assigned
|
||||
# the same virtual IP address from the pool that was
|
||||
# previously assigned.
|
||||
option ifconfig_pool_persist /tmp/ipp.txt
|
||||
|
||||
# Configure server mode for ethernet bridging.
|
||||
# You must first use your OS's bridging capability
|
||||
# to bridge the TAP interface with the ethernet
|
||||
# NIC interface. Then you must manually set the
|
||||
# IP/netmask on the bridge interface, here we
|
||||
# assume 10.8.0.4/255.255.255.0. Finally we
|
||||
# must set aside an IP range in this subnet
|
||||
# (start=10.8.0.50 end=10.8.0.100) to allocate
|
||||
# to connecting clients. Leave this line commented
|
||||
# out unless you are ethernet bridging.
|
||||
# option server_bridge "10.8.0.4 255.255.255.0 10.8.0.50 10.8.0.100"
|
||||
|
||||
# Push routes to the client to allow it
|
||||
# to reach other private subnets behind
|
||||
# the server. Remember that these
|
||||
# private subnets will also need
|
||||
# to know to route the OpenVPN client
|
||||
# address pool (10.8.0.0/255.255.255.0)
|
||||
# back to the OpenVPN server.
|
||||
# list push "route 192.168.10.0 255.255.255.0"
|
||||
# list push "route 192.168.20.0 255.255.255.0"
|
||||
|
||||
# To assign specific IP addresses to specific
|
||||
# clients or if a connecting client has a private
|
||||
# subnet behind it that should also have VPN access,
|
||||
# use the subdirectory "ccd" for client-specific
|
||||
# configuration files (see man page for more info).
|
||||
|
||||
# EXAMPLE: Suppose the client
|
||||
# having the certificate common name "Thelonious"
|
||||
# also has a small subnet behind his connecting
|
||||
# machine, such as 192.168.40.128/255.255.255.248.
|
||||
# First, uncomment out these lines:
|
||||
# option client_config_dir /etc/openvpn/ccd
|
||||
# list route "192.168.40.128 255.255.255.248"
|
||||
# Then create a file ccd/Thelonious with this line:
|
||||
# iroute 192.168.40.128 255.255.255.248
|
||||
# This will allow Thelonious' private subnet to
|
||||
# access the VPN. This example will only work
|
||||
# if you are routing, not bridging, i.e. you are
|
||||
# using "dev tun" and "server" directives.
|
||||
|
||||
# EXAMPLE: Suppose you want to give
|
||||
# Thelonious a fixed VPN IP address of 10.9.0.1.
|
||||
# First uncomment out these lines:
|
||||
# option client_config_dir /etc/openvpn/ccd
|
||||
# list route "10.9.0.0 255.255.255.252"
|
||||
# list route "192.168.100.0 255.255.255.0"
|
||||
# Then add this line to ccd/Thelonious:
|
||||
# ifconfig-push "10.9.0.1 10.9.0.2"
|
||||
|
||||
# Suppose that you want to enable different
|
||||
# firewall access policies for different groups
|
||||
# of clients. There are two methods:
|
||||
# (1) Run multiple OpenVPN daemons, one for each
|
||||
# group, and firewall the TUN/TAP interface
|
||||
# for each group/daemon appropriately.
|
||||
# (2) (Advanced) Create a script to dynamically
|
||||
# modify the firewall in response to access
|
||||
# from different clients. See man
|
||||
# page for more info on learn-address script.
|
||||
# option learn_address /etc/openvpn/script
|
||||
|
||||
# If enabled, this directive will configure
|
||||
# all clients to redirect their default
|
||||
# network gateway through the VPN, causing
|
||||
# all IP traffic such as web browsing and
|
||||
# and DNS lookups to go through the VPN
|
||||
# (The OpenVPN server machine may need to NAT
|
||||
# the TUN/TAP interface to the internet in
|
||||
# order for this to work properly).
|
||||
# CAVEAT: May break client's network config if
|
||||
# client's local DHCP server packets get routed
|
||||
# through the tunnel. Solution: make sure
|
||||
# client's local DHCP server is reachable via
|
||||
# a more specific route than the default route
|
||||
# of 0.0.0.0/0.0.0.0.
|
||||
# list push "redirect-gateway"
|
||||
|
||||
# Certain Windows-specific network settings
|
||||
# can be pushed to clients, such as DNS
|
||||
# or WINS server addresses. CAVEAT:
|
||||
# http://openvpn.net/faq.html#dhcpcaveats
|
||||
# list push "dhcp-option DNS 10.8.0.1"
|
||||
# list push "dhcp-option WINS 10.8.0.1"
|
||||
|
||||
# Uncomment this directive to allow different
|
||||
# clients to be able to "see" each other.
|
||||
# By default, clients will only see the server.
|
||||
# To force clients to only see the server, you
|
||||
# will also need to appropriately firewall the
|
||||
# server's TUN/TAP interface.
|
||||
# option client_to_client 1
|
||||
|
||||
# Uncomment this directive if multiple clients
|
||||
# might connect with the same certificate/key
|
||||
# files or common names. This is recommended
|
||||
# only for testing purposes. For production use,
|
||||
# each client should have its own certificate/key
|
||||
# pair.
|
||||
#
|
||||
# IF YOU HAVE NOT GENERATED INDIVIDUAL
|
||||
# CERTIFICATE/KEY PAIRS FOR EACH CLIENT,
|
||||
# EACH HAVING ITS OWN UNIQUE "COMMON NAME",
|
||||
# UNCOMMENT THIS LINE OUT.
|
||||
# option duplicate_cn 1
|
||||
|
||||
# The keepalive directive causes ping-like
|
||||
# messages to be sent back and forth over
|
||||
# the link so that each side knows when
|
||||
# the other side has gone down.
|
||||
# Ping every 10 seconds, assume that remote
|
||||
# peer is down if no ping received during
|
||||
# a 120 second time period.
|
||||
option keepalive "10 120"
|
||||
|
||||
# For extra security beyond that provided
|
||||
# by SSL/TLS, create an "HMAC firewall"
|
||||
# to help block DoS attacks and UDP port flooding.
|
||||
#
|
||||
# Generate with:
|
||||
# openvpn --genkey --secret ta.key
|
||||
#
|
||||
# The server and each client must have
|
||||
# a copy of this key.
|
||||
# The second parameter should be '0'
|
||||
# on the server and '1' on the clients.
|
||||
# This file is secret:
|
||||
# option tls_auth "/etc/openvpn/ta.key 0"
|
||||
|
||||
# For additional privacy, a shared secret key
|
||||
# can be used for both authentication (as in tls_auth)
|
||||
# and encryption of the TLS control channel.
|
||||
#
|
||||
# Generate a shared secret with:
|
||||
# openvpn --genkey --secret ta.key
|
||||
#
|
||||
# The server and each client must have
|
||||
# a copy of this key.
|
||||
#
|
||||
# tls_auth and tls_crypt should NOT
|
||||
# be combined, as tls_crypt implies tls_auth.
|
||||
# Use EITHER tls_crypt, tls_auth, or neither option.
|
||||
# option tls_crypt "/etc/openvpn/ta.key"
|
||||
|
||||
# Set the minimum required TLS protocol version
|
||||
# for all connections.
|
||||
#
|
||||
# Require at least TLS 1.1
|
||||
# option tls_version_min "1.1"
|
||||
# Require at least TLS 1.2
|
||||
# option tls_version_min "1.2"
|
||||
# Require TLS 1.2, or the highest version supported
|
||||
# on the system
|
||||
# option tls_version_min "1.2 'or-highest'"
|
||||
|
||||
# List the preferred ciphers to use for the data channel.
|
||||
# Run openvpn --show-ciphers to see all supported ciphers.
|
||||
# list data_ciphers 'AES-256-GCM'
|
||||
# list data_ciphers 'AES-128-GCM'
|
||||
# list data_ciphers 'CHACHA20-POLY1305'
|
||||
|
||||
# Set a fallback cipher in order to be compatible with
|
||||
# peers that do not support cipher negotiation.
|
||||
#
|
||||
# Use AES-256-CBC as fallback
|
||||
# option data_ciphers_fallback 'AES-128-CBC'
|
||||
# Use AES-128-CBC as fallback
|
||||
# option data_ciphers_fallback 'AES-256-CBC'
|
||||
# Use Triple-DES as fallback
|
||||
# option data_ciphers_fallback 'DES-EDE3-CBC'
|
||||
# Use BF-CBC as fallback
|
||||
# option data_ciphers_fallback 'BF-CBC'
|
||||
|
||||
# OpenVPN versions 2.4 and later will attempt to
|
||||
# automatically negotiate the most secure cipher
|
||||
# between the client and server, regardless of a
|
||||
# configured "option cipher" (see below).
|
||||
# Automatic negotiation is recommended.
|
||||
#
|
||||
# Uncomment this option to disable this behavior,
|
||||
# and force all OpenVPN peers to use the configured
|
||||
# cipher option instead (not recommended).
|
||||
# option ncp_disable
|
||||
|
||||
# Enable compression on the VPN link.
|
||||
# If you enable it here, you must also
|
||||
# enable it in the client config file.
|
||||
#
|
||||
# Compression is not recommended, as compression and
|
||||
# encryption in combination can weaken the security
|
||||
# of the connection.
|
||||
#
|
||||
# LZ4 requires OpenVPN 2.4+ client and server
|
||||
# option compress lz4
|
||||
# LZO is available by default only in openvpn-openssl variant
|
||||
# LZO is compatible with most OpenVPN versions
|
||||
# option compress lzo
|
||||
|
||||
# Control how OpenVPN handles peers using compression
|
||||
#
|
||||
# Do not allow any connections using compression
|
||||
# option allow_compression 'no'
|
||||
# Allow incoming compressed packets, but do not send compressed packets to other peers
|
||||
# This can be useful when migrating old configurations with compression activated
|
||||
# option allow_compression 'asym'
|
||||
# Both incoming and outgoing packets may be compressed
|
||||
# option allow_compression 'yes'
|
||||
|
||||
# The maximum number of concurrently connected
|
||||
# clients we want to allow.
|
||||
# option max_clients 100
|
||||
|
||||
# The persist options will try to avoid
|
||||
# accessing certain resources on restart
|
||||
# that may no longer be accessible because
|
||||
# of the privilege downgrade.
|
||||
option persist_key 1
|
||||
option persist_tun 1
|
||||
option user nobody
|
||||
|
||||
# Output a short status file showing
|
||||
# current connections, truncated
|
||||
# and rewritten every minute.
|
||||
option status /tmp/openvpn-status.log
|
||||
|
||||
# By default, log messages will go to the syslog (or
|
||||
# on Windows, if running as a service, they will go to
|
||||
# the "\Program Files\OpenVPN\log" directory).
|
||||
# Use log or log-append to override this default.
|
||||
# "log" will truncate the log file on OpenVPN startup,
|
||||
# while "log-append" will append to it. Use one
|
||||
# or the other (but not both).
|
||||
# option log /tmp/openvpn.log
|
||||
# option log_append /tmp/openvpn.log
|
||||
|
||||
# Set the appropriate level of log
|
||||
# file verbosity.
|
||||
#
|
||||
# 0 is silent, except for fatal errors
|
||||
# 4 is reasonable for general usage
|
||||
# 5 and 6 can help to debug connection problems
|
||||
# 9 is extremely verbose
|
||||
option verb 3
|
||||
|
||||
# Silence repeating messages. At most 20
|
||||
# sequential messages of the same message
|
||||
# category will be output to the log.
|
||||
# option mute 20
|
||||
|
||||
|
||||
##############################################
|
||||
# Sample client-side OpenVPN 2.0 uci config #
|
||||
# for connecting to multi-client server. #
|
||||
##############################################
|
||||
|
||||
config openvpn sample_client
|
||||
|
||||
# Set to 1 to enable this instance:
|
||||
option enabled 0
|
||||
|
||||
# Specify that we are a client and that we
|
||||
# will be pulling certain config file directives
|
||||
# from the server.
|
||||
option client 1
|
||||
|
||||
# Use the same setting as you are using on
|
||||
# the server.
|
||||
# On most systems, the VPN will not function
|
||||
# unless you partially or fully disable
|
||||
# the firewall for the TUN/TAP interface.
|
||||
# option dev tap
|
||||
option dev tun
|
||||
|
||||
# Are we connecting to a TCP or
|
||||
# UDP server? Use the same setting as
|
||||
# on the server.
|
||||
# option proto tcp
|
||||
option proto udp
|
||||
|
||||
# The hostname/IP and port of the server.
|
||||
# You can have multiple remote entries
|
||||
# to load balance between the servers.
|
||||
list remote "my_server_1 1194"
|
||||
# list remote "my_server_2 1194"
|
||||
|
||||
# Choose a random host from the remote
|
||||
# list for load_balancing. Otherwise
|
||||
# try hosts in the order specified.
|
||||
# option remote_random 1
|
||||
|
||||
# Keep trying indefinitely to resolve the
|
||||
# host name of the OpenVPN server. Very useful
|
||||
# on machines which are not permanently connected
|
||||
# to the internet such as laptops.
|
||||
option resolv_retry infinite
|
||||
|
||||
# Most clients don't need to bind to
|
||||
# a specific local port number.
|
||||
option nobind 1
|
||||
|
||||
# Try to preserve some state across restarts.
|
||||
option persist_key 1
|
||||
option persist_tun 1
|
||||
option user nobody
|
||||
|
||||
# If you are connecting through an
|
||||
# HTTP proxy to reach the actual OpenVPN
|
||||
# server, put the proxy server/IP and
|
||||
# port number here. See the man page
|
||||
# if your proxy server requires
|
||||
# authentication.
|
||||
# retry on connection failures:
|
||||
# option http_proxy_retry 1
|
||||
# specify http proxy address and port:
|
||||
# option http_proxy "192.168.1.100 8080"
|
||||
|
||||
# Wireless networks often produce a lot
|
||||
# of duplicate packets. Set this flag
|
||||
# to silence duplicate packet warnings.
|
||||
# option mute_replay_warnings 1
|
||||
|
||||
# SSL/TLS parms.
|
||||
# See the server config file for more
|
||||
# description. It's best to use
|
||||
# a separate .crt/.key file pair
|
||||
# for each client. A single ca
|
||||
# file can be used for all clients.
|
||||
option ca /etc/openvpn/ca.crt
|
||||
option cert /etc/openvpn/client.crt
|
||||
option key /etc/openvpn/client.key
|
||||
|
||||
# Verify server certificate by checking
|
||||
# that the certicate has the key usage
|
||||
# field set to "server". This is an
|
||||
# important precaution to protect against
|
||||
# a potential attack discussed here:
|
||||
# http://openvpn.net/howto.html#mitm
|
||||
#
|
||||
# To use this feature, you will need to generate
|
||||
# your server certificates with the nsCertType
|
||||
# field set to "server". The build_key_server
|
||||
# script in the easy_rsa folder will do this.
|
||||
# option remote_cert_tls server
|
||||
|
||||
# If a tls_auth key is used on the server
|
||||
# then every client must also have the key.
|
||||
# option tls_auth "/etc/openvpn/ta.key 1"
|
||||
|
||||
# If a tls_crypt key is used on the server
|
||||
# every client must also have the key.
|
||||
# option tls_crypt "/etc/openvpn/ta.key"
|
||||
|
||||
# Set the minimum required TLS protocol version
|
||||
# for all connections.
|
||||
#
|
||||
# Require at least TLS 1.1
|
||||
# option tls_version_min "1.1"
|
||||
# Require at least TLS 1.2
|
||||
# option tls_version_min "1.2"
|
||||
# Require TLS 1.2, or the highest version supported
|
||||
# on the system
|
||||
# option tls_version_min "1.2 'or-highest'"
|
||||
|
||||
# List the preferred ciphers for the data channel.
|
||||
# list data_ciphers 'AES-256-GCM'
|
||||
# list data_ciphers 'AES-128-GCM'
|
||||
# list data_ciphers 'CHACHA20-POLY1305'
|
||||
|
||||
# Set a fallback cipher if you connect to a peer that does
|
||||
# not support cipher negotiation.
|
||||
# Use AES-256-CBC as fallback
|
||||
# option data_ciphers_fallback 'AES-128-CBC'
|
||||
# Use AES-128-CBC as fallback
|
||||
# option data_ciphers_fallback 'AES-256-CBC'
|
||||
# Use Triple-DES as fallback
|
||||
# option data_ciphers_fallback 'DES-EDE3-CBC'
|
||||
# Use BF-CBC as fallback
|
||||
# option data_ciphers_fallback 'BF-CBC'
|
||||
|
||||
# Enable compression on the VPN link.
|
||||
# Don't enable this unless it is also
|
||||
# enabled in the server config file.
|
||||
#
|
||||
# Compression is not recommended, as compression and
|
||||
# encryption in combination can weaken the security
|
||||
# of the connection.
|
||||
#
|
||||
# LZ4 requires OpenVPN 2.4+ on server and client
|
||||
# option compress lz4
|
||||
# LZO is available by default only in openvpn-openssl variant
|
||||
# LZO is compatible with most OpenVPN versions
|
||||
# option compress lzo
|
||||
|
||||
# Set log file verbosity.
|
||||
option verb 3
|
||||
|
||||
# Silence repeating messages
|
||||
# option mute 20
|
||||
29
test/files/etc/config/owsd
Normal file
29
test/files/etc/config/owsd
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
|
||||
config owsd 'global'
|
||||
option enable '0'
|
||||
option www '/www'
|
||||
|
||||
config ubusproxy 'ubusproxy'
|
||||
option enable '0'
|
||||
list object 'netmode'
|
||||
|
||||
config owsd-listen 'loopback'
|
||||
option port '80'
|
||||
option interface 'loopback'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
|
||||
config owsd-listen 'lan'
|
||||
option port '80'
|
||||
option interface 'lan'
|
||||
option ipv6 'on'
|
||||
option ipv6only 'off'
|
||||
option whitelist_interface_as_origin '1'
|
||||
option whitelist_dhcp_domains '1'
|
||||
|
||||
config owsd-listen 'wan'
|
||||
option port '80'
|
||||
option interface 'wan'
|
||||
option ipv6 'on'
|
||||
option whitelist_interface_as_origin '1'
|
||||
|
||||
70
test/files/etc/config/periodicstats
Normal file
70
test/files/etc/config/periodicstats
Normal file
|
|
@ -0,0 +1,70 @@
|
|||
config globals 'globals'
|
||||
option enable '1'
|
||||
option base_interval '5'
|
||||
|
||||
config sampleset 'set_1'
|
||||
option fetch_samples '0'
|
||||
option enable '1'
|
||||
option sample_interval '20'
|
||||
option report_sample '7'
|
||||
|
||||
config parameter 'param_1_set_1'
|
||||
option sample_set 'set_1'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.1.Stats.BytesReceived'
|
||||
|
||||
config parameter 'param_2_set_1'
|
||||
option sample_set 'set_1'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.1.Stats.BytesSent'
|
||||
|
||||
config parameter 'param_3_set_1'
|
||||
option sample_set 'set_1'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.1.Stats.ErrorsReceived'
|
||||
|
||||
config parameter 'param_4_set_1'
|
||||
option sample_set 'set_1'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.1.Stats.ErrorsSent'
|
||||
|
||||
config sampleset 'set_2'
|
||||
option fetch_samples '0'
|
||||
option enable '1'
|
||||
option sample_interval '10'
|
||||
option report_sample '4'
|
||||
|
||||
config parameter 'param_1_set_2'
|
||||
option sample_set 'set_2'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.2.Stats.BytesReceived'
|
||||
|
||||
config parameter 'param_2_set_2'
|
||||
option sample_set 'set_2'
|
||||
option sample_mode '0'
|
||||
option calculation_mode '0'
|
||||
option low_threshold '0'
|
||||
option high_threshold '0'
|
||||
option enable '1'
|
||||
option reference 'Device.Ethernet.Link.2.Stats.BytesSent'
|
||||
|
||||
52
test/files/etc/config/ports
Normal file
52
test/files/etc/config/ports
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
|
||||
config ethport 'LAN1'
|
||||
option enabled '1'
|
||||
option name 'LAN1'
|
||||
option ifname 'eth1'
|
||||
option speed '1000'
|
||||
option duplex 'full'
|
||||
option autoneg '1'
|
||||
option eee '0'
|
||||
option pause '0'
|
||||
|
||||
config ethport 'LAN2'
|
||||
option enabled '1'
|
||||
option name 'LAN2'
|
||||
option ifname 'eth2'
|
||||
option speed '1000'
|
||||
option duplex 'full'
|
||||
option autoneg '1'
|
||||
option eee '0'
|
||||
option pause '0'
|
||||
|
||||
config ethport 'LAN3'
|
||||
option enabled '1'
|
||||
option name 'LAN3'
|
||||
option ifname 'eth3'
|
||||
option speed '1000'
|
||||
option duplex 'full'
|
||||
option autoneg '1'
|
||||
option eee '0'
|
||||
option pause '0'
|
||||
|
||||
config ethport 'LAN4'
|
||||
option enabled '1'
|
||||
option name 'LAN4'
|
||||
option ifname 'eth4'
|
||||
option speed '1000'
|
||||
option duplex 'full'
|
||||
option autoneg '1'
|
||||
option eee '0'
|
||||
option pause '0'
|
||||
|
||||
config ethport 'WAN'
|
||||
option enabled '1'
|
||||
option name 'WAN'
|
||||
option ifname 'eth0'
|
||||
option speed '1000'
|
||||
option duplex 'full'
|
||||
option autoneg '1'
|
||||
option eee '0'
|
||||
option pause '1'
|
||||
option uplink '1'
|
||||
|
||||
361
test/files/etc/config/qos
Normal file
361
test/files/etc/config/qos
Normal file
|
|
@ -0,0 +1,361 @@
|
|||
|
||||
config queue 'q_0_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '8'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_1_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '7'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_2_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '6'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_3_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '5'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_4_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '4'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_5_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '3'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_6_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '2'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_7_eth1'
|
||||
option enable '1'
|
||||
option ifname 'eth1'
|
||||
option precedence '1'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_0_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '8'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_1_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '7'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_2_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '6'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_3_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '5'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_4_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '4'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_5_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '3'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_6_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '2'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_7_eth2'
|
||||
option enable '1'
|
||||
option ifname 'eth2'
|
||||
option precedence '1'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_0_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '8'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_1_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '7'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_2_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '6'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_3_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '5'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_4_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '4'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_5_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '3'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_6_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '2'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_7_eth3'
|
||||
option enable '1'
|
||||
option ifname 'eth3'
|
||||
option precedence '1'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_0_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '8'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_1_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '7'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_2_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '6'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_3_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '5'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_4_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '4'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_5_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '3'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_6_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '2'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_7_eth4'
|
||||
option enable '1'
|
||||
option ifname 'eth4'
|
||||
option precedence '1'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_0_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '8'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_1_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '7'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_2_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '6'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_3_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '5'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_4_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '4'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_5_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '3'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_6_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '2'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
config queue 'q_7_eth0'
|
||||
option enable '1'
|
||||
option ifname 'eth0'
|
||||
option precedence '1'
|
||||
option scheduling 'SP'
|
||||
option rate '0'
|
||||
option burst_size '0'
|
||||
option weight '1'
|
||||
|
||||
|
|
@ -12,3 +12,4 @@ config timeserver 'ntp'
|
|||
option enable_server '1'
|
||||
list server 'ntp1.sth.netnod.se'
|
||||
list server 'ntp1.gbg.netnod.se'
|
||||
|
||||
|
|
|
|||
28
test/files/etc/config/upnpd
Normal file
28
test/files/etc/config/upnpd
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
config upnpd config
|
||||
option enabled 0
|
||||
option enable_natpmp 1
|
||||
option enable_upnp 1
|
||||
option secure_mode 1
|
||||
option log_output 0
|
||||
option download 1024
|
||||
option upload 512
|
||||
#by default, looked up dynamically from ubus
|
||||
# option external_iface wan
|
||||
option internal_iface lan
|
||||
option port 5000
|
||||
option upnp_lease_file /var/run/miniupnpd.leases
|
||||
option igdv1 1
|
||||
|
||||
config perm_rule
|
||||
option action allow
|
||||
option ext_ports 1024-65535
|
||||
option int_addr 0.0.0.0/0 # Does not override secure_mode
|
||||
option int_ports 1024-65535
|
||||
option comment "Allow high ports"
|
||||
|
||||
config perm_rule
|
||||
option action deny
|
||||
option ext_ports 0-65535
|
||||
option int_addr 0.0.0.0/0
|
||||
option int_ports 0-65535
|
||||
option comment "Default deny"
|
||||
|
|
@ -8,6 +8,7 @@ config wifi-device 'test1'
|
|||
config wifi-iface 'test1_1'
|
||||
option device 'test1'
|
||||
option ifname 'test1'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option encryption 'psk2'
|
||||
|
||||
|
|
@ -21,5 +22,6 @@ config wifi-device 'test2'
|
|||
config wifi-iface 'test2_1'
|
||||
option device 'test2'
|
||||
option ifname 'test2'
|
||||
option network 'lan'
|
||||
option mode 'ap'
|
||||
option encryption 'psk2'
|
||||
|
|
|
|||
0
test/files/lib/netifd/proto/dhcp.sh
Normal file
0
test/files/lib/netifd/proto/dhcp.sh
Normal file
0
test/files/lib/netifd/proto/dhcpv6.sh
Normal file
0
test/files/lib/netifd/proto/dhcpv6.sh
Normal file
0
test/files/lib/netifd/proto/gre.sh
Normal file
0
test/files/lib/netifd/proto/gre.sh
Normal file
0
test/files/lib/netifd/proto/ppp.sh
Normal file
0
test/files/lib/netifd/proto/ppp.sh
Normal file
91
test/files/tmp/fast_stats.data
Normal file
91
test/files/tmp/fast_stats.data
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
{
|
||||
"line": [
|
||||
{
|
||||
"id": 1,
|
||||
"bytes_sent": 0,
|
||||
"bytes_received": 0,
|
||||
"packets_sent": 0,
|
||||
"packets_received": 0,
|
||||
"errors_sent": 0,
|
||||
"errors_received": 0,
|
||||
"discard_packets_sent": 0,
|
||||
"discard_packets_received": 0,
|
||||
"total_start": 0,
|
||||
"showtime_start": 0,
|
||||
"last_showtime_start": 8438,
|
||||
"current_day_start": 0,
|
||||
"quarter_hour_start": 0,
|
||||
"total": {
|
||||
"errored_secs": 0,
|
||||
"severely_errored_secs": 0,
|
||||
"loss": 0,
|
||||
"lors": 0,
|
||||
"uas": 0,
|
||||
"rtx_uc": 0,
|
||||
"rtx_tx": 0,
|
||||
"success_bsw": 0,
|
||||
"success_sra": 0,
|
||||
"success_fra": 0,
|
||||
"success_rpa": 4,
|
||||
"success_tiga": 0
|
||||
},
|
||||
"showtime": {
|
||||
"errored_secs": 0,
|
||||
"severely_errored_secs": 0,
|
||||
"loss": 0,
|
||||
"lors": 0,
|
||||
"uas": 0,
|
||||
"rtx_uc": 0,
|
||||
"rtx_tx": 0,
|
||||
"success_bsw": 0,
|
||||
"success_sra": 0,
|
||||
"success_fra": 0,
|
||||
"success_rpa": 338,
|
||||
"success_tiga": 0
|
||||
},
|
||||
"lastshowtime": {
|
||||
"errored_secs": 4294967295,
|
||||
"severely_errored_secs": 4294967295,
|
||||
"loss": 4294967295,
|
||||
"lors": 4294967295,
|
||||
"uas": 4294967295,
|
||||
"rtx_uc": 4294967295,
|
||||
"rtx_tx": 4294967295,
|
||||
"success_bsw": 4294967295,
|
||||
"success_sra": 4294967295,
|
||||
"success_fra": 4294967295,
|
||||
"success_rpa": 4294967295,
|
||||
"success_tiga": 4294967295
|
||||
},
|
||||
"currentday": {
|
||||
"errored_secs": 0,
|
||||
"severely_errored_secs": 0,
|
||||
"loss": 0,
|
||||
"lors": 0,
|
||||
"uas": 0,
|
||||
"rtx_uc": 0,
|
||||
"rtx_tx": 0,
|
||||
"success_bsw": 0,
|
||||
"success_sra": 0,
|
||||
"success_fra": 0,
|
||||
"success_rpa": 0,
|
||||
"success_tiga": 0
|
||||
},
|
||||
"quarterhour": {
|
||||
"errored_secs": 0,
|
||||
"severely_errored_secs": 0,
|
||||
"loss": 0,
|
||||
"lors": 0,
|
||||
"uas": 0,
|
||||
"rtx_uc": 0,
|
||||
"rtx_tx": 0,
|
||||
"success_bsw": 0,
|
||||
"success_sra": 0,
|
||||
"success_fra": 0,
|
||||
"success_rpa": 0,
|
||||
"success_tiga": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
67
test/files/tmp/fast_status.data
Normal file
67
test/files/tmp/fast_status.data
Normal file
|
|
@ -0,0 +1,67 @@
|
|||
{
|
||||
"line": [
|
||||
{
|
||||
"id": 1,
|
||||
"status": "down",
|
||||
"upstream": true,
|
||||
"firmware_version": "A2pvfbH046w.d27l2",
|
||||
"link_status": "no_signal",
|
||||
"current_profile": "unknown",
|
||||
"power_management_state": "l3",
|
||||
"max_bit_rate": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"allowed_profiles": [
|
||||
|
||||
],
|
||||
"success_failure_cause": 0,
|
||||
"upbokler": 0,
|
||||
"last_transmitted_signal": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"upbokle": 0,
|
||||
"line_number": 1,
|
||||
"noise_margin": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"attenuation": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"power": {
|
||||
"us": -512,
|
||||
"ds": 0
|
||||
},
|
||||
"snrm_rmc": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"bits_rmc_ps_ds": [
|
||||
|
||||
],
|
||||
"bits_rmc_ps_us": [
|
||||
|
||||
],
|
||||
"fext_to_cancel_enable": {
|
||||
"us": false,
|
||||
"ds": false
|
||||
},
|
||||
"etr": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"att_etr": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
},
|
||||
"min_eftr": {
|
||||
"us": 0,
|
||||
"ds": 0
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
24
test/files/tmp/fwbank.data
Normal file
24
test/files/tmp/fwbank.data
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
{
|
||||
"bank": [
|
||||
{
|
||||
"name": "A",
|
||||
"id": 1,
|
||||
"active": true,
|
||||
"boot": true,
|
||||
"upgrade": false,
|
||||
"fwver": "DG400PRIME-A-IOPSYS-6.3.0BETA1-210908_1319",
|
||||
"swver": "6.3.0BETA1",
|
||||
"status": "Active"
|
||||
},
|
||||
{
|
||||
"name": "B",
|
||||
"id": 2,
|
||||
"active": false,
|
||||
"boot": false,
|
||||
"upgrade": true,
|
||||
"fwver": "DG400PRIME-A-IOPSYS-6.2.0RC1-210624_0041",
|
||||
"swver": "6.2.0RC1",
|
||||
"status": "Available"
|
||||
}
|
||||
]
|
||||
}
|
||||
1281
test/files/tmp/processes.data
Normal file
1281
test/files/tmp/processes.data
Normal file
File diff suppressed because it is too large
Load diff
31
test/files/tmp/rmonstats_eth0.data
Normal file
31
test/files/tmp/rmonstats_eth0.data
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"ifname": "eth0",
|
||||
"tx_priority_q": -1,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0,
|
||||
"tx_broadcast_packets": 0,
|
||||
"tx_multicast_packets": 0,
|
||||
"tx_crc_error_packets": 0,
|
||||
"tx_undersize_packets": 0,
|
||||
"tx_oversize_packets": 0,
|
||||
"tx_packets_64bytes": 0,
|
||||
"tx_packets_65to127bytes": 0,
|
||||
"tx_packets_128to255bytes": 0,
|
||||
"tx_packets_256to511bytes": 0,
|
||||
"tx_packets_512to1023bytes": 0,
|
||||
"tx_packets_1024to1518bytes": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"rx_broadcast_packets": 0,
|
||||
"rx_multicast_packets": 0,
|
||||
"rx_crc_error_packets": 0,
|
||||
"rx_undersize_packets": 0,
|
||||
"rx_oversize_packets": 0,
|
||||
"rx_packets_64bytes": 0,
|
||||
"rx_packets_65to127bytes": 0,
|
||||
"rx_packets_128to255bytes": 0,
|
||||
"rx_packets_256to511bytes": 0,
|
||||
"rx_packets_512to1023bytes": 0,
|
||||
"rx_packets_1024to1518bytes": 0
|
||||
}
|
||||
|
||||
31
test/files/tmp/rmonstats_eth1.data
Normal file
31
test/files/tmp/rmonstats_eth1.data
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"ifname": "eth1",
|
||||
"tx_priority_q": -1,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0,
|
||||
"tx_broadcast_packets": 0,
|
||||
"tx_multicast_packets": 0,
|
||||
"tx_crc_error_packets": 0,
|
||||
"tx_undersize_packets": 0,
|
||||
"tx_oversize_packets": 0,
|
||||
"tx_packets_64bytes": 0,
|
||||
"tx_packets_65to127bytes": 0,
|
||||
"tx_packets_128to255bytes": 0,
|
||||
"tx_packets_256to511bytes": 0,
|
||||
"tx_packets_512to1023bytes": 0,
|
||||
"tx_packets_1024to1518bytes": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"rx_broadcast_packets": 0,
|
||||
"rx_multicast_packets": 0,
|
||||
"rx_crc_error_packets": 0,
|
||||
"rx_undersize_packets": 0,
|
||||
"rx_oversize_packets": 0,
|
||||
"rx_packets_64bytes": 0,
|
||||
"rx_packets_65to127bytes": 0,
|
||||
"rx_packets_128to255bytes": 0,
|
||||
"rx_packets_256to511bytes": 0,
|
||||
"rx_packets_512to1023bytes": 0,
|
||||
"rx_packets_1024to1518bytes": 0
|
||||
}
|
||||
|
||||
31
test/files/tmp/rmonstats_eth2.data
Normal file
31
test/files/tmp/rmonstats_eth2.data
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"ifname": "eth2",
|
||||
"tx_priority_q": -1,
|
||||
"tx_bytes": 338808,
|
||||
"tx_packets": 2268,
|
||||
"tx_broadcast_packets": 377,
|
||||
"tx_multicast_packets": 1104,
|
||||
"tx_crc_error_packets": 0,
|
||||
"tx_undersize_packets": 0,
|
||||
"tx_oversize_packets": 0,
|
||||
"tx_packets_64bytes": 666,
|
||||
"tx_packets_65to127bytes": 1291,
|
||||
"tx_packets_128to255bytes": 196,
|
||||
"tx_packets_256to511bytes": 16,
|
||||
"tx_packets_512to1023bytes": 16,
|
||||
"tx_packets_1024to1518bytes": 83,
|
||||
"rx_bytes": 245770,
|
||||
"rx_packets": 2410,
|
||||
"rx_broadcast_packets": 0,
|
||||
"rx_multicast_packets": 797,
|
||||
"rx_crc_error_packets": 0,
|
||||
"rx_undersize_packets": 0,
|
||||
"rx_oversize_packets": 0,
|
||||
"rx_packets_64bytes": 392,
|
||||
"rx_packets_65to127bytes": 1724,
|
||||
"rx_packets_128to255bytes": 289,
|
||||
"rx_packets_256to511bytes": 1,
|
||||
"rx_packets_512to1023bytes": 1,
|
||||
"rx_packets_1024to1518bytes": 3
|
||||
}
|
||||
|
||||
31
test/files/tmp/rmonstats_eth3.data
Normal file
31
test/files/tmp/rmonstats_eth3.data
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"ifname": "eth3",
|
||||
"tx_priority_q": -1,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0,
|
||||
"tx_broadcast_packets": 0,
|
||||
"tx_multicast_packets": 0,
|
||||
"tx_crc_error_packets": 0,
|
||||
"tx_undersize_packets": 0,
|
||||
"tx_oversize_packets": 0,
|
||||
"tx_packets_64bytes": 0,
|
||||
"tx_packets_65to127bytes": 0,
|
||||
"tx_packets_128to255bytes": 0,
|
||||
"tx_packets_256to511bytes": 0,
|
||||
"tx_packets_512to1023bytes": 0,
|
||||
"tx_packets_1024to1518bytes": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"rx_broadcast_packets": 0,
|
||||
"rx_multicast_packets": 0,
|
||||
"rx_crc_error_packets": 0,
|
||||
"rx_undersize_packets": 0,
|
||||
"rx_oversize_packets": 0,
|
||||
"rx_packets_64bytes": 0,
|
||||
"rx_packets_65to127bytes": 0,
|
||||
"rx_packets_128to255bytes": 0,
|
||||
"rx_packets_256to511bytes": 0,
|
||||
"rx_packets_512to1023bytes": 0,
|
||||
"rx_packets_1024to1518bytes": 0
|
||||
}
|
||||
|
||||
31
test/files/tmp/rmonstats_eth4.data
Normal file
31
test/files/tmp/rmonstats_eth4.data
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
{
|
||||
"ifname": "eth4",
|
||||
"tx_priority_q": -1,
|
||||
"tx_bytes": 0,
|
||||
"tx_packets": 0,
|
||||
"tx_broadcast_packets": 0,
|
||||
"tx_multicast_packets": 0,
|
||||
"tx_crc_error_packets": 0,
|
||||
"tx_undersize_packets": 0,
|
||||
"tx_oversize_packets": 0,
|
||||
"tx_packets_64bytes": 0,
|
||||
"tx_packets_65to127bytes": 0,
|
||||
"tx_packets_128to255bytes": 0,
|
||||
"tx_packets_256to511bytes": 0,
|
||||
"tx_packets_512to1023bytes": 0,
|
||||
"tx_packets_1024to1518bytes": 0,
|
||||
"rx_bytes": 0,
|
||||
"rx_packets": 0,
|
||||
"rx_broadcast_packets": 0,
|
||||
"rx_multicast_packets": 0,
|
||||
"rx_crc_error_packets": 0,
|
||||
"rx_undersize_packets": 0,
|
||||
"rx_oversize_packets": 0,
|
||||
"rx_packets_64bytes": 0,
|
||||
"rx_packets_65to127bytes": 0,
|
||||
"rx_packets_128to255bytes": 0,
|
||||
"rx_packets_256to511bytes": 0,
|
||||
"rx_packets_512to1023bytes": 0,
|
||||
"rx_packets_1024to1518bytes": 0
|
||||
}
|
||||
|
||||
56
test/files/tmp/topology_hosts.data
Normal file
56
test/files/tmp/topology_hosts.data
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"hosts": [
|
||||
{
|
||||
"macaddr": "00:90:9e:9f:f6:d5",
|
||||
"ipaddr": "192.168.1.40",
|
||||
"address_source": "Static",
|
||||
"lease_time_remaining": 0,
|
||||
"device": "eth1",
|
||||
"network": "lan",
|
||||
"interface_type": "Ethernet",
|
||||
"hostname": "",
|
||||
"active": true,
|
||||
"active_last_change": "2021-09-22T23:07:10Z",
|
||||
"active_connections": 1,
|
||||
"ipv4addr": [
|
||||
"192.168.1.40"
|
||||
],
|
||||
"ipv6addr": [
|
||||
"fe80::290:9eff:fe9f:f6d5",
|
||||
"2001:db8:100:15a::1"
|
||||
],
|
||||
"stats": {
|
||||
"tx_packets": 659,
|
||||
"tx_bytes": 74322,
|
||||
"rx_packets": 524,
|
||||
"rx_bytes": 60000
|
||||
}
|
||||
},
|
||||
{
|
||||
"macaddr": "24:18:1d:e2:f7:dd",
|
||||
"ipaddr": "192.168.1.187",
|
||||
"address_source": "DHCP",
|
||||
"lease_time_remaining": 3599,
|
||||
"device": "wl0",
|
||||
"network": "lan",
|
||||
"interface_type": "Wi-Fi",
|
||||
"hostname": "Galaxy-S8",
|
||||
"active": true,
|
||||
"active_last_change": "2021-09-22T23:27:09Z",
|
||||
"active_connections": 2,
|
||||
"ipv4addr": [
|
||||
"192.168.1.187"
|
||||
],
|
||||
"ipv6addr": [
|
||||
"fe80::655b:b9e9:4eae:148"
|
||||
],
|
||||
"stats": {
|
||||
"tx_packets": 432,
|
||||
"tx_bytes": 51391,
|
||||
"rx_packets": 41,
|
||||
"rx_bytes": 5694
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
30
test/files/usr/libexec/rpcd/ethernet
Executable file
30
test/files/usr/libexec/rpcd/ethernet
Executable file
|
|
@ -0,0 +1,30 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "rmonstats" : {"ifname":"String"} }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
rmonstats)
|
||||
read input;
|
||||
json_load "$input"
|
||||
json_get_var ifname ifname
|
||||
if [ "$ifname" == "eth1" ]; then
|
||||
cat /tmp/rmonstats_eth1.data 2>/dev/null
|
||||
elif [ "$ifname" == "eth2" ]; then
|
||||
cat /tmp/rmonstats_eth2.data 2>/dev/null
|
||||
elif [ "$ifname" == "eth3" ]; then
|
||||
cat /tmp/rmonstats_eth3.data 2>/dev/null
|
||||
elif [ "$ifname" == "eth4" ]; then
|
||||
cat /tmp/rmonstats_eth4.data 2>/dev/null
|
||||
else
|
||||
cat /tmp/rmonstats_eth0.data 2>/dev/null
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
20
test/files/usr/libexec/rpcd/fast
Executable file
20
test/files/usr/libexec/rpcd/fast
Executable file
|
|
@ -0,0 +1,20 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "status" : {}, "stats" : {} }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
status)
|
||||
cat /tmp/fast_status.data 2>/dev/null
|
||||
;;
|
||||
stats)
|
||||
cat /tmp/fast_stats.data 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
17
test/files/usr/libexec/rpcd/fwbank
Executable file
17
test/files/usr/libexec/rpcd/fwbank
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "dump" : {} }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
dump)
|
||||
cat /tmp/fwbank.data 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
17
test/files/usr/libexec/rpcd/router.system
Executable file
17
test/files/usr/libexec/rpcd/router.system
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "processes" : {} }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
processes)
|
||||
cat /tmp/processes.data 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
17
test/files/usr/libexec/rpcd/topology
Executable file
17
test/files/usr/libexec/rpcd/topology
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/sh
|
||||
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
case "$1" in
|
||||
list)
|
||||
echo '{ "hosts" : {} }'
|
||||
;;
|
||||
call)
|
||||
case "$2" in
|
||||
hosts)
|
||||
cat /tmp/topology_hosts.data 2>/dev/null
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
Loading…
Add table
Reference in a new issue