Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • autinerd/experimental-openwrt-24.10
  • experimental
  • feature/addMikrotikwAP
  • master
  • nrb/airmax-test
  • nrb/ar9344-reset-sequence
  • nrb/ex400-remove-wps
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2022.1.1-ffs
  • v2022.1.3-ffs
  • v2022.1.4-ffs
  • v2023.1-ffs
  • v2023.2-ffs
  • v2023.2.2-ffs
  • v2023.2.3-ffs
  • v2023.2.4-ffs
  • v2023.2.5-ffs
  • experimental-2022-09-24
  • experimental-2022-09-24-base
  • experimental-2023-03-11
  • experimental-2023-03-11-base
  • experimental-2023-03-12
  • experimental-2023-03-12-base
  • experimental-2023-03-16
  • experimental-2023-03-16-base
  • experimental-2023-03-20
  • experimental-2023-03-20-base
  • experimental-2023-03-23
  • experimental-2023-03-23-base
  • experimental-2023-03-25
  • experimental-2023-03-25-base
  • experimental-2023-03-26
  • experimental-2023-03-26-base
  • experimental-2023-03-30
  • experimental-2023-03-30-base
  • experimental-2023-03-31
  • experimental-2023-03-31-base
  • experimental-2023-04-01
  • experimental-2023-04-01-base
  • experimental-2023-04-08
  • experimental-2023-04-08-base
  • experimental-2023-04-10
  • experimental-2023-04-10-base
  • experimental-2023-04-13
  • experimental-2023-04-13-base
  • experimental-2023-04-15
  • experimental-2023-04-15-base
  • experimental-2023-04-16
  • experimental-2023-04-16-base
  • experimental-2023-04-18
  • experimental-2023-04-18-base
  • experimental-2023-04-20
  • experimental-2023-04-20-base
  • experimental-2023-04-26
  • experimental-2023-04-26-base
  • experimental-2023-04-28
  • experimental-2023-04-28-base
  • experimental-2023-04-30
  • experimental-2023-04-30-base
  • experimental-2023-05-02
  • experimental-2023-05-02-base
  • experimental-2023-05-03
  • experimental-2023-05-03-base
  • experimental-2023-05-12
  • experimental-2023-05-12-base
  • experimental-2023-05-21
  • experimental-2023-05-21-base
  • experimental-2023-05-25
  • experimental-2023-05-25-base
  • experimental-2023-07-02
  • experimental-2023-07-02-base
  • experimental-2023-07-04
  • experimental-2023-07-04-base
  • experimental-2023-07-12
  • experimental-2023-07-12-base
  • experimental-2023-07-16
  • experimental-2023-07-16-base
  • experimental-2023-08-04
  • experimental-2023-08-04-base
  • experimental-2023-08-10
  • experimental-2023-08-10-base
  • experimental-2023-09-08
  • experimental-2023-09-08-base
  • experimental-2023-09-09
  • experimental-2023-09-09-base
  • experimental-2023-09-10
  • experimental-2023-09-10-base
  • experimental-2023-09-11
  • experimental-2023-09-11-base
  • experimental-2023-09-12
  • experimental-2023-09-12-base
  • experimental-2023-09-13
  • experimental-2023-09-13-base
  • experimental-2023-09-15
  • experimental-2023-09-15-base
  • experimental-2023-09-16
  • experimental-2023-09-16-base
  • experimental-2023-09-18
  • experimental-2023-09-18-base
  • experimental-2023-09-20
  • experimental-2023-09-20-base
  • experimental-2023-09-27
  • experimental-2023-09-27-base
  • experimental-2023-09-28
  • experimental-2023-09-28-base
  • experimental-2023-09-29
  • experimental-2023-09-29-base
  • experimental-2023-10-02
  • experimental-2023-10-02-base
  • experimental-2023-10-13
  • experimental-2023-10-13-base
  • experimental-2023-10-14
  • experimental-2023-10-14-base
  • experimental-2023-10-16
  • experimental-2023-10-16-base
  • experimental-2023-10-23
  • experimental-2023-10-23-base
