Developing lightweight computation at the DSG edge

Commit d87a94b4 authored by p4u's avatar p4u
Browse files

Function in qmpcontrol to disable the search/offer of default gateway

parent fe716c85
......@@ -36,6 +36,11 @@ search_default_gw() {
qmp_gw_apply
}
disable_default_gw() {
qmp_gw_disable_default
qmp_gw_apply
}
configure_wifi() {
qmp_configure_wifi_initial
qmp_configure_wifi
......@@ -90,17 +95,18 @@ help() {
echo "Use: $0 <function> [params]"
echo ""
echo "Available functions:"
echo " offer_default_gw : Offers default gw to the network"
echo " search_default_gw : Search for a default gw in the network"
echo " configure_wifi : Configure and apply current wifi settings"
echo " configure_network : Configure and apply current network settings"
echo " configure_system : Configure and apply current system settings (qmp.node section and so on)"
echo " publish_hna : Publish an IP range (v4 or v6): publish_hna <IP/NETMASK> [ID]"
echo " unpublish_hna : Unpublish a current HNA: unpublish_hna <ID>"
echo " apply_netserver : Start/stop nerserver depending on qmp configuration"
echo " enable_ns_ppt : Enable POE passtrought from NanoStation M2/5 devices. Be careful with this"
echo " upgrade [URL] : Upgrade system. By default to the last version, but image url can be provided to force"
echo " hard_reboot : Performs a hard reboot (using kernel sysrq)"
echo " offer_default_gw : Offers default gw to the network"
echo " search_default_gw : Search for a default gw in the network"
echo " disable_default_gw : Disables the search/offer of default gw"
echo " configure_wifi : Configure and apply current wifi settings"
echo " configure_network : Configure and apply current network settings"
echo " configure_system : Configure and apply current system settings (qmp.node section and so on)"
echo " publish_hna : Publish an IP range (v4 or v6): publish_hna <IP/NETMASK> [ID]"
echo " unpublish_hna : Unpublish a current HNA: unpublish_hna <ID>"
echo " apply_netserver : Start/stop nerserver depending on qmp configuration"
echo " enable_ns_ppt : Enable POE passtrought from NanoStation M2/5 devices. Be careful with this"
echo " upgrade [URL] : Upgrade system. By default to the last version, but image url can be provided to force"
echo " hard_reboot : Performs a hard reboot (using kernel sysrq)"
echo ""
exit 1
}
......
......@@ -42,6 +42,14 @@ qmp_gw_offer_default() {
qmp_uci_del tunnels.search_ipv6_tunnel
}
qmp_gw_disable_default() {
qmp_uci_del tunnels.offer_ipv4_tunnel
qmp_uci_del tunnels.offer_ipv6_tunnel
qmp_uci_del tunnels.search_ipv4_tunnel
qmp_uci_del tunnels.search_ipv6_tunnel
qmp_gw_masq_wan 0
}
qmp_gw_masq_wan() {
#First parameter is 1/0 (enable/disable masquerade). Default is 1
[ -z "$1" ] && masq=1 || masq=$1
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment