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
Loading items

Target

Select target project
  • firmware/gluon
  • 0x4A6F/gluon
  • patrick/gluon
3 results
Select Git revision
Loading items
Show changes
Showing
with 109 additions and 374 deletions
config KERNEL_NET_IP_TUNNEL
bool
config KERNEL_NET_UDP_TUNNEL
bool
config KERNEL_VXLAN
bool
select KERNEL_NET_IP_TUNNEL
select KERNEL_NET_UDP_TUNNEL
config KERNEL_VETH
bool
# for fastd
config KERNEL_TUN
bool
# for tunneldigger
config KERNEL_L2TP_V3
bool
config KERNEL_L2TP_IP
bool
config KERNEL_L2TP_ETH
bool
config KERNEL_L2TP
bool
select KERNEL_L2TP_V3
select KERNEL_L2TP_IP
select KERNEL_L2TP_ETH
# for simple-tc
config KERNEL_NET_SCHED
bool
config KERNEL_NET_CLS
bool
select KERNEL_NET_SCHED
config KERNEL_NET_CLS_ACT
bool
select KERNEL_NET_CLS
config KERNEL_NET_CLS_BASIC
bool
select KERNEL_NET_CLS
config KERNEL_NET_SCH_TBF
bool
select KERNEL_NET_SCHED
config KERNEL_NET_SCH_INGRESS
bool
select KERNEL_NET_CLS_ACT
# for batman-adv
config KERNEL_DUMMY
bool
config KERNEL_CRC16
bool
config KERNEL_LIBCRC32C
bool
# Netfilter modules used by ebtables and fw3
config KERNEL_NETFILTER
bool
config KERNEL_NETFILTER_ADVANCED
bool
select KERNEL_NETFILTER
config KERNEL_NETFILTER_XTABLES
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_BRIDGE_NF_EBTABLES
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_BRIDGE_EBT_T_FILTER
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_T_NAT
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_ARP
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_IP
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_IP6
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_LIMIT
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_MARK
bool
select KERNEL_BRIDGE_NF_EBTABLES
config KERNEL_BRIDGE_EBT_MARK_T
bool
select KERNEL_BRIDGE_NF_EBTABLES
# Not all of the following modules are really required for Gluon, but fw3 pulls
# them in, so we add them to the kernel config to reduce the number of loaded
# modules
# kmod-nf-conntrack
config KERNEL_NF_CONNTRACK
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_NF_CONNTRACK_RTCACHE
bool
select KERNEL_NF_CONNTRACK
config KERNEL_NF_CONNTRACK_IPV4
bool
select KERNEL_NF_CONNTRACK
# kmod-nf-conntrack6
config KERNEL_NF_CONNTRACK_IPV6
bool
select KERNEL_NF_CONNTRACK
# kmod-nf-ipt
config KERNEL_NF_REJECT_IPV4
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_IP_NF_IPTABLES
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_REJECT_IPV4
# kmod-nf-ipt6
config KERNEL_NF_REJECT_IPV6
bool
select KERNEL_NETFILTER_ADVANCED
config KERNEL_IP6_NF_IPTABLES
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_REJECT_IPV6
# kmod-nf-nat
config KERNEL_NF_NAT
bool
select KERNEL_NF_CONNTRACK
config KERNEL_NF_NAT_REDIRECT
bool
select KERNEL_NF_NAT
config KERNEL_NF_NAT_IPV4
bool
select KERNEL_NETFILTER_ADVANCED
select KERNEL_NF_NAT
config KERNEL_NF_NAT_MASQUERADE_IPV4
bool
select KERNEL_NF_NAT_IPV4
# kmod-ipt-core
config KERNEL_IP_NF_FILTER
bool
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_MANGLE
bool
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_TARGET_REJECT
bool
select KERNEL_IP_NF_FILTER
config KERNEL_NETFILTER_XT_MATCH_LIMIT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_MAC
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_MULTIPORT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_COMMENT
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_TIME
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MARK
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_TARGET_LOG
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_TARGET_TCPMSS
bool
select KERNEL_NETFILTER_XTABLES
# kmod-ip6tables
config KERNEL_IP6_NF_FILTER
bool
select KERNEL_IP6_NF_IPTABLES
config KERNEL_IP6_NF_MANGLE
bool
select KERNEL_IP6_NF_IPTABLES
config KERNEL_IP6_NF_TARGET_REJECT
bool
select KERNEL_IP6_NF_IPTABLES
# kmod-ipt-conntrack
config KERNEL_NETFILTER_XT_MATCH_STATE
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_CONNTRACK
config KERNEL_NETFILTER_XT_MATCH_CONNTRACK
bool
select KERNEL_NETFILTER_XTABLES
select KERNEL_NF_CONNTRACK
# kmod-ipt-nat
config KERNEL_IP_NF_NAT
bool
select KERNEL_NF_NAT
select KERNEL_IP_NF_IPTABLES
config KERNEL_IP_NF_TARGET_MASQUERADE
bool
select KERNEL_NF_NAT_MASQUERADE_IPV4
select KERNEL_IP_NF_NAT
config KERNEL_IP_NF_TARGET_REDIRECT
bool
select KERNEL_NF_NAT
select KERNEL_IP_NF_NAT
# kmod-ipt-extra
config KERNEL_NETFILTER_XT_MATCH_ADDRTYPE
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_OWNER
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_PKTTYPE
bool
select KERNEL_NETFILTER_XTABLES
config KERNEL_NETFILTER_XT_MATCH_QUOTA
bool
select KERNEL_NETFILTER_XTABLES
config GLUON_SPECIALIZE_KERNEL
bool "Specialize kernel for Gluon"
select KERNEL_VXLAN
select KERNEL_NF_CONNTRACK_RTCACHE
select KERNEL_NF_CONNTRACK_IPV4
select KERNEL_NF_CONNTRACK_IPV6
select KERNEL_IP_NF_IPTABLES
select KERNEL_IP6_NF_IPTABLES
select KERNEL_NF_NAT_REDIRECT
select KERNEL_NF_NAT_IPV4
select KERNEL_NF_NAT_MASQUERADE_IPV4
select KERNEL_IP_NF_FILTER
select KERNEL_IP_NF_MANGLE
select KERNEL_IP_NF_TARGET_REJECT
select KERNEL_IP6_NF_FILTER
select KERNEL_IP6_NF_MANGLE
select KERNEL_IP6_NF_TARGET_REJECT
select KERNEL_NETFILTER_XT_MATCH_LIMIT
select KERNEL_NETFILTER_XT_MATCH_MAC
select KERNEL_NETFILTER_XT_MATCH_MULTIPORT
select KERNEL_NETFILTER_XT_MATCH_COMMENT
select KERNEL_NETFILTER_XT_MATCH_TIME
select KERNEL_NETFILTER_XT_MARK
select KERNEL_NETFILTER_XT_TARGET_LOG
select KERNEL_NETFILTER_XT_TARGET_TCPMSS
select KERNEL_NETFILTER_XT_MATCH_STATE
select KERNEL_NETFILTER_XT_MATCH_CONNTRACK
select KERNEL_IP_NF_NAT
select KERNEL_IP_NF_TARGET_MASQUERADE
select KERNEL_IP_NF_TARGET_REDIRECT
......@@ -2,10 +2,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=gluon-core
GLUON_VERSION = $(shell git describe --always --dirty=+ 2>/dev/null || echo unknown)
PKG_VERSION:=$(if $(DUMP),x,$(GLUON_VERSION))
PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME)
PKG_CONFIG_DEPENDS := CONFIG_GLUON_VERSION
include ../gluon.mk
include $(INCLUDE_DIR)/cmake.mk
......@@ -14,7 +11,7 @@ define Package/gluon-core
TITLE:=Base files of Gluon
DEPENDS:= \
+gluon-site +libgluonutil +libiwinfo-lua +lua-platform-info +lua-simple-uci +lua-hash +lua-jsonc \
+luci-lib-nixio +vxlan +odhcp6c +firewall +pretty-hostname
+lua-bit32 +luaposix +vxlan +odhcp6c +firewall +pretty-hostname
endef
define Package/gluon-core/description
......@@ -22,14 +19,25 @@ define Package/gluon-core/description
endef
define Package/gluon-core/config
source "$(SOURCE)/Config.in"
config GLUON_VERSION
string "Gluon version number"
depends on PACKAGE_gluon-core
default ""
config GLUON_MINIFY
bool "Minify Gluon scripts"
default y
endef
define Package/gluon-core/conffiles
/etc/config/gluon
endef
define Package/gluon-core/install
$(Gluon/Build/Install)
$(INSTALL_DIR) $(1)/lib/gluon
echo '$(GLUON_VERSION)' > $(1)/lib/gluon/gluon-version
echo '$(call qstrip,$(CONFIG_GLUON_VERSION))' > $(1)/lib/gluon/gluon-version
endef
$(eval $(call BuildPackageGluon,gluon-core))
......@@ -3,15 +3,6 @@ need_string(in_site({'site_name'}))
-- this_domain() returns nil when multidomain support is disabled
if this_domain() then
function need_domain_name(path)
need_string(path)
need(path, function(default_domain)
local f = io.open(os.getenv('IPKG_INSTROOT') .. '/lib/gluon/domains/' .. default_domain .. '.json')
if not f then return false end
f:close()
return true
end, nil, 'be a valid domain name')
end
need_domain_name(in_site({'default_domain'}))
need_table(in_domain({'domain_names'}), function(domain)
......@@ -23,7 +14,8 @@ end
need_string_match(in_domain({'domain_seed'}), '^' .. ('%x'):rep(64) .. '$')
need_string({'opkg', 'lede'}, false)
need_string({'opkg', 'openwrt'}, false)
obsolete({'opkg', 'lede'}, 'Use opkg.openwrt instead.')
need_table({'opkg', 'extra'}, function(extra_repo)
need_alphanumeric_key(extra_repo)
need_string(extra_repo)
......@@ -34,30 +26,37 @@ need_string(in_site({'timezone'}))
need_string_array({'ntp_servers'}, false)
need_string_match(in_domain({'prefix4'}), '^%d+.%d+.%d+.%d+/%d+$', false)
need_string_match(in_domain({'prefix6'}), '^[%x:]+/64$')
need_string_array_match(in_domain({'extra_prefixes6'}), '^[%x:]+/%d+$', false)
local supported_rates = {6000, 9000, 12000, 18000, 24000, 36000, 48000, 54000}
for _, config in ipairs({'wifi24', 'wifi5'}) do
if need_table({config}, nil, false) then
need_string(in_site({'regdom'})) -- regdom is only required when wifi24 or wifi5 is configured
need_number({config, 'channel'})
local rates = {1000, 2000, 5500, 6000, 9000, 11000, 12000, 18000, 24000, 36000, 48000, 54000}
local supported_rates = need_array_of(in_site({config, 'supported_rates'}), rates, false)
need_array_of({config, 'basic_rate'}, supported_rates or rates, supported_rates ~= nil)
if need_table({config, 'ibss'}, nil, false) then
need_string_match(in_domain({config, 'ibss', 'ssid'}), '^' .. ('.?'):rep(32) .. '$')
need_string_match(in_domain({config, 'ibss', 'bssid'}), '^%x[02468aAcCeE]:%x%x:%x%x:%x%x:%x%x:%x%x$')
need_one_of({config, 'ibss', 'mcast_rate'}, supported_rates or rates, false)
need_number({config, 'ibss', 'vlan'}, false)
need_boolean({config, 'ibss', 'disabled'}, false)
need_number({config, 'beacon_interval'}, false)
if config == "wifi24" then
local channels = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14}
need_one_of({config, 'channel'}, channels)
elseif config == 'wifi5' then
local channels = {
34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62,
64, 96, 100, 102, 104, 106, 108, 110, 112, 114, 116, 118,
120, 122, 124, 126, 128, 132, 134, 136, 138, 140, 142, 144,
149, 151, 153, 155, 157, 159, 161, 165, 169, 173 }
need_one_of({config, 'channel'}, channels)
need_chanlist({config, 'outdoor_chanlist'}, channels, false)
need_one_of({config, 'outdoors'}, {true, false, 'preset'}, false)
end
obsolete({config, 'supported_rates'}, '802.11b rates are disabled by default.')
obsolete({config, 'basic_rate'}, '802.11b rates are disabled by default.')
obsolete({config, 'ibss'}, 'IBSS support has been dropped.')
if need_table({config, 'mesh'}, nil, false) then
need_string_match(in_domain({config, 'mesh', 'id'}), '^' .. ('.?'):rep(32) .. '$')
need_one_of({config, 'mesh', 'mcast_rate'}, supported_rates or rates, false)
need_one_of({config, 'mesh', 'mcast_rate'}, supported_rates, false)
need_boolean({config, 'mesh', 'disabled'}, false)
end
end
......@@ -67,6 +66,7 @@ need_boolean(in_site({'poe_passthrough'}), false)
if need_table({'dns'}, nil, false) then
need_string_array_match({'dns', 'servers'}, '^[%x:]+$')
need_number({'dns', 'cacheentries'}, false)
end
need_string_array(in_domain({'next_node', 'name'}), false)
......@@ -75,6 +75,15 @@ need_string_match(in_domain({'next_node', 'ip4'}), '^%d+.%d+.%d+.%d+$', false)
need_boolean(in_domain({'mesh', 'vxlan'}), false)
need_boolean(in_site({'mesh_on_wan'}), false)
need_boolean(in_site({'mesh_on_lan'}), false)
need_boolean(in_site({'single_as_lan'}), false)
local interfaces_roles = {'client', 'uplink', 'mesh'}
for _, config in ipairs({'wan', 'lan', 'single'}) do
local default_roles = in_site({'interfaces', config, 'default_roles'})
need_array_of(default_roles, interfaces_roles, false)
need_array_elements_exclusive(default_roles, 'client', 'mesh', false)
need_array_elements_exclusive(default_roles, 'client', 'uplink', false)
end
obsolete({'mesh_on_wan'}, 'Use interfaces.wan.default_roles.')
obsolete({'mesh_on_lan'}, 'Use interfaces.lan.default_roles.')
obsolete({'single_as_lan'}, 'Use interfaces.single.default_roles.')
config wireless
#!/bin/sh
[ -e "/lib/firmware/$FIRMWARE" ] && exit 0
case "$FIRMWARE" in
ath10k/fwcfg*)
cp "/lib/gluon/ath10k-fwcfg.txt" "/lib/firmware/$FIRMWARE"
;;
esac
#!/bin/sh /etc/rc.common
# Start right after S10boot
START=10
start() {
config_load gluon
config_get_bool reconfigure core reconfigure 0
# shellcheck disable=SC2154
if [ "$reconfigure" = 1 ]; then
gluon-reconfigure
fi
}
vm.panic_on_oom=1
net.ipv4.tcp_ecn=1
#!/bin/sh
# Work around an issue with wifi setup timing by waiting a bit
# while device initialisation is ongoing.
# https://github.com/freifunk-gluon/gluon/issues/2779
sleep 3
gluon-reconfigure
exit 0
vdevs = 4
peers = 96
active_peers = 96
stations = 96
#!/bin/sh
# shellcheck disable=SC1091
. /lib/functions/system.sh
get_mac_label
#!/bin/sh
/etc/init.d/sysntpd stop
#!/bin/sh
/etc/init.d/network stop
#!/bin/sh
/etc/init.d/dnsmasq stop
#!/bin/sh
/etc/init.d/firewall stop
#!/bin/sh
/etc/init.d/gluon-core-reconfigure start
#!/bin/sh
/etc/init.d/dnsmasq start
#!/bin/sh
/etc/init.d/firewall start
#!/bin/sh
/etc/init.d/network start
#!/bin/sh
/etc/init.d/sysntpd start