137 results

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
  • 0x4A6F-master
  • 0x4A6F-rpi4
  • 2014.3.x
  • 2014.4.x
  • babel
  • experimental
  • hoodselector
  • master
  • nrb/gluon-master-cpe510
  • nrb/test-radv-filter
  • nrbffs/fastd-remove-delay
  • nrbffs/netgear-ex6120
  • radv-filterd
  • v2015.1.x
  • v2016.1.x
  • v2016.2.4-batmanbug
  • v2016.2.x
  • v2018.2.2-ffs
  • v2018.2.3-ffs
  • v2018.2.x
  • v2019.1-ffs
  • v2019.1.1-ffs
  • v2019.1.2-ffs
  • v2020.1-ffs
  • v2020.1.1-ffs
  • v2020.1.3-ffs
  • v2020.2-ffs
  • v2020.2.1-ffs
  • v2020.2.2-ffs
  • v2020.2.3-ffs
  • v2020.2.x
  • v2021.1-ffs
  • v2021.1.1-ffs
  • v2021.1.2-ffs
  • v2014.1
  • v2014.2
  • v2014.3
  • v2014.3.1
  • v2014.4
  • v2015.1
  • v2015.1.1
  • v2015.1.2
  • v2016.1
  • v2016.1.1
  • v2016.1.2
  • v2016.1.3
  • v2016.1.4
  • v2016.1.5
  • v2016.1.6
  • v2016.2
  • v2016.2.1
  • v2016.2.2
  • v2016.2.3
  • v2016.2.4
  • v2016.2.5
  • v2016.2.6
  • v2016.2.7
  • v2017.1
  • v2017.1.1
  • v2017.1.2
  • v2017.1.3
  • v2017.1.4
  • v2017.1.5
  • v2017.1.6
  • v2017.1.7
  • v2017.1.8
  • v2018.1
  • v2018.1.1
  • v2018.1.2
  • v2018.1.3
  • v2018.1.4
  • v2018.2
  • v2018.2-ffs0.1
  • v2018.2.1
  • v2018.2.1-ffs0.1
  • v2018.2.2-ffs0.1
  • v2018.2.3-ffs0.1
  • v2019.1-ffs0.1
  • v2019.1.1-ffs0.1
  • v2019.1.2-ffs0.1
  • v2020.1-ffs0.1
  • v2020.1.1-ffs0.1
  • v2020.1.3-ffs0.1
  • v2020.2
  • v2020.2-ffs0.1
  • v2020.2.1-ffs0.1
  • v2020.2.2-ffs0.1
  • v2020.2.3-ffs0.1
  • v2020.2.3-ffs0.2
  • v2020.2.3-ffs0.3
  • v2020.2.x-ffs0.1
  • v2021.1-ffs0.1
  • v2021.1.1-ffs0.1
  • v2021.1.1-ffs0.2
  • v2021.1.1-ffs0.3
  • v2021.1.1-ffs0.4
  • v2021.1.2-ffs0.1
  • v2021.1.2-ffs0.2
98 results
Show changes
Showing
with 135 additions and 113 deletions
/* // SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue> // SPDX-License-Identifier: GPL-2.0-or-later
*
* SPDX-License-Identifier: GPL-2.0+
* License-Filename: LICENSE
*/
#ifndef _MAC_H_ #ifndef _MAC_H_
#define _MAC_H_ #define _MAC_H_
......
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-ebtables-source-filter PKG_NAME:=gluon-ebtables-source-filter
PKG_VERSION:=1
PKG_RELEASE:=1
include ../gluon.mk include ../gluon.mk
......
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$', false)
need_string_array_match(in_domain({'extra_prefixes6'}), '^[%x:]+/%d+$', false)
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-ebtables PKG_NAME:=gluon-ebtables
PKG_VERSION:=1
PKG_RELEASE:=1
PKG_CONFIG_DEPENDS := CONFIG_GLUON_SPECIALIZE_KERNEL
include ../gluon.mk include ../gluon.mk
define Package/gluon-ebtables define Package/gluon-ebtables
TITLE:=Ebtables support TITLE:=Ebtables support
DEPENDS:=+gluon-core +ebtables-tiny \ DEPENDS:=+gluon-core +ebtables-tiny \
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_T_FILTER \ +kmod-ebtables +kmod-ebtables-ipv4 +kmod-ebtables-ipv6
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_T_NAT \
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_ARP \
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_IP \
+@GLUON_SPECIALIZE_KERNEL:KERNEL_BRIDGE_EBT_IP6 \
+!GLUON_SPECIALIZE_KERNEL:kmod-ebtables \
+!GLUON_SPECIALIZE_KERNEL:kmod-ebtables-ipv4 \
+!GLUON_SPECIALIZE_KERNEL:kmod-ebtables-ipv6
endef endef
define Package/gluon-ebtables/description define Package/gluon-ebtables/description
......
...@@ -15,11 +15,9 @@ ...@@ -15,11 +15,9 @@
# Removing a specific rule file: # Removing a specific rule file:
# $ /etc/init.d/gluon-ebtables stop /lib/gluon/ebtables/100-mcast-chain # $ /etc/init.d/gluon-ebtables stop /lib/gluon/ebtables/100-mcast-chain
START=19 START=19
STOP=91 STOP=91
exec_file() { exec_file() {
local file="$1" local file="$1"
...@@ -37,12 +35,10 @@ exec_file() { ...@@ -37,12 +35,10 @@ exec_file() {
} }
exec_all() { exec_all() {
local sort_arg="$1"
local old_ifs="$IFS" local old_ifs="$IFS"
IFS=' IFS='
' '
for file in `find /lib/gluon/ebtables -type f | sort $sort_arg`; do for file in $(find /lib/gluon/ebtables -type f | sort "$@"); do
exec_file "$file" exec_file "$file"
done done
IFS="$old_ifs" IFS="$old_ifs"
...@@ -51,7 +47,9 @@ exec_all() { ...@@ -51,7 +47,9 @@ exec_all() {
start() { start() {
( (
# shellcheck disable=SC2030,SC2031,SC2089
export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -A " .. command' export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -A " .. command'
# shellcheck disable=SC2030,SC2031,SC2089
export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -N " .. name .. " -P " .. policy' export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -N " .. name .. " -P " .. policy'
# Contains /var/lib/ebtables/lock for '--concurrent' # Contains /var/lib/ebtables/lock for '--concurrent'
...@@ -59,7 +57,7 @@ start() { ...@@ -59,7 +57,7 @@ start() {
mkdir -p /var/lib/ebtables mkdir -p /var/lib/ebtables
if [ -z "$1" ]; then if [ -z "$1" ]; then
exec_all '' exec_all
else else
exec_file "$1" exec_file "$1"
fi fi
...@@ -68,11 +66,13 @@ start() { ...@@ -68,11 +66,13 @@ start() {
stop() { stop() {
( (
# shellcheck disable=SC2030,SC2031,SC2090
export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -D " .. command' export EBTABLES_RULE='"ebtables-tiny -t " .. table .. " -D " .. command'
# shellcheck disable=SC2030,SC2031,SC2090
export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -X " .. name' export EBTABLES_CHAIN='"ebtables-tiny -t " .. table .. " -X " .. name'
if [ -z "$1" ]; then if [ -z "$1" ]; then
exec_all '-r' exec_all -r
else else
exec_file "$1" exec_file "$1"
fi fi
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-harden-dropbear
include ../gluon.mk
define Package/gluon-harden-dropbear
TITLE:=Reduces dropbears exposition
DEPENDS:=+gluon-core +gluon-lock-password
endef
define Package/gluon-harden-dropbear/description
This packages disables password access if root is locked and disables dropbear if no access is configured.
endef
$(eval $(call BuildPackageGluon,gluon-harden-dropbear))
#!/usr/bin/lua
local uci = require('simple-uci').cursor()
local util = require('gluon.util')
local function is_root_pw_unlocked()
for line in io.lines("/etc/shadow") do
if line:match("^root:!") then
return false
end
end
return true
end
local function has_authorized_keys()
local file = io.open("/etc/dropbear/authorized_keys", "r")
if not file then
return false
end
for line in file:lines() do
-- if the line is neither comments nor solely whitespaces
if not (line:match("^%s*#") or line:match("^%s*$")) then
file:close()
return true
end
end
file:close()
return false
end
local root_pw_is_unlocked = is_root_pw_unlocked()
local password_auth = 'off'
if root_pw_is_unlocked then
password_auth = 'on'
end
-- disable dropbear alltogether, if no access is configured
local enable_dropbear = has_authorized_keys() or root_pw_is_unlocked
uci:foreach('dropbear', 'dropbear', function(s)
uci:tset('dropbear', s['.name'], {
enable = enable_dropbear,
PasswordAuth = password_auth,
RootPasswordAuth = password_auth}
)
end)
uci:save('dropbear')
...@@ -2,14 +2,11 @@ include $(TOPDIR)/rules.mk ...@@ -2,14 +2,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-hoodselector PKG_NAME:=gluon-hoodselector
GLUON_VERSION:=3
PKG_VERSION:=2
include ../gluon.mk include ../gluon.mk
define Package/gluon-hoodselector define Package/gluon-hoodselector
TITLE:=Automatically migrate nodes between domains. TITLE:=Automatically migrate nodes between domains.
DEPENDS:=+luaposix +libgluonutil +lua-math-polygon +libjson-c +gluon-site +micrond +luabitop @GLUON_MULTIDOMAIN DEPENDS:=+luaposix +libgluonutil +lua-math-polygon +libjson-c +gluon-site +micrond +lua-bit32 @GLUON_MULTIDOMAIN
CONFLICTS:=+gluon-config-mode-domain-select CONFLICTS:=+gluon-config-mode-domain-select
endef endef
......
...@@ -3,14 +3,8 @@ local math_polygon = require('math-polygon') ...@@ -3,14 +3,8 @@ local math_polygon = require('math-polygon')
local json = require ('jsonc') local json = require ('jsonc')
local uci = require('simple-uci').cursor() local uci = require('simple-uci').cursor()
local site = require ('gluon.site') local site = require ('gluon.site')
local logger = require('posix.syslog')
local M = {} local M = {}
function M.log(msg)
io.stdout:write(msg..'\n')
logger.openlog(msg, logger.LOG_PID)
end
function M.get_domains() function M.get_domains()
local list = {} local list = {}
for _, domain_path in ipairs(util.glob('/lib/gluon/domains/*.json')) do for _, domain_path in ipairs(util.glob('/lib/gluon/domains/*.json')) do
...@@ -67,10 +61,8 @@ end ...@@ -67,10 +61,8 @@ end
function M.set_domain_config(domain) function M.set_domain_config(domain)
if uci:get('gluon', 'core', 'domain') ~= domain.domain_code then if uci:get('gluon', 'core', 'domain') ~= domain.domain_code then
uci:set('gluon', 'core', 'domain', domain.domain_code) os.execute(string.format("exec gluon-switch-domain --no-reboot '%s'", domain.domain_code))
uci:commit('gluon') util.log('Set domain "' .. domain.domain.domain_names[domain.domain_code] .. '"', true)
os.execute('gluon-reconfigure')
M.log('Set domain "'..domain.domain.domain_names[domain.domain_code]..'"')
return true return true
end end
return false return false
......
#!/usr/bin/lua #!/usr/bin/lua
local bit = require('bit') local bit = require('bit32')
local util = require ('gluon.util')
local unistd = require('posix.unistd') local unistd = require('posix.unistd')
local fcntl = require('posix.fcntl') local fcntl = require('posix.fcntl')
local hoodutil = require('hoodselector.util') local hoodutil = require('hoodselector.util')
...@@ -10,7 +11,7 @@ local lockfile = '/var/lock/hoodselector.lock' ...@@ -10,7 +11,7 @@ local lockfile = '/var/lock/hoodselector.lock'
local lockfd, err = fcntl.open(lockfile, bit.bor(fcntl.O_WRONLY, fcntl.O_CREAT), 384) -- mode 0600 local lockfd, err = fcntl.open(lockfile, bit.bor(fcntl.O_WRONLY, fcntl.O_CREAT), 384) -- mode 0600
if not lockfd then if not lockfd then
hoodutil.log(err, '\n') util.log(err, true)
os.exit(1) os.exit(1)
end end
...@@ -40,8 +41,7 @@ if geo.lat ~= nil and geo.lon ~= nil then ...@@ -40,8 +41,7 @@ if geo.lat ~= nil and geo.lon ~= nil then
local geo_base_domain = hoodutil.get_domain_by_geo(jdomains, geo) local geo_base_domain = hoodutil.get_domain_by_geo(jdomains, geo)
if geo_base_domain ~= nil then if geo_base_domain ~= nil then
if hoodutil.set_domain_config(geo_base_domain) then if hoodutil.set_domain_config(geo_base_domain) then
os.execute("gluon-reload") util.log('Domain set by geolocation mode.', true)
hoodutil.log('Domain set by geolocation mode.\n')
end end
return return
end end
...@@ -51,6 +51,4 @@ else ...@@ -51,6 +51,4 @@ else
end end
-- default domain mode -- default domain mode
if hoodutil.set_domain_config(hoodutil.get_default_domain(hoodutil.get_domains())) then hoodutil.set_domain_config(hoodutil.get_default_domain(hoodutil.get_domains()))
os.execute("gluon-reload")
end
...@@ -2,14 +2,11 @@ include $(TOPDIR)/rules.mk ...@@ -2,14 +2,11 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-iptables-clamp-mss-to-pmtu PKG_NAME:=gluon-iptables-clamp-mss-to-pmtu
GLUON_VERSION = $(shell git describe --always --dirty=+ 2>/dev/null || echo unknown)
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_VERSION))
include ../gluon.mk include ../gluon.mk
define Package/$(PKG_NAME) define Package/$(PKG_NAME)
TITLE:=This will establish a firewall rule to clamp the mss to pmtu on the mesh-vpn interface when the connection is towards 64:ff9b::/96 TITLE:=This will establish a firewall rule to clamp the mss to pmtu on the mesh-vpn interface when the connection is towards 64:ff9b::/96
DEPENDS:= +ip6tables DEPENDS:= +ip6tables-zz-legacy
endef endef
define Package/$(PKG_NAME)/description define Package/$(PKG_NAME)/description
......
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-l3roamd PKG_NAME:=gluon-l3roamd
PKG_VERSION:=1
include ../gluon.mk include ../gluon.mk
define Package/gluon-l3roamd define Package/gluon-l3roamd
TITLE:=Configure l3roamd for babel TITLE:=Configure l3roamd for l3-mesh
DEPENDS:=+gluon-core +l3roamd +uc DEPENDS:=+gluon-core +gluon-mesh-layer3-common +l3roamd +uc
endef endef
$(eval $(call BuildPackageGluon,gluon-l3roamd)) $(eval $(call BuildPackageGluon,gluon-l3roamd))
need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$', true)
need_string_match(in_domain({'node_client_prefix6'}), '^[%x:]+/64$', false)
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$', false)
...@@ -27,7 +27,7 @@ reload_service() { ...@@ -27,7 +27,7 @@ reload_service() {
for i in $(echotol3roamd "get_meshifs"| jsonfilter -e "@.mesh_interfaces[@]") for i in $(echotol3roamd "get_meshifs"| jsonfilter -e "@.mesh_interfaces[@]")
do do
if ! ubus call network.interface dump | jsonfilter -e "@.interface[@.proto='gluon_mesh' && @.up=true].device"|grep -q $i if ! ubus call network.interface dump | jsonfilter -e "@.interface[@.proto='gluon_mesh' && @.up=true].device" | grep -qxF "$i"
then then
echotol3roamd "del_meshif $i" echotol3roamd "del_meshif $i"
fi fi
...@@ -35,15 +35,17 @@ reload_service() { ...@@ -35,15 +35,17 @@ reload_service() {
} }
start_service () { start_service () {
local interfaces=$( local interfaces prefix4 prefix6 localip roamingprefix
interfaces=$(
for dev in $(gluon-list-mesh-interfaces); do echo " -m $dev"; done for dev in $(gluon-list-mesh-interfaces); do echo " -m $dev"; done
[ "$(ifstatus local_node | jsonfilter -e '@.up')" = 'true' ] && echo ' -i local-node' [ "$(ifstatus local_node | jsonfilter -e '@.up')" = 'true' ] && echo ' -i local-node'
) )
local prefix4="$(lua -e 'prefix4 = require("gluon.site").prefix4() if prefix4 then print(" -p " .. prefix4) end')" prefix4="$(lua -e 'prefix4 = require("gluon.site").prefix4() if prefix4 then print(" -p " .. prefix4) end')"
local prefix6="$(lua -e 'print(" -p " .. require("gluon.site").prefix6())')" prefix6="$(lua -e 'print(" -p " .. require("gluon.site").prefix6())')"
local localip="$(uci get network.loopback.ip6addr | cut -d/ -f1)" localip="$(uci get network.loopback.ip6addr | cut -d/ -f1)"
local roamingprefix="$(lua -e 'roamingprefix = require("gluon.site").node_client_prefix6() if roamingprefix then print(" -P " .. roamingprefix) end')" roamingprefix="$(lua -e 'print(" -P " .. require("gluon.l3").node_client_prefix6())')"
/sbin/sysctl -w net.ipv6.neigh.default.gc_thresh1=2 /sbin/sysctl -w net.ipv6.neigh.default.gc_thresh1=2
/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1=2 /sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1=2
...@@ -51,14 +53,17 @@ start_service () { ...@@ -51,14 +53,17 @@ start_service () {
procd_open_instance procd_open_instance
procd_set_param stdout 1 procd_set_param stdout 1
procd_set_param stderr 1 procd_set_param stderr 1
procd_set_param respawn ${respawn_threshold:-3660} ${respawn_timeout:-5} ${respawn_retry:-0} procd_set_param respawn "${respawn_threshold:-3660}" "${respawn_timeout:-5}" "${respawn_retry:-0}"
procd_set_param command "$PROG" -s /var/run/l3roamd.sock $prefix4 $prefix6 $interfaces -t 254 -a $localip -b br-client $roamingprefix # shellcheck disable=SC2086
procd_set_param command "$PROG" -s /var/run/l3roamd.sock $prefix4 $prefix6 $interfaces -t 254 -a "$localip" -b br-client "$roamingprefix"
procd_close_instance procd_close_instance
} }
service_triggers() { service_triggers() {
local script=$(readlink "$initscript") local script name
local name=$(basename "${script:-$initscript}") # shellcheck disable=SC2154
script=$(readlink "$initscript")
name=$(basename "${script:-$initscript}")
procd_open_trigger procd_open_trigger
procd_add_raw_trigger 'interface.*' 0 "/etc/init.d/$name" reload procd_add_raw_trigger 'interface.*' 0 "/etc/init.d/$name" reload
......
#!/usr/bin/lua #!/usr/bin/lua
local uci = require('simple-uci').cursor() local uci = require('simple-uci').cursor()
uci:section('firewall', 'zone', 'l3roamd', {
name = 'l3roamd',
input = 'ACCEPT',
output = 'ACCEPT',
forward = 'REJECT',
device = 'l3roam+',
log = '1',
})
uci:section('firewall', 'forwarding', 'flc', {
src = 'l3roamd',
dest = 'loc_client',
})
uci:section('firewall', 'forwarding', 'fcl', {
src = 'loc_client',
dest = 'l3roamd',
})
uci:section('firewall', 'rule', 'mesh_l3roamd', { uci:section('firewall', 'rule', 'mesh_l3roamd', {
name = 'mesh_l3roamd', name = 'mesh_l3roamd',
src = 'mesh', src = 'mesh',
......
#!/usr/bin/lua
local uci = require('simple-uci').cursor()
uci:delete('network', 'l3roam')
uci:delete('network', 'l3roamd_client')
uci:save('network')
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-lock-password PKG_NAME:=gluon-lock-password
PKG_VERSION:=1
PKG_RELEASE:=1
include ../gluon.mk include ../gluon.mk
......
include $(TOPDIR)/rules.mk include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-logging PKG_NAME:=gluon-logging
PKG_VERSION:=1
include ../gluon.mk include ../gluon.mk
......
include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-mesh-babel
PKG_VERSION:=1
PKG_BUILD_DEPENDS := libbabelhelper
PKG_BUILD_DEPENDS += libjson-c
include ../gluon.mk
define Package/gluon-mesh-babel
TITLE:=Babel mesh
DEPENDS:=+gluon-core +babeld +gluon-mmfd +libiwinfo +libgluonutil +firewall +libjson-c +libnl-tiny +libubus +libubox +libblobmsg-json +libbabelhelper +luabitop
PROVIDES:=gluon-mesh-provider
endef
define Package/gluon-mesh-babel/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon/status-page/providers
$(INSTALL_BIN) $(PKG_BUILD_DIR)/neighbours-babel $(1)/lib/gluon/status-page/providers/
endef
$(eval $(call BuildPackageGluon,gluon-mesh-babel))
need_string_match(in_domain({'node_prefix6'}), '^[%x:]+/64$')
need_string_match(in_domain({'node_client_prefix6'}), '^[%x:]+/64$')
need_string_match(in_domain({'next_node', 'ip6'}), '^[%x:]+$', false)
need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false)
need_string_match(in_domain({'next_node', 'mac'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$', false)