Compare commits
131 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
1c76fcb58b | ||
|
3191012fe6 | ||
|
13befda80b | ||
|
d51a5bad2b | ||
|
8fba9d6179 | ||
|
b9a621f68c | ||
|
582b7f2944 | ||
|
205e66c743 | ||
|
3807f12250 | ||
|
4429905f5c | ||
|
22e27a5220 | ||
|
7821668445 | ||
|
74a41ea15f | ||
|
b3bb43c97c | ||
|
92e72fb7af | ||
|
52dfe84d4a | ||
|
7d2280de5a | ||
|
4d629013bf | ||
|
3174a9290a | ||
|
47aacffbef | ||
|
e01e66e716 | ||
|
258df6c848 | ||
|
d13bdc2c76 | ||
|
e427f0912c | ||
|
fcfed5b0b6 | ||
|
f1fa494883 | ||
|
52cfe1c0df | ||
|
fd15b63789 | ||
|
4d955690f5 | ||
|
e9a9d0150d | ||
|
bfae2e24c3 | ||
|
6bb60165a2 | ||
|
e9dcefee59 | ||
|
0b516a7e61 | ||
|
0b12f9cb80 | ||
|
daa00748ea | ||
|
3335e10363 | ||
|
7f3824ffac | ||
|
e3068698f3 | ||
|
1005cdd1fd | ||
|
d6f46a4ea5 | ||
|
be2fd8e16e | ||
|
039c5c38f4 | ||
|
bd343c7388 | ||
|
4cb1d45e19 | ||
|
223d25ba4a | ||
|
48e2b236de | ||
|
5361bcbabd | ||
|
8705a4cff9 | ||
|
ecbd7a3b6d | ||
|
63e52a2112 | ||
|
46b256d0af | ||
|
1ef72ba26f | ||
|
8673e67370 | ||
|
34f41c8ce3 | ||
|
8ca311cf0a | ||
|
21b3b46a41 | ||
|
508dec4d89 | ||
|
94731839c8 | ||
|
8b2cc206d3 | ||
|
6a1f66c51f | ||
|
fd4afb613a | ||
|
1b274e64ac | ||
|
033a3b971a | ||
|
53c0710a5e | ||
|
32a00f808d | ||
|
43954dd165 | ||
|
f0a617786c | ||
|
190d7f8701 | ||
|
4f8f6e7585 | ||
|
e6137d424d | ||
|
b5d90719cb | ||
|
1cafcde91c | ||
|
06df8b7aa1 | ||
|
73ddf5b453 | ||
|
2751daa655 | ||
|
1b4bffbde7 | ||
|
f000a605cd | ||
|
e491ba3ca4 | ||
|
ad145f356a | ||
|
358aef234a | ||
|
4a578512e6 | ||
|
33ad749fae | ||
|
a3e3cc7d71 | ||
|
e2d5df3d36 | ||
|
13053bf6bc | ||
|
d8724b0a6d | ||
|
ff8737bb16 | ||
|
5961575c33 | ||
|
9b840d1d87 | ||
|
c82fc9616b | ||
|
b85a9c54d5 | ||
|
8c1f5e9c9c | ||
|
7e6a0995d2 | ||
|
940874972b | ||
|
4b4765fbe7 | ||
|
ccd7fa3d7b | ||
|
d0565bc3b5 | ||
|
b24c73509d | ||
|
7614ac047d | ||
|
8b35fab23e | ||
|
51d5293ee6 | ||
|
6244c59524 | ||
|
a4243e0376 | ||
|
ab1fb054f6 | ||
|
30e97e8d6d | ||
|
59c5eb6866 | ||
|
7ca56084bc | ||
|
5d088754f0 | ||
|
1b547f9181 | ||
|
f03ada1816 | ||
|
5942f2925c | ||
|
81a643476b | ||
|
10a126e117 | ||
|
f69be80ac3 | ||
|
183f345979 | ||
|
7838e68c20 | ||
|
34383285b1 | ||
|
17a6e1d8d7 | ||
|
9667075b54 | ||
|
da41247139 | ||
|
73df762ec1 | ||
|
a6d75c010e | ||
|
ecd9f8cfe8 | ||
|
411f6c3859 | ||
|
8a2fdc502a | ||
|
81cf8164d5 | ||
|
43b1fc99dd | ||
|
013d049acf | ||
|
899e187f34 | ||
|
a6022475ff |
@ -7,43 +7,18 @@ insert_final_newline = true
|
||||
indent_style = tab
|
||||
charset = utf-8
|
||||
|
||||
[Dockerfile]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[/patches/**]
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
[*.c]
|
||||
|
||||
[*.css]
|
||||
|
||||
[*.dia]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.h]
|
||||
|
||||
[*.html]
|
||||
|
||||
[*.js]
|
||||
|
||||
[*{.json,.ecrc}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.lua]
|
||||
|
||||
[{Makefile,*.mk}]
|
||||
indent_style = unset
|
||||
|
||||
[*.md]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
|
||||
[*.pl]
|
||||
|
||||
[*.py]
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
@ -52,8 +27,6 @@ indent_size = 4
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.sh]
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
@ -61,7 +34,3 @@ indent_size = 2
|
||||
[CMakeLists.txt]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[{docs,contrib/ci}/*site*/**/*.conf]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
2
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -6,7 +6,7 @@ label: bug
|
||||
|
||||
<!--
|
||||
|
||||
Please carefully fill out the questionnaire below to help improve the
|
||||
Please carefully fill out the questionaire below to help improve the
|
||||
timely triaging of issues. Walk through the questions below and use
|
||||
them as an inspiration for what information you can provide.
|
||||
|
||||
|
2
.github/dependabot.yml
vendored
2
.github/dependabot.yml
vendored
@ -1,4 +1,4 @@
|
||||
# Docs: <https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/customizing-dependency-updates>
|
||||
# Docs: <https://docs.github.com/en/free-pro-team@latest/github/administering-a-repository/customizing-dependency-updates>
|
||||
|
||||
version: 2
|
||||
|
||||
|
9
.github/workflows/backport.yml
vendored
9
.github/workflows/backport.yml
vendored
@ -2,9 +2,6 @@ name: Backport
|
||||
on:
|
||||
pull_request_target:
|
||||
types: [closed, labeled]
|
||||
permissions:
|
||||
contents: write # so it can comment
|
||||
pull-requests: write # so it can create pull requests
|
||||
jobs:
|
||||
backport:
|
||||
name: Backport Pull Request
|
||||
@ -13,8 +10,10 @@ jobs:
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Create backport PRs
|
||||
uses: korthout/backport-action@v1.2.0
|
||||
uses: zeebe-io/backport-action@v0.0.8
|
||||
with:
|
||||
# Config README: https://github.com/korthout/backport-action#backport-action
|
||||
# Config README: https://github.com/zeebe-io/backport-action#backport-action
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
github_workspace: ${{ github.workspace }}
|
||||
pull_description: |-
|
||||
Automatic backport to `${target_branch}`, triggered by a label in #${pull_number}.
|
||||
|
3
.github/workflows/build-docs.yml
vendored
3
.github/workflows/build-docs.yml
vendored
@ -9,9 +9,6 @@ on:
|
||||
paths:
|
||||
- 'docs**/'
|
||||
- '.github/workflows/build-docs.yml'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build-documentation:
|
||||
name: docs
|
||||
|
8
.github/workflows/build-gluon.yml
vendored
8
.github/workflows/build-gluon.yml
vendored
@ -8,14 +8,8 @@ on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changed:
|
||||
permissions:
|
||||
contents: read # for dorny/paths-filter to fetch a list of changed files
|
||||
pull-requests: read # for dorny/paths-filter to read pull requests
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
targets: ${{ steps.filter.outputs.changes }}
|
||||
@ -34,7 +28,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Read back changed targets to create build matrix
|
||||
# Read back changd targets to create build matrix
|
||||
target: ${{ fromJSON(needs.changed.outputs.targets) }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
3
.github/workflows/check-patches.yml
vendored
3
.github/workflows/check-patches.yml
vendored
@ -12,9 +12,6 @@ on:
|
||||
- 'modules'
|
||||
- 'patches/**'
|
||||
- '.github/workflows/check-patches.yml'
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
check-patches:
|
||||
name: Check patches
|
||||
|
6
.github/workflows/labels.yml
vendored
6
.github/workflows/labels.yml
vendored
@ -4,14 +4,8 @@ on:
|
||||
# only execute base branch actions
|
||||
pull_request_target:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
labels:
|
||||
permissions:
|
||||
contents: read # for actions/labeler to determine modified files
|
||||
pull-requests: write # for actions/labeler to add labels to PRs
|
||||
runs-on: ubuntu-latest
|
||||
if: github.repository_owner == 'freifunk-gluon'
|
||||
steps:
|
||||
|
25
.github/workflows/lint.yml
vendored
25
.github/workflows/lint.yml
vendored
@ -3,9 +3,6 @@ on:
|
||||
push:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
lua:
|
||||
name: Lua
|
||||
@ -30,25 +27,3 @@ jobs:
|
||||
run: ln -s ./docs/site-example ./site
|
||||
- name: Lint shell code
|
||||
run: make lint-sh
|
||||
|
||||
editorconfig:
|
||||
name: Editorconfig
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Dependencies
|
||||
run: sudo apt install curl tar
|
||||
- name: Install editorconfig-checker
|
||||
env:
|
||||
VERSION: 2.7.0
|
||||
OS: linux
|
||||
ARCH: amd64
|
||||
run: |
|
||||
curl -O -L -C - https://github.com/editorconfig-checker/editorconfig-checker/releases/download/$VERSION/ec-$OS-$ARCH.tar.gz
|
||||
tar xzf ec-$OS-$ARCH.tar.gz
|
||||
sudo mv ./bin/ec-$OS-$ARCH /usr/bin/editorconfig-checker
|
||||
sudo chmod +x /usr/bin/editorconfig-checker
|
||||
- name: Install example site
|
||||
run: ln -s ./docs/site-example ./site
|
||||
- name: Lint editorconfig
|
||||
run: make lint-editorconfig
|
||||
|
@ -29,7 +29,6 @@ files["package/**/check_site.lua"] = {
|
||||
"need",
|
||||
"need_alphanumeric_key",
|
||||
"need_array",
|
||||
"need_array_elements_exclusive",
|
||||
"need_array_of",
|
||||
"need_boolean",
|
||||
"need_chanlist",
|
||||
@ -51,7 +50,6 @@ files["package/**/check_site.lua"] = {
|
||||
|
||||
files["package/**/luasrc/lib/gluon/config-mode/*"] = {
|
||||
globals = {
|
||||
"MultiListValue",
|
||||
"DynamicList",
|
||||
"Flag",
|
||||
"Form",
|
||||
@ -65,7 +63,6 @@ files["package/**/luasrc/lib/gluon/config-mode/*"] = {
|
||||
"translate",
|
||||
"translatef",
|
||||
"Value",
|
||||
"Element",
|
||||
},
|
||||
}
|
||||
|
||||
|
@ -1,30 +0,0 @@
|
||||
workspace:
|
||||
base: /build
|
||||
|
||||
#clone:
|
||||
# git:
|
||||
# image: woodpeckerci/plugin-git
|
||||
# settings:
|
||||
# recursive: true
|
||||
|
||||
pipeline:
|
||||
build-${TARGET}:
|
||||
image: "ubuntu:latest"
|
||||
pull: true
|
||||
environment:
|
||||
- input_version=v2022.1.4
|
||||
- GLUON_SITEDIR=../site
|
||||
- FORCE_UNSAFE_CONFIGURE=1
|
||||
- GLUON_TARGET=${TARGET}
|
||||
- GLUON_DEPRECATED=1
|
||||
commands:
|
||||
- echo ${TARGET}
|
||||
# - git config --global init.defaultBranch main
|
||||
# - sed -i 's/install/install file/' contrib/actions/install-dependencies.sh
|
||||
# - sh contrib/actions/install-dependencies.sh
|
||||
# - sh contrib/actions/run-build.sh ${TARGET}
|
||||
|
||||
matrix:
|
||||
TARGET:
|
||||
- ath79-generic
|
||||
- x86-64
|
@ -23,8 +23,8 @@ using other parts or why the proposed change breaks other parts of the system.
|
||||
They might even refuse the idea altogether - after all, they have to sleep well
|
||||
after merging the changes, too.
|
||||
|
||||
The preferred way to discuss is in the IRC channel ([#gluon] on irc.hackint.org)
|
||||
or on the [mailing list], however, you can also open a new issue on GitHub to
|
||||
The preferred way to discuss in the IRC channel ([#gluon] on irc.hackint.org)
|
||||
or on the [mailing list], however, you can also open a new issue on Github to
|
||||
discuss there. We maintain a [list of rejected features] and we'd like to
|
||||
kindly ask you to review it first. In general, looking for duplicates may save
|
||||
you some time.
|
||||
|
2
LICENSE
2
LICENSE
@ -1,7 +1,7 @@
|
||||
The code of Project Gluon may be distributed under the following terms, unless
|
||||
noted otherwise in individual files or subtrees.
|
||||
|
||||
Copyright (c) Project Gluon
|
||||
Copyright (c) 2013-2022, Project Gluon
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
|
5
Makefile
5
Makefile
@ -151,10 +151,7 @@ list-targets: FORCE
|
||||
echo "$$target"
|
||||
done
|
||||
|
||||
lint: lint-editorconfig lint-lua lint-sh
|
||||
|
||||
lint-editorconfig: FORCE
|
||||
@scripts/lint-editorconfig.sh
|
||||
lint: lint-lua lint-sh
|
||||
|
||||
lint-lua: FORCE
|
||||
@scripts/lint-lua.sh
|
||||
|
@ -1,5 +1,5 @@
|
||||
[![Build Gluon](https://github.com/freifunk-gluon/gluon/actions/workflows/build-gluon.yml/badge.svg?branch=master)](https://github.com/freifunk-gluon/gluon/actions/workflows/build-gluon.yml)
|
||||
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/license/bsd-2-clause/)
|
||||
[![License](https://img.shields.io/badge/License-BSD%202--Clause-orange.svg)](https://opensource.org/licenses/BSD-2-Clause)
|
||||
[![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/freifunk-gluon/gluon?sort=semver)](https://github.com/freifunk-gluon/gluon/releases/latest)
|
||||
|
||||
# Gluon
|
||||
@ -30,7 +30,7 @@ the future development of Gluon.
|
||||
|
||||
Please refrain from using the `master` branch for anything else but development purposes!
|
||||
Use the most recent release instead. You can list all releases by running `git tag`
|
||||
and switch to one by running `git checkout v2022.1 && make update`.
|
||||
and switch to one by running `git checkout v2022.1.4 && make update`.
|
||||
|
||||
If you're using the autoupdater, do not autoupdate nodes with anything but releases.
|
||||
If you upgrade using random master commits the nodes *might break* eventually.
|
||||
|
@ -3,6 +3,6 @@
|
||||
set -e
|
||||
|
||||
apt-get -y update
|
||||
apt-get -y install git build-essential python3 gawk unzip libncurses5-dev zlib1g-dev libssl-dev libelf-dev wget rsync time qemu-utils
|
||||
apt-get -y install git subversion build-essential python3 gawk unzip libncurses5-dev zlib1g-dev libssl-dev wget time qemu-utils
|
||||
apt-get -y clean
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- This is an example site configuration for Gluon v2022.1
|
||||
-- This is an example site configuration for Gluon v2022.1.4
|
||||
--
|
||||
-- Take a look at the documentation located at
|
||||
-- https://gluon.readthedocs.io/ for details.
|
||||
@ -10,7 +10,7 @@
|
||||
-- hostname_prefix = 'freifunk-',
|
||||
|
||||
-- Name of the community.
|
||||
site_name = 'Continuous Integration',
|
||||
site_name = 'Continious Integration',
|
||||
|
||||
-- Shorthand of the community.
|
||||
site_code = 'ci',
|
||||
@ -42,14 +42,10 @@
|
||||
-- Wireless channel.
|
||||
channel = 1,
|
||||
|
||||
-- ESSIDs used for client network.
|
||||
-- ESSID used for client network.
|
||||
ap = {
|
||||
ssid = 'gluon-ci-ssid',
|
||||
-- disabled = true, -- (optional)
|
||||
|
||||
-- Configuration for a backward compatible OWE network below.
|
||||
owe_ssid = 'owe.gluon-ci-ssid', -- (optional - SSID for OWE client network)
|
||||
owe_transition_mode = true, -- (optional - enables transition-mode - requires ssid as well as owe_ssid)
|
||||
},
|
||||
|
||||
mesh = {
|
||||
@ -68,6 +64,8 @@
|
||||
outdoor_chanlist = '100-140',
|
||||
ap = {
|
||||
ssid = 'gluon-ci-ssid',
|
||||
owe_ssid = "owe.gluon-ci-ssid",
|
||||
owe_transition_mode = false,
|
||||
},
|
||||
mesh = {
|
||||
-- Adjust these values!
|
||||
@ -76,12 +74,6 @@
|
||||
},
|
||||
},
|
||||
|
||||
mesh = {
|
||||
vxlan = true,
|
||||
batman_adv = {
|
||||
routing_algo = 'BATMAN_IV',
|
||||
},
|
||||
},
|
||||
|
||||
-- The next node feature allows clients to always reach the node it is
|
||||
-- connected to using a known IP address.
|
||||
@ -92,16 +84,12 @@
|
||||
ip6 = 'fd::1',
|
||||
},
|
||||
|
||||
-- Options specific to routing protocols (optional)
|
||||
-- mesh = {
|
||||
-- Options specific to the batman-adv routing protocol (optional)
|
||||
-- batman_adv = {
|
||||
-- Gateway selection class (optional)
|
||||
-- The default class 20 is based on the link quality (TQ) only,
|
||||
-- class 1 is calculated from both the TQ and the announced bandwidth
|
||||
-- gw_sel_class = 1,
|
||||
-- },
|
||||
-- },
|
||||
mesh = {
|
||||
vxlan = true,
|
||||
batman_adv = {
|
||||
routing_algo = 'BATMAN_IV'
|
||||
}
|
||||
},
|
||||
|
||||
mesh_vpn = {
|
||||
-- enabled = true,
|
||||
@ -125,18 +113,7 @@
|
||||
peers = {
|
||||
},
|
||||
|
||||
-- Optional: nested peer groups
|
||||
-- groups = {
|
||||
-- backbone_sub = {
|
||||
-- ...
|
||||
-- },
|
||||
-- ...
|
||||
-- },
|
||||
},
|
||||
-- Optional: additional peer groups, possibly with other limits
|
||||
-- backbone2 = {
|
||||
-- ...
|
||||
-- },
|
||||
},
|
||||
},
|
||||
|
||||
@ -153,8 +130,7 @@
|
||||
},
|
||||
|
||||
autoupdater = {
|
||||
-- Default branch (optional), can be overridden by setting GLUON_AUTOUPDATER_BRANCH when building.
|
||||
-- Set GLUON_AUTOUPDATER_ENABLED to enable the autoupdater by default for newly installed nodes.
|
||||
-- Default branch. Don't forget to set GLUON_BRANCH when building!
|
||||
branch = 'stable',
|
||||
|
||||
-- List of branches. You may define multiple branches.
|
||||
|
@ -1 +0,0 @@
|
||||
../minimal-site/i18n
|
@ -1 +0,0 @@
|
||||
../minimal-site/modules
|
@ -1,176 +0,0 @@
|
||||
-- This is an example site configuration for Gluon v2022.1
|
||||
--
|
||||
-- Take a look at the documentation located at
|
||||
-- https://gluon.readthedocs.io/ for details.
|
||||
--
|
||||
-- This configuration will not work as is. You're required to make
|
||||
-- community specific changes to it!
|
||||
{
|
||||
-- Used for generated hostnames, e.g. freifunk-abcdef123456. (optional)
|
||||
-- hostname_prefix = 'freifunk-',
|
||||
|
||||
-- Name of the community.
|
||||
site_name = 'Continuous Integration',
|
||||
|
||||
-- Shorthand of the community.
|
||||
site_code = 'ci',
|
||||
|
||||
-- 32 bytes of random data, encoded in hexadecimal
|
||||
-- This data must be unique among all sites and domains!
|
||||
-- Can be generated using: echo $(hexdump -v -n 32 -e '1/1 "%02x"' </dev/urandom)
|
||||
domain_seed = 'e9608c4ff338b920992d629190e9ff11049de1dfc3f299eac07792dfbcda341c',
|
||||
|
||||
-- Prefixes used by clients within the mesh.
|
||||
-- prefix6 is required, prefix4 can be omitted if next_node.ip4
|
||||
-- is not set.
|
||||
prefix6 = 'fdff:cafe:cafe:cafe::/64',
|
||||
|
||||
-- Prefixes used by nodes within the mesh
|
||||
node_prefix6 = 'fdff:cafe:cafe:cafe::/64',
|
||||
|
||||
-- Timezone of your community.
|
||||
-- See https://openwrt.org/docs/guide-user/base-system/system_configuration#time_zones
|
||||
timezone = 'CET-1CEST,M3.5.0,M10.5.0/3',
|
||||
|
||||
-- List of NTP servers in your community.
|
||||
-- Must be reachable using IPv6!
|
||||
-- ntp_servers = {'1.ntp.services.ffxx'},
|
||||
|
||||
-- Wireless regulatory domain of your community.
|
||||
regdom = 'DE',
|
||||
|
||||
-- Wireless configuration for 2.4 GHz interfaces.
|
||||
wifi24 = {
|
||||
-- Wireless channel.
|
||||
channel = 1,
|
||||
|
||||
-- ESSIDs used for client network.
|
||||
ap = {
|
||||
ssid = 'gluon-ci-ssid',
|
||||
-- disabled = true, -- (optional)
|
||||
|
||||
-- Configuration for a backward compatible OWE network below.
|
||||
owe_ssid = 'owe.gluon-ci-ssid', -- (optional - SSID for OWE client network)
|
||||
owe_transition_mode = true, -- (optional - enables transition-mode - requires ssid as well as owe_ssid)
|
||||
},
|
||||
|
||||
mesh = {
|
||||
-- Adjust these values!
|
||||
id = 'ueH3uXjdp', -- usually you don't want users to connect to this mesh-SSID, so use a cryptic id that no one will accidentally mistake for the client WiFi
|
||||
mcast_rate = 12000,
|
||||
-- disabled = true, -- (optional)
|
||||
},
|
||||
},
|
||||
|
||||
-- Wireless configuration for 5 GHz interfaces.
|
||||
-- This should be equal to the 2.4 GHz variant, except
|
||||
-- for channel.
|
||||
wifi5 = {
|
||||
channel = 44,
|
||||
outdoor_chanlist = '100-140',
|
||||
ap = {
|
||||
ssid = 'gluon-ci-ssid',
|
||||
-- disabled = true, -- (optional)
|
||||
|
||||
-- Configuration for a backward compatible OWE network below.
|
||||
owe_ssid = 'owe.gluon-ci-ssid', -- (optional - SSID for OWE client network)
|
||||
owe_transition_mode = true, -- (optional - enables transition-mode - requires ssid as well as owe_ssid)
|
||||
},
|
||||
mesh = {
|
||||
-- Adjust these values!
|
||||
id = 'ueH3uXjdp',
|
||||
mcast_rate = 12000,
|
||||
},
|
||||
},
|
||||
|
||||
|
||||
-- The next node feature allows clients to always reach the node it is
|
||||
-- connected to using a known IP address.
|
||||
next_node = {
|
||||
-- anycast IPs of all nodes
|
||||
name = { 'nextnode.location.community.example.org', 'nextnode', 'nn' },
|
||||
ip4 = '10.0.0.1',
|
||||
ip6 = 'fd::1',
|
||||
},
|
||||
|
||||
-- Options specific to routing protocols (optional)
|
||||
mesh = {
|
||||
vxlan = true,
|
||||
olsrd = {},
|
||||
},
|
||||
|
||||
mesh_vpn = {
|
||||
-- enabled = true,
|
||||
|
||||
fastd = {
|
||||
-- Refer to https://fastd.readthedocs.io/en/latest/ to better understand
|
||||
-- what these options do.
|
||||
|
||||
-- List of crypto-methods to use.
|
||||
methods = {'salsa2012+umac'},
|
||||
mtu = 1312,
|
||||
-- configurable = true,
|
||||
-- syslog_level = 'warn',
|
||||
|
||||
groups = {
|
||||
backbone = {
|
||||
-- Limit number of connected peers to reduce bandwidth.
|
||||
limit = 1,
|
||||
|
||||
-- List of peers.
|
||||
peers = {
|
||||
},
|
||||
|
||||
-- Optional: nested peer groups
|
||||
-- groups = {
|
||||
-- backbone_sub = {
|
||||
-- ...
|
||||
-- },
|
||||
-- ...
|
||||
-- },
|
||||
},
|
||||
-- Optional: additional peer groups, possibly with other limits
|
||||
-- backbone2 = {
|
||||
-- ...
|
||||
-- },
|
||||
},
|
||||
},
|
||||
|
||||
bandwidth_limit = {
|
||||
-- The bandwidth limit can be enabled by default here.
|
||||
enabled = false,
|
||||
|
||||
-- Default upload limit (kbit/s).
|
||||
egress = 200,
|
||||
|
||||
-- Default download limit (kbit/s).
|
||||
ingress = 3000,
|
||||
},
|
||||
},
|
||||
|
||||
autoupdater = {
|
||||
-- Default branch (optional), can be overridden by setting GLUON_AUTOUPDATER_BRANCH when building.
|
||||
-- Set GLUON_AUTOUPDATER_ENABLED to enable the autoupdater by default for newly installed nodes.
|
||||
branch = 'stable',
|
||||
|
||||
-- List of branches. You may define multiple branches.
|
||||
branches = {
|
||||
stable = {
|
||||
name = 'stable',
|
||||
|
||||
-- List of mirrors to fetch images from. IPv6 required!
|
||||
mirrors = {'http://1.updates.services.ffhl/stable/sysupgrade'},
|
||||
|
||||
-- Number of good signatures required.
|
||||
-- Have multiple maintainers sign your build and only
|
||||
-- accept it when a sufficient number of them have
|
||||
-- signed it.
|
||||
good_signatures = 0,
|
||||
|
||||
-- List of public keys of maintainers.
|
||||
pubkeys = {
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
@ -1,57 +0,0 @@
|
||||
## gluon site.mk makefile example
|
||||
|
||||
## GLUON_FEATURES
|
||||
# Specify Gluon features/packages to enable;
|
||||
# Gluon will automatically enable a set of packages
|
||||
# depending on the combination of features listed
|
||||
|
||||
GLUON_FEATURES := \
|
||||
autoupdater \
|
||||
ebtables-filter-multicast \
|
||||
ebtables-filter-ra-dhcp \
|
||||
ebtables-limit-arp \
|
||||
mesh-olsrd \
|
||||
mesh-vpn-fastd \
|
||||
respondd \
|
||||
status-page \
|
||||
web-advanced \
|
||||
web-wizard
|
||||
|
||||
GLUON_FEATURES_standard := \
|
||||
wireless-encryption-wpa3
|
||||
|
||||
## GLUON_SITE_PACKAGES
|
||||
# Specify additional Gluon/OpenWrt packages to include here;
|
||||
# A minus sign may be prepended to remove a packages from the
|
||||
# selection that would be enabled by default or due to the
|
||||
# chosen feature flags
|
||||
|
||||
GLUON_SITE_PACKAGES := iwinfo
|
||||
|
||||
## DEFAULT_GLUON_RELEASE
|
||||
# version string to use for images
|
||||
# gluon relies on
|
||||
# opkg compare-versions "$1" '>>' "$2"
|
||||
# to decide if a version is newer or not.
|
||||
|
||||
DEFAULT_GLUON_RELEASE := 0.6+exp$(shell date '+%Y%m%d')
|
||||
|
||||
# Variables set with ?= can be overwritten from the command line
|
||||
|
||||
## GLUON_RELEASE
|
||||
# call make with custom GLUON_RELEASE flag, to use your own release version scheme.
|
||||
# e.g.:
|
||||
# $ make images GLUON_RELEASE=23.42+5
|
||||
# would generate images named like this:
|
||||
# gluon-ff%site_code%-23.42+5-%router_model%.bin
|
||||
|
||||
GLUON_RELEASE ?= $(DEFAULT_GLUON_RELEASE)
|
||||
|
||||
# Default priority for updates.
|
||||
GLUON_PRIORITY ?= 0
|
||||
|
||||
# Region code required for some images; supported values: us eu
|
||||
GLUON_REGION ?= eu
|
||||
|
||||
# Languages to include
|
||||
GLUON_LANGS ?= en de
|
@ -5,6 +5,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ca-certificates \
|
||||
file \
|
||||
git \
|
||||
subversion \
|
||||
python3 \
|
||||
build-essential \
|
||||
gawk \
|
||||
@ -20,15 +21,8 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
ecdsautils \
|
||||
lua-check \
|
||||
shellcheck \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN mkdir /tmp/ec &&\
|
||||
wget -O /tmp/ec/ec-linux-amd64.tar.gz https://github.com/editorconfig-checker/editorconfig-checker/releases/download/2.7.0/ec-linux-amd64.tar.gz &&\
|
||||
tar -xvzf /tmp/ec/ec-linux-amd64.tar.gz &&\
|
||||
mv bin/ec-linux-amd64 /usr/local/bin/editorconfig-checker &&\
|
||||
rm -rf /tmp/ec
|
||||
|
||||
RUN useradd -d /gluon gluon
|
||||
USER gluon
|
||||
|
||||
|
@ -4,7 +4,7 @@ use strict;
|
||||
use warnings;
|
||||
use Text::Balanced qw(extract_bracketed extract_delimited extract_tagged);
|
||||
|
||||
@ARGV >= 1 || die "Usage: $0 <source directory>\n";
|
||||
@ARGV >= 1 || die "Usage: $0 <source direcory>\n";
|
||||
|
||||
|
||||
my %stringtable;
|
||||
|
@ -29,22 +29,11 @@ lower="$(mktemp)"
|
||||
|
||||
trap 'rm -f "$upper" "$lower"' EXIT
|
||||
|
||||
awk 'BEGIN {
|
||||
sep = 0
|
||||
}
|
||||
|
||||
/^---$/ {
|
||||
sep = 1;
|
||||
next
|
||||
}
|
||||
|
||||
{
|
||||
if(sep == 0) {
|
||||
print > "'"$upper"'"
|
||||
} else {
|
||||
print > "'"$lower"'"
|
||||
}
|
||||
}' "$manifest"
|
||||
awk 'BEGIN { sep=0 }
|
||||
/^---$/ { sep=1; next }
|
||||
{ if(sep==0) print > "'"$upper"'";
|
||||
else print > "'"$lower"'"}' \
|
||||
"$manifest"
|
||||
|
||||
ecdsasign "$upper" < "$SECRET" >> "$lower"
|
||||
|
||||
|
@ -21,22 +21,11 @@ upper="$(mktemp)"
|
||||
lower="$(mktemp)"
|
||||
ret=1
|
||||
|
||||
awk 'BEGIN {
|
||||
sep = 0
|
||||
}
|
||||
|
||||
/^---$/ {
|
||||
sep = 1;
|
||||
next
|
||||
}
|
||||
|
||||
{
|
||||
if(sep == 0) {
|
||||
print > "'"$upper"'"
|
||||
} else {
|
||||
print > "'"$lower"'"
|
||||
}
|
||||
}' "$manifest"
|
||||
awk "BEGIN { sep=0 }
|
||||
/^---\$/ { sep=1; next }
|
||||
{ if(sep==0) print > \"$upper\";
|
||||
else print > \"$lower\"}" \
|
||||
"$manifest"
|
||||
|
||||
while read -r line
|
||||
do
|
||||
|
11
docs/conf.py
11
docs/conf.py
@ -20,11 +20,11 @@
|
||||
# -- Project information -----------------------------------------------------
|
||||
|
||||
project = 'Gluon'
|
||||
copyright = 'Project Gluon'
|
||||
copyright = '2015-2022, Project Gluon'
|
||||
author = 'Project Gluon'
|
||||
|
||||
# The short X.Y version
|
||||
version = '2022.1'
|
||||
version = '2022.1.4'
|
||||
# The full version, including alpha/beta/rc tags
|
||||
release = version
|
||||
|
||||
@ -71,13 +71,6 @@ pygments_style = None
|
||||
# Don't highlight code blocks unless requested explicitly
|
||||
highlight_language = 'none'
|
||||
|
||||
# Ignore links to the config mode, as well as anchors on on hackint, which are
|
||||
# used to mark channel names and do not exist. Regular links are not effected.
|
||||
linkcheck_ignore = [
|
||||
'http://192.168.1.1',
|
||||
'https://webirc.hackint.org/#'
|
||||
]
|
||||
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
|
||||
|
@ -57,7 +57,7 @@ commits, making `git reflog` the only way to recover them!
|
||||
|
||||
make refresh-patches
|
||||
|
||||
In order to refresh patches when updating feeds or the OpenWrt base, `make refresh-patches` applies and updates all of their patches without installing feed packages to the OpenWrt build system.
|
||||
In order to refresh patches when updating feeds or the OpenWrt base, `make refresh-patches` applies and updates all of their patches without installing feed packages to the OpenWrt buildsystem.
|
||||
|
||||
This command speeds up the maintenance of updating OpenWrt and feeds.
|
||||
|
||||
@ -77,7 +77,7 @@ apply:
|
||||
- use tabs instead of spaces
|
||||
- trailing whitespaces must be eliminated
|
||||
- files need to end with a final newline
|
||||
- newlines need to have Unix line endings (lf)
|
||||
- newlines need to have unix line endings (lf)
|
||||
|
||||
To that end we provide a ``.editorconfig`` configuration, which is supported by most
|
||||
of the editors out there.
|
||||
|
@ -91,7 +91,7 @@ update.sh
|
||||
|
||||
getversion.sh
|
||||
Used to determine the version numbers of the repositories of Gluon and the
|
||||
site configuration, to be included in the built firmware images as
|
||||
site configuraiton, to be included in the built firmware images as
|
||||
*/lib/gluon/gluon-version* and */lib/gluon/site-version*.
|
||||
|
||||
By default, this uses ``git describe`` to generate a version number based
|
||||
|
@ -45,7 +45,7 @@ Some more information on how to use this tool can be found at
|
||||
Obtaining Stacktraces
|
||||
.....................
|
||||
|
||||
On many targets stack traces can be read from the following
|
||||
On many targets stacktraces can be read from the following
|
||||
location after reboot: ::
|
||||
|
||||
/sys/kernel/debug/crashlog
|
||||
|
@ -1,51 +0,0 @@
|
||||
DNS caching
|
||||
===========
|
||||
|
||||
User experience may be greatly improved when dns is accelerated. Also, it
|
||||
seems like a good idea to keep the number of packages being exchanged
|
||||
between node and gateway as small as possible. In order to do this, a
|
||||
DNS cache may be used on a node. The dnsmasq instance listening on port
|
||||
53 on the node will be reconfigured to answer requests, use a list of
|
||||
upstream servers and a specific cache size if the options listed below are
|
||||
added to site.conf. Upstream servers are the DNS servers which are normally
|
||||
used by the nodes to resolve hostnames (e.g. gateways/supernodes).
|
||||
|
||||
There are the following settings:
|
||||
servers
|
||||
cacheentries
|
||||
|
||||
To use the node's DNS server, both options should be set. The node will cache at
|
||||
most 'cacheentries' many DNS records in RAM. The 'servers' list will be used to
|
||||
resolve the received DNS queries if the request cannot be answered from
|
||||
cache. Gateways should announce the "next node" address via DHCP and RDNSS (if
|
||||
any). Note that not setting 'servers' here will lead to DNS not working: Once
|
||||
the gateways all announce the "next node" address for DNS, there is no way for
|
||||
nodes to automatically determine DNS servers. They have to be baked into the
|
||||
firmware.
|
||||
|
||||
If these settings do not exist, the cache is not initialized and RAM usage will
|
||||
not increase.
|
||||
|
||||
When next_node.name is set, an A record and an AAAA record for the
|
||||
next-node IP address are placed in the dnsmasq configuration. This means that
|
||||
the content of next_node.name may be resolved even without upstream connectivity.
|
||||
It is suggested to use the same name as the DNS server provides:
|
||||
e.g. nextnode.location.community.example.org (This way the name also works if a
|
||||
client uses static DNS Servers). Hint: If next_node.name does not contain a dot
|
||||
some browsers would open the searchpage instead.
|
||||
|
||||
::
|
||||
|
||||
dns = {
|
||||
cacheentries = 5000,
|
||||
servers = { '2001:db8::1', },
|
||||
},
|
||||
|
||||
next_node = {
|
||||
name = { 'nextnode.location.community.example.org', 'nextnode', 'nn' },
|
||||
ip6 = '2001:db8:8::1',
|
||||
ip4 = '198.51.100.1',
|
||||
}
|
||||
|
||||
|
||||
Each cache entry will occupy about 90 bytes of RAM.
|
26
docs/features/dns-forwarder.rst
Normal file
26
docs/features/dns-forwarder.rst
Normal file
@ -0,0 +1,26 @@
|
||||
DNS forwarder
|
||||
=============
|
||||
|
||||
A Gluon node can be configured to act as a DNS forwarder. Requests for the
|
||||
next-node hostname(s) can be answered locally, without querying the upstream
|
||||
resolver.
|
||||
|
||||
**Note:** While this reduces answer time and allows to use the next-node
|
||||
hostname without upstream connectivity, this feature should not be used for
|
||||
next-node hostnames that are FQDN when the zone uses DNSSEC.
|
||||
|
||||
One or more upstream resolvers can be configured in the *dns.servers* setting.
|
||||
When *next_node.name* is set, A and/or AAAA records for the next-node IP
|
||||
addresses are placed in the dnsmasq configuration.
|
||||
|
||||
::
|
||||
|
||||
dns = {
|
||||
servers = { '2001:db8::1', },
|
||||
},
|
||||
|
||||
next_node = {
|
||||
name = { 'nextnode.location.community.example.org', 'nextnode', 'nn' },
|
||||
ip6 = '2001:db8:8::1',
|
||||
ip4 = '198.51.100.1',
|
||||
}
|
@ -47,7 +47,7 @@ installed. Please note that at least one alfred daemon is required to run as
|
||||
|
||||
.. _alfred-json: https://github.com/ffnord/alfred-json
|
||||
|
||||
The following data types are used:
|
||||
The following datatypes are used:
|
||||
|
||||
* `nodeinfo`: 158
|
||||
* `statistics`: 159
|
||||
|
@ -77,7 +77,7 @@ should always appear before ``null`` in the configuration when both are enabled.
|
||||
fastd v22 or newer is needed for the ``null@l2tp`` method.
|
||||
|
||||
It is often not necessary to enable L2TP offloading on supernodes for
|
||||
performance reasons. Nodes using offloading can communicate with supernodes that
|
||||
performance reasons. Nodes using offloading can communicate with supornodes that
|
||||
don't use offloading as long as both use the ``null@l2tp`` method.
|
||||
|
||||
|
||||
@ -102,19 +102,19 @@ However, the important changes to the fastd config on your Supernode are:
|
||||
| This tells fastd to use the l2tp kernel module.
|
||||
|
||||
- | Set ``persist interface no;``
|
||||
| This tells fastd to only keep interfaces around while the connection is active.
|
||||
| This tells fastd to only keep interfaces arround while the connection is active.
|
||||
|
||||
Note that in ``multitap`` mode, which is required when using L2TP offloading,
|
||||
fastd will create one interface per peer on the supernode's. This allows
|
||||
offloading the L2TP forwarding into the kernel space. But this also means added
|
||||
complexity with regards to handling those interfaces.
|
||||
copmlexity with regards to handling those interfaces.
|
||||
|
||||
There are two main options on how you can handle this:
|
||||
|
||||
- create ``on up`` and ``on down`` hooks
|
||||
|
||||
- to handle interface setup and destruction
|
||||
- preferably using the async keyword, so hooks are not blocking fastd
|
||||
- preferrably using the async keyword, so hooks are not blocking fastd
|
||||
|
||||
- use a daemon like systemd-networkd
|
||||
|
||||
@ -179,7 +179,7 @@ More information about the wgpeerselector and its algorithm can be found
|
||||
`here <https://github.com/freifunk-gluon/packages/blob/master/net/wgpeerselector/README.md>`__.
|
||||
|
||||
On the gluon node both VXLAN and the wgpeerselector are well integrated and no
|
||||
explicit configuration of those tools is necessary, once the general WireGuard
|
||||
explicit configuation of those tools is necessary, once the general WireGuard
|
||||
support has been configured.
|
||||
|
||||
Attention must by paid to time synchronization. As WireGuard
|
||||
@ -191,16 +191,6 @@ negative effects. Only when a previously connected node reboots the effect
|
||||
comes into play, as the gateway still knows about the old timestamp of the gluon
|
||||
node.
|
||||
|
||||
gluon-mesh-vpn-key-translate
|
||||
""""""""""""""""""""""""""""
|
||||
|
||||
Many communities already possess a collection of active fastd-keys when they
|
||||
plan migrating their community to WireGuard.
|
||||
These public keys known on the server-side can be derived into their WireGuard
|
||||
equivalent using `gluon-mesh-vpn-key-translate <https://github.com/AiyionPrime/gluon-mesh-vpn-key-translate>`__.
|
||||
The routers do the necessary reencoding of the private key seamlessly
|
||||
when updating firmware from fastd to the WireGuard variant.
|
||||
|
||||
Gateway / Supernode Configuration
|
||||
"""""""""""""""""""""""""""""""""
|
||||
|
||||
|
@ -16,8 +16,8 @@ by the user). This means that it is not possible to enable or disable an existin
|
||||
configurations during upgrades.
|
||||
|
||||
During upgrades the wifi channel of the 2.4GHz and 5GHz radio will be restored to the channel
|
||||
configured in the site.conf. The channel width will be reset to Gluon's default. If you need to preserve
|
||||
these settings during upgrades you can configure this via the uci section ``gluon-core.wireless``::
|
||||
configured in the site.conf. If you need to preserve a user defined wifi channel during upgrades
|
||||
you can configure this via the uci section ``gluon-core.wireless``::
|
||||
|
||||
uci set gluon.wireless.preserve_channels='1'
|
||||
|
||||
|
@ -25,7 +25,7 @@ Several Freifunk communities in Germany use Gluon as the foundation of their Fre
|
||||
features/wlan-configuration
|
||||
features/private-wlan
|
||||
features/wired-mesh
|
||||
features/dns-cache
|
||||
features/dns-forwarder
|
||||
features/monitoring
|
||||
features/multidomain
|
||||
features/authorized-keys
|
||||
|
@ -88,8 +88,6 @@ New features
|
||||
* Add support for making nodes a DNS cache for clients
|
||||
(`#1000 <https://github.com/freifunk-gluon/gluon/pull/1000>`_)
|
||||
|
||||
See also: :doc:`../features/dns-cache`
|
||||
|
||||
* Add L2TP via tunneldigger as an alternative VPN system
|
||||
(`#978 <https://github.com/freifunk-gluon/gluon/pull/978>`_)
|
||||
|
||||
|
@ -28,7 +28,7 @@ Bugfixes
|
||||
As the path to both config mode and status page were changed between versions
|
||||
users could be affected by a redirect to a no more valid URL.
|
||||
|
||||
* batman-adv has received two bugfixes, which were `backported <https://github.com/openwrt/routing/commit/7bf62cc8b556b5046f9bbd37687376fe9ea175bb>`_ from v2018.4
|
||||
* batman-adv has received two bugfixes, which were `backported <https://github.com/openwrt-routing/packages/commit/7bf62cc8b556b5046f9bbd37687376fe9ea175bb>`_ from v2018.4
|
||||
|
||||
Other changes
|
||||
~~~~~~~~~~~~~
|
||||
|
@ -127,10 +127,10 @@ Renamed targets
|
||||
Status Page
|
||||
~~~~~~~~~~~
|
||||
|
||||
- Gateway nexthop information has been added to the status page when batman-adv
|
||||
- Gateway nexthop information has been added to the statuspage when batman-adv
|
||||
is used. This includes its MAC address and prettyname as well as the interface
|
||||
name towards the selected gateway.
|
||||
- The site name has been added to the status page. If the node is in a multidomain
|
||||
- The site name has been added to the statuspage. If the node is in a multidomain
|
||||
setup it will also show the domain name.
|
||||
|
||||
DECT button to enter config mode
|
||||
|
@ -7,7 +7,7 @@ Bugfixes
|
||||
- LEDs on the ASUS RT-AC51 are now fully functional.
|
||||
|
||||
- Netgear EX6150v1 randomly booting into failsafe mode has been fixed.
|
||||
This happened dependent on the state of the mode setting switch.
|
||||
This happened dependant on the state of the mode setting switch.
|
||||
|
||||
- Dnsmasq has been patched against multiple security issues in its DNS response validation.
|
||||
See the OpenWrt advisory at https://openwrt.org/advisory/2021-01-19-1
|
||||
|
@ -30,11 +30,11 @@ ramips-mt76x8
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
- Missing bandwidth limit settings resulted in a respondd crash for v2021.1.
|
||||
- Missing bandwith limit settings resulted in a respondd crash for v2021.1.
|
||||
|
||||
- The Tunneldigger VPN provider was not registered with the Gluon VPN backend, resulting in broken Tunneldigger configurations.
|
||||
|
||||
- Disabling Radio interfaces in v2021.1 could lead to null pointer dereferences in the respondd airtime module, as the survey returns no data in this case.
|
||||
- Disabling Radio interfaces in v2021.1 could lead to nullpointer dereferences in the respondd airtime module, as the survey returns no data in this case.
|
||||
|
||||
|
||||
Known issues
|
||||
|
@ -4,13 +4,13 @@ Gluon 2022.1.3
|
||||
Bugfixes
|
||||
--------
|
||||
|
||||
* Ipq40xx Wave2 devices temporarily use non-ct firmware again to work around 802.11s unicast package loss in ath10k-ct
|
||||
* Ipq40xx Wave2 devices temporarily use non-ct firmware again to work around 802.11s unicast package loss in ath10k-ct
|
||||
(`#2692 <https://github.com/freifunk-gluon/gluon/issues/2692>`_)
|
||||
|
||||
* Modify kernel builds slightly to work around a boot hang on various devices based on the QCA9563 SoC - especially the Unifi AC-* devices
|
||||
* Modify kernel builds slightly to work around a boot hang on various devices based on the QCA9563 SoC - especially the Unifi AC-* devices
|
||||
(`#2784 <https://github.com/freifunk-gluon/gluon/issues/2784>`_)
|
||||
|
||||
* Work around an issue with wifi setup timing by waiting a bit while device initialisation is ongoing
|
||||
* Work around an issue with wifi setup timing by waiting a bit while device initialisation is ongoing
|
||||
(`#2779 <https://github.com/freifunk-gluon/gluon/issues/2779>`_)
|
||||
|
||||
|
||||
|
@ -1 +1 @@
|
||||
sphinx-rtd-theme==1.2.0
|
||||
sphinx-rtd-theme==1.0.0
|
||||
|
@ -58,7 +58,7 @@ msgid "gluon-config-mode:novpn"
|
||||
msgstr ""
|
||||
"<p><strong>Du hast ausgewählt die Internetverbindung (Mesh-VPN) nicht zu "
|
||||
"nutzen</strong>. Dein Knoten kann also nur dann eine Verbindung zum "
|
||||
"Freifunk-Netz aufbauen, wenn andere Freifunk-Knoten in WLAN-Reichweite sind.</p>"
|
||||
"Freifunk-Netz aufbauen, wenn andere Freifunk-Knoten in WLAN-Reichweite sind."
|
||||
"<p>Bitte schicke uns eine E-Mail mit dem Namen deines Knotens "
|
||||
"(<em><%= pcdata(hostname) %></em>) und ein paar Informationen an <a href="
|
||||
"\"mailto:freifunk-keys@lists.in-kiel.de?"
|
||||
|
@ -12,6 +12,7 @@
|
||||
# the git repository from where to clone the package feed
|
||||
#PACKAGES_MY_OWN_PACKAGES_REPO=https://github.com/.../my-own-packages.git
|
||||
|
||||
|
||||
## PACKAGES_$feedname_COMMIT
|
||||
# the version/commit of the git repository to clone
|
||||
#PACKAGES_MY_OWN_PACKAGES_COMMIT=123456789aabcda1a69b04278e4d38f2a3f57e49
|
||||
|
@ -1,4 +1,4 @@
|
||||
-- This is an example site configuration for Gluon v2022.1
|
||||
-- This is an example site configuration for Gluon v2022.1.4
|
||||
--
|
||||
-- Take a look at the documentation located at
|
||||
-- https://gluon.readthedocs.io/ for details.
|
||||
|
@ -8,7 +8,7 @@ Gluon's releases are managed using `Git tags`_. If you are just getting
|
||||
started with Gluon we recommend to use the latest stable release of Gluon.
|
||||
|
||||
Take a look at the `list of gluon releases`_ and notice the latest release,
|
||||
e.g. *v2022.1*. Always get Gluon using git and don't try to download it
|
||||
e.g. *v2022.1.4*. Always get Gluon using git and don't try to download it
|
||||
as a Zip archive as the archive will be missing version information.
|
||||
|
||||
Please keep in mind that there is no "default Gluon" build; a site configuration
|
||||
@ -25,20 +25,18 @@ An example configuration can be found in the Gluon repository at *docs/site-exam
|
||||
Dependencies
|
||||
------------
|
||||
To build Gluon, several packages need to be installed on the system. On a
|
||||
freshly installed Debian Bullseye system the following packages are required:
|
||||
freshly installed Debian Stretch system the following packages are required:
|
||||
|
||||
* `git` (to get Gluon and other dependencies)
|
||||
* `subversion`
|
||||
* `python3`
|
||||
* `build-essential`
|
||||
* `ecdsautils` (to sign firmware, see `contrib/sign.sh`)
|
||||
* `gawk`
|
||||
* `unzip`
|
||||
* `libncurses-dev` (actually `libncurses5-dev`)
|
||||
* `libz-dev` (actually `zlib1g-dev`)
|
||||
* `libssl-dev`
|
||||
* `libelf-dev` (to build x86-64)
|
||||
* `wget`
|
||||
* `rsync`
|
||||
* `time` (built-in `time` doesn't work)
|
||||
* `qemu-utils`
|
||||
|
||||
@ -52,7 +50,7 @@ Building the images
|
||||
-------------------
|
||||
|
||||
To build Gluon, first check out the repository. Replace *RELEASE* with the
|
||||
version you'd like to checkout, e.g. *v2022.1*.
|
||||
version you'd like to checkout, e.g. *v2022.1.4*.
|
||||
|
||||
::
|
||||
|
||||
|
@ -15,7 +15,7 @@ Consider these key values:
|
||||
- and configure `MSS clamping`_ accordingly,
|
||||
- and announce your link MTU via Router Advertisements and DHCP
|
||||
|
||||
.. _MSS clamping: https://tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.cookbook.mtu-mss.html
|
||||
.. _MSS clamping: https://www.tldp.org/HOWTO/Adv-Routing-HOWTO/lartc.cookbook.mtu-mss.html
|
||||
|
||||
- Encapsulation: Account for the overhead created by the configured mesh protocol
|
||||
encapsulating the payload, which is up to 32 Byte (14 Byte Ethernet + 18 Byte
|
||||
@ -35,8 +35,6 @@ minimum payload MTU required. This is the lowest recommended value, since going
|
||||
lower would cause unnecessary fragmentation for clients which respect the announced
|
||||
link MTU.
|
||||
|
||||
.. editorconfig-checker-disable
|
||||
|
||||
Example: Our network currently uses batman-adv v15, it therefore requires up
|
||||
to 32 Bytes of encapsulation overhead on top of the minimal link MTU required for
|
||||
transporting IPv6.::
|
||||
@ -74,7 +72,6 @@ Tunneling.::
|
||||
|
||||
MTU_HIGH = 1436 Byte - 20 Byte - 8 Byte - 24 Byte - 14 Byte = 1370 Byte
|
||||
|
||||
.. editorconfig-checker-enable
|
||||
|
||||
Tables for Different VPN Providers
|
||||
----------------------------------
|
||||
@ -162,7 +159,7 @@ Maximum MTU
|
||||
|
||||
Calculation of different derived MTUs based on a maximum WAN MTU of 1436.
|
||||
|
||||
Suggestions:
|
||||
Sugestions:
|
||||
|
||||
- This configuration can be used for fastd and Tunneldigger.
|
||||
|
||||
|
@ -49,13 +49,10 @@ node_prefix6
|
||||
|
||||
node_prefix6 = 'fdca::ffee:babe:2::/64'
|
||||
|
||||
node_client_prefix6 \: optional, deprecated
|
||||
DEPRECATED: Don't specify it anymore, this prefix will then
|
||||
automatically be generated from the domain_seed.
|
||||
|
||||
An IPv6 prefix internally used by the l3roamd protocol, used to allow
|
||||
an efficient handover via unicast when a client roamed.
|
||||
This is exclusively useful when running a routing mesh protocol
|
||||
node_client_prefix6
|
||||
The ipv6 prefix from which the client-specific IP-address is calculated that
|
||||
is assigned to each node by l3roamd to allow efficient communication when
|
||||
roaming. This is exclusively useful when running a routing mesh protocol
|
||||
like babel. e.g. ::
|
||||
|
||||
node_client_prefix6 = 'fdca::ffee:babe:3::/64'
|
||||
@ -448,8 +445,13 @@ interfaces \: optional
|
||||
The ``client`` role requires exclusive control over an interface. When
|
||||
the ``client`` role is assigned to an interface at the same time as other
|
||||
roles (like ``'client', 'mesh'`` in the above example), the other roles take
|
||||
precedence (enabling ``mesh``, but not ``client`` in the example). In that
|
||||
case, the ``client`` role is removed from the config of the interface.
|
||||
precedence (enabling ``mesh``, but not ``client`` in the example).
|
||||
|
||||
Such a default configuration still fulfills a purpose (and is in fact the
|
||||
recommended way to enable "Mesh-on-LAN" by default): The "LAN interface
|
||||
meshing" checkbox in the advanced network settings will only add or remove
|
||||
the ``mesh`` role, so the ``client`` role must already be in the configuration
|
||||
to make the LAN port a regular client interface when the checkbox is disabled.
|
||||
|
||||
All interface settings are optional. If unset, the following defaults are
|
||||
used:
|
||||
|
@ -41,10 +41,6 @@ ath79-generic
|
||||
|
||||
- WS-AP3705i
|
||||
|
||||
* Extreme Networks
|
||||
|
||||
- WS-AP3805i
|
||||
|
||||
* GL.iNet
|
||||
|
||||
- 6416A
|
||||
@ -112,7 +108,9 @@ ath79-generic
|
||||
- Archer C59 (v1)
|
||||
- CPE210 (v1.0, v1.1, v2.0, v3.0, v3.1, v3.20)
|
||||
- CPE220 (v3.0)
|
||||
- CPE510 (v1.0, v1.1, v2.0, v3.0)
|
||||
- CPE510 (v1.0, v1.1)
|
||||
- CPE510 (v2.0)
|
||||
- CPE510 (v3.0)
|
||||
- CPE710 (v1.0)
|
||||
- EAP225-Outdoor (v1)
|
||||
- RE450 (v1)
|
||||
@ -122,7 +120,8 @@ ath79-generic
|
||||
- TL-WR810N (v1)
|
||||
- TL-WR842N/ND (v3)
|
||||
- TL-WR1043N/ND (v2, v3, v4, v5)
|
||||
- WBS210 (v1.20, v2.0)
|
||||
- WBS210 (v1.20)
|
||||
- WBS210 (v2.0)
|
||||
- WBS510 (v1.20)
|
||||
|
||||
* Ubiquiti
|
||||
@ -151,7 +150,6 @@ ath79-nand
|
||||
|
||||
- GL-AR300M
|
||||
- GL-AR750S
|
||||
- GL-XE300
|
||||
|
||||
* Netgear
|
||||
|
||||
@ -191,8 +189,8 @@ ipq40xx-generic
|
||||
* AVM
|
||||
|
||||
- FRITZ!Box 4040 [#avmflash]_
|
||||
- FRITZ!Box 7520 (v1) [#eva_ramboot]_ [#lan_as_wan]_
|
||||
- FRITZ!Box 7530 [#eva_ramboot]_ [#lan_as_wan]_
|
||||
- FRITZ!Box 7520 (v1) [#eva_ramboot]_
|
||||
- FRITZ!Box 7530 [#eva_ramboot]_
|
||||
- FRITZ!Repeater 1200 [#eva_ramboot]_
|
||||
|
||||
* EnGenius
|
||||
@ -396,10 +394,6 @@ ramips-mt7621
|
||||
- EdgeRouter X-SFP
|
||||
- UniFi 6 Lite
|
||||
|
||||
* Wavlink
|
||||
|
||||
- WS-WN572HP3 (4G)
|
||||
|
||||
* ZBT
|
||||
|
||||
- WG3526-16M
|
||||
@ -439,7 +433,8 @@ ramips-mt76x8
|
||||
* TP-Link
|
||||
|
||||
- Archer C20 (v4, v5)
|
||||
- Archer C50 (v3, v4)
|
||||
- Archer C50 (v3)
|
||||
- Archer C50 (v4)
|
||||
- RE200 (v2, v3)
|
||||
- RE305 (v1) [#device-class-tiny]
|
||||
- TL-MR3020 (v3)
|
||||
|
@ -15,7 +15,7 @@ The following targets for x86 images exist:
|
||||
|
||||
There are three images:
|
||||
|
||||
* `generic` (compressed "raw" image, can be written to a disk directly or booted with qemu)
|
||||
* `generic` (compressed "raw" image, can written to a disk directly or booted with qemu)
|
||||
* `virtualbox` (VDI image)
|
||||
* `vmware` (VMDK image)
|
||||
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <respondd.h>
|
||||
@ -37,7 +59,7 @@ static struct json_object * get_autoupdater(void) {
|
||||
|
||||
return ret;
|
||||
|
||||
error:
|
||||
error:
|
||||
uci_free_context(ctx);
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1,7 +1,12 @@
|
||||
<%#
|
||||
SPDX-License-Identifier: Apache-2.0
|
||||
SPDX-FileCopyrightText: 2008 Steven Barth <steven@midlink.org>
|
||||
SPDX-FileCopyrightText: 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
|
||||
Copyright 2008 Steven Barth <steven@midlink.org>
|
||||
Copyright 2008-2010 Jo-Philipp Wich <xm@subsignal.org>
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
-%>
|
||||
<%
|
||||
local pretty_hostname = require "pretty_hostname"
|
||||
|
File diff suppressed because one or more lines are too long
@ -6,7 +6,7 @@
|
||||
|
||||
sass --sourcemap=none -C -t compressed sass/gluon.scss files/lib/gluon/config-mode/www/static/gluon.css
|
||||
|
||||
When committing changes to this file make sure to commit the respective
|
||||
When commiting changes to this file make sure to commit the respective
|
||||
changes to the compilid version within the same commit!
|
||||
*/
|
||||
|
||||
@ -273,10 +273,6 @@ input[type=checkbox] {
|
||||
text-align: center;
|
||||
font-size: 1.7em;
|
||||
}
|
||||
|
||||
&[disabled] + label {
|
||||
background-color: #dcdcdc !important;
|
||||
}
|
||||
}
|
||||
|
||||
input[type=radio] {
|
||||
@ -370,13 +366,6 @@ input[type=password] {
|
||||
min-width: 20em;
|
||||
}
|
||||
|
||||
.gluon-multi-list-option-descr {
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
margin-top: 0.35em;
|
||||
margin-left: 0.4em;
|
||||
}
|
||||
|
||||
.gluon-button {
|
||||
@include button;
|
||||
|
||||
@ -529,11 +518,6 @@ textarea {
|
||||
}
|
||||
}
|
||||
|
||||
.gluon-warning {
|
||||
@extend .gluon-section-descr;
|
||||
background: lighten($ffyellow, 35);
|
||||
}
|
||||
|
||||
.error500 {
|
||||
border: 1px dotted #ff0000;
|
||||
background-color: #ffffff;
|
||||
|
@ -66,7 +66,6 @@ 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)
|
||||
@ -77,11 +76,7 @@ need_boolean(in_domain({'mesh', 'vxlan'}), 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)
|
||||
need_array_of(in_site({'interfaces', config, 'default_roles'}), interfaces_roles, false)
|
||||
end
|
||||
|
||||
obsolete({'mesh_on_wan'}, 'Use interfaces.wan.default_roles.')
|
||||
|
@ -55,14 +55,6 @@ local function merge(a, b)
|
||||
return m
|
||||
end
|
||||
|
||||
local function contains(table, val)
|
||||
for i=1,#table do
|
||||
if table[i] == val then
|
||||
return true
|
||||
end
|
||||
end
|
||||
return false
|
||||
end
|
||||
|
||||
local function path_to_string(path)
|
||||
if path.is_value then
|
||||
@ -378,21 +370,6 @@ function M.need_array_of(path, array, required)
|
||||
return M.need_array(path, function(e) M.need_one_of(e, array) end, required)
|
||||
end
|
||||
|
||||
function M.need_array_elements_exclusive(path, a, b, required)
|
||||
local val = need_type(path, 'table', required, 'be an array')
|
||||
if not val then
|
||||
return nil
|
||||
end
|
||||
|
||||
if contains(val, a) and contains(val, b) then
|
||||
config_error(conf_src(path),
|
||||
'expected %s to contain only one of the elements %s and %s, but not both.',
|
||||
path_to_string(path), format(a), format(b))
|
||||
end
|
||||
|
||||
return val
|
||||
end
|
||||
|
||||
function M.need_chanlist(path, channels, required)
|
||||
local valid_chanlist = check_chanlist(channels)
|
||||
return M.need(path, valid_chanlist, required,
|
||||
|
@ -63,19 +63,4 @@ for iface in pairs(interfaces) do
|
||||
end
|
||||
end
|
||||
|
||||
-- Fix invalid role configurations
|
||||
|
||||
uci:foreach('gluon', 'interface', function(interface)
|
||||
|
||||
local function has_role(role)
|
||||
return util.contains(interface.role, role)
|
||||
end
|
||||
|
||||
if has_role('client') and (has_role('mesh') or has_role('uplink')) then
|
||||
-- remove 'client' role
|
||||
util.remove_from_set(interface.role, 'client')
|
||||
uci:set('gluon', interface['.name'], 'role', interface.role)
|
||||
end
|
||||
end)
|
||||
|
||||
uci:save('gluon')
|
||||
|
@ -4,19 +4,6 @@ local uci = require('simple-uci').cursor()
|
||||
|
||||
local sysconfig = require 'gluon.sysconfig'
|
||||
local util = require 'gluon.util'
|
||||
local json = require 'jsonc'
|
||||
|
||||
local function get_network_mac(name)
|
||||
local board_data = json.load('/etc/board.json')
|
||||
local network_data = (board_data or {}).network
|
||||
|
||||
if network_data == nil then
|
||||
return nil
|
||||
end
|
||||
|
||||
local ifdata = network_data[name] or {}
|
||||
return ifdata.macaddr
|
||||
end
|
||||
|
||||
local wan = uci:get_all('network_gluon-old', 'wan') or {}
|
||||
local wan6 = uci:get_all('network_gluon-old', 'wan6') or {}
|
||||
@ -40,7 +27,6 @@ uci:section('network', 'interface', 'wan', {
|
||||
ipaddr = wan.ipaddr,
|
||||
netmask = wan.netmask,
|
||||
gateway = wan.gateway,
|
||||
macaddr = get_network_mac('wan'),
|
||||
ifname = util.get_role_interfaces(uci, 'uplink'),
|
||||
type = 'bridge',
|
||||
igmp_snooping = true,
|
||||
|
@ -53,19 +53,19 @@ local function is_outdoor()
|
||||
end
|
||||
|
||||
local function get_channel(radio, config)
|
||||
if radio.band == '5g' and is_outdoor() then
|
||||
local channel
|
||||
if wireless.preserve_channels(uci) then
|
||||
-- preserved channel always wins
|
||||
channel = radio.channel
|
||||
elseif radio.band == '5g' and is_outdoor() then
|
||||
-- actual channel will be picked and probed from chanlist
|
||||
return 'auto'
|
||||
channel = 'auto'
|
||||
end
|
||||
|
||||
return config.channel()
|
||||
return channel or config.channel()
|
||||
end
|
||||
|
||||
local function get_htmode(radio)
|
||||
if wireless.preserve_channels(uci) then
|
||||
return radio.htmode
|
||||
end
|
||||
|
||||
if radio.band == '5g' and is_outdoor() then
|
||||
local outdoor_htmode = uci:get('gluon', 'wireless', 'outdoor_' .. radio['.name'] .. '_htmode')
|
||||
if outdoor_htmode ~= nil then
|
||||
@ -175,20 +175,6 @@ local function configure_mesh_wireless(radio, index, config, disabled)
|
||||
)
|
||||
end
|
||||
|
||||
local function set_channels(radio, radio_name, config)
|
||||
if wireless.preserve_channels(uci) then
|
||||
return
|
||||
end
|
||||
local channel = get_channel(radio, config)
|
||||
uci:set('wireless', radio_name, 'channel', channel)
|
||||
|
||||
local chanlist
|
||||
if radio.band == '5g' and is_outdoor() then
|
||||
chanlist = config.outdoor_chanlist()
|
||||
end
|
||||
uci:set('wireless', radio_name, 'channels', chanlist)
|
||||
end
|
||||
|
||||
wireless.foreach_radio(uci, function(radio, index, config)
|
||||
local radio_name = radio['.name']
|
||||
|
||||
@ -204,13 +190,13 @@ wireless.foreach_radio(uci, function(radio, index, config)
|
||||
return
|
||||
end
|
||||
|
||||
local channel = get_channel(radio, config)
|
||||
local htmode = get_htmode(radio)
|
||||
local beacon_interval = config.beacon_interval()
|
||||
|
||||
uci:delete('wireless', radio_name, 'disabled')
|
||||
|
||||
set_channels(radio, radio_name, config)
|
||||
|
||||
uci:set('wireless', radio_name, 'channel', channel)
|
||||
uci:set('wireless', radio_name, 'htmode', htmode)
|
||||
uci:set('wireless', radio_name, 'country', site.regdom())
|
||||
|
||||
@ -222,17 +208,22 @@ wireless.foreach_radio(uci, function(radio, index, config)
|
||||
uci:set('wireless', radio_name, 'legacy_rates', false)
|
||||
configure_mesh_wireless(radio, index, config)
|
||||
elseif (band == '5g') then
|
||||
-- ToDo: Remove in v2024.x
|
||||
if is_outdoor() then
|
||||
uci:set('wireless', radio_name, 'channels', config.outdoor_chanlist())
|
||||
|
||||
-- enforce outdoor channels by filtering the regdom for outdoor channels
|
||||
local hostapd_options = uci:get_list('wireless', radio_name, 'hostapd_options')
|
||||
util.add_to_set(hostapd_options, 'country3=0x4f')
|
||||
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
|
||||
|
||||
configure_mesh_wireless(radio, index, config, true)
|
||||
else
|
||||
uci:delete('wireless', radio_name, 'channels')
|
||||
|
||||
local hostapd_options = uci:get_list('wireless', radio_name, 'hostapd_options')
|
||||
util.remove_from_set(hostapd_options, 'country3=0x4f')
|
||||
uci:set_list('wireless', radio_name, 'hostapd_options', hostapd_options)
|
||||
|
||||
if is_outdoor() then
|
||||
-- enforce outdoor channels by filtering the regdom for outdoor channels
|
||||
uci:set('wireless', radio_name, 'country3', '0x4f')
|
||||
configure_mesh_wireless(radio, index, config, true)
|
||||
else
|
||||
uci:delete('wireless', radio_name, 'country3')
|
||||
configure_mesh_wireless(radio, index, config)
|
||||
end
|
||||
end
|
||||
|
@ -1,63 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
local platform = require 'gluon.platform'
|
||||
|
||||
if not platform.is_cellular_device() then
|
||||
return
|
||||
end
|
||||
|
||||
local function set_or_delete(package, section, option, val)
|
||||
if val ~= nil and string.len(val) ~= 0 then
|
||||
uci:set(package, section, option, val)
|
||||
else
|
||||
uci:delete(package, section, option)
|
||||
end
|
||||
end
|
||||
|
||||
local function setup_ncm_qmi(devpath, control_type, delay)
|
||||
local pdptype = uci:get('gluon', 'cellular', 'pdptype')
|
||||
|
||||
local pincode = uci:get('gluon', 'cellular', 'pin')
|
||||
local username = uci:get('gluon', 'cellular', 'username')
|
||||
local password = uci:get('gluon', 'cellular', 'password')
|
||||
|
||||
uci:section('network', 'interface', 'cellular', {
|
||||
proto = control_type,
|
||||
device = devpath,
|
||||
disabled = not uci:get_bool('gluon', 'cellular', 'enabled'),
|
||||
pdptype = pdptype,
|
||||
apn = uci:get('gluon', 'cellular', 'apn'),
|
||||
})
|
||||
|
||||
if pdptype ~= 'IP' then
|
||||
uci:set('network', 'cellular', 'ipv6', 'auto')
|
||||
else
|
||||
uci:delete('network', 'cellular', 'ipv6')
|
||||
end
|
||||
|
||||
set_or_delete('network', 'cellular', 'pincode', pincode)
|
||||
set_or_delete('network', 'cellular', 'username', username)
|
||||
set_or_delete('network', 'cellular', 'password', password)
|
||||
set_or_delete('network', 'cellular', 'delay', delay)
|
||||
end
|
||||
|
||||
if platform.match('ath79', 'nand', {
|
||||
'glinet,gl-xe300',
|
||||
}) then
|
||||
setup_ncm_qmi('/dev/cdc-wdm0', 'qmi', 15)
|
||||
elseif platform.match('ath79', 'nand', {
|
||||
'zte,mf281',
|
||||
}) then
|
||||
setup_ncm_qmi('/dev/ttyACM0', 'ncm', 15)
|
||||
elseif platform.match('ipq40xx', 'generic', {
|
||||
'glinet,gl-ap1300',
|
||||
}) then
|
||||
setup_ncm_qmi('/dev/cdc-wdm0', 'qmi', 15)
|
||||
elseif platform.match('ramips', 'mt7621', {
|
||||
'wavlink,ws-wn572hp3-4g',
|
||||
}) then
|
||||
setup_ncm_qmi('/dev/ttyUSB2', 'ncm', 15)
|
||||
end
|
||||
|
||||
uci:save('network')
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
local platform = require 'gluon.platform'
|
||||
|
||||
|
||||
local defaults = uci:get_first('firewall', 'defaults')
|
||||
@ -17,18 +16,8 @@ local function reject_input_on_wan(zone)
|
||||
return true
|
||||
end
|
||||
|
||||
local function add_cellular_wan(zone)
|
||||
if zone.name == 'wan' then
|
||||
uci:set('firewall', zone['.name'], 'network', {'wan', 'wan6', 'cellular_4', 'cellular_6'})
|
||||
end
|
||||
end
|
||||
|
||||
uci:foreach('firewall', 'zone', reject_input_on_wan)
|
||||
|
||||
if platform.is_cellular_device() then
|
||||
uci:foreach('firewall', 'zone', add_cellular_wan)
|
||||
end
|
||||
|
||||
for _, zone in ipairs({'mesh', 'loc_client', 'wired_mesh'}) do
|
||||
-- Other packages assign interfaces to these zones
|
||||
uci:section('firewall', 'zone', zone, {
|
||||
|
@ -12,7 +12,7 @@ uci:set('dhcp', dnsmasq, 'localise_queries', true)
|
||||
uci:set('dhcp', dnsmasq, 'localservice', false)
|
||||
|
||||
uci:set('dhcp', dnsmasq, 'server', dns.servers)
|
||||
uci:set('dhcp', dnsmasq, 'cachesize', dns.cacheentries)
|
||||
uci:delete('dhcp', dnsmasq, 'cachesize')
|
||||
|
||||
uci:delete('firewall', 'client_dns')
|
||||
if dns.servers then
|
||||
|
@ -26,7 +26,6 @@ local values = {
|
||||
.. ' / ' .. util.trim(util.readfile('/lib/gluon/site-version')) },
|
||||
{ 'Firmware release', util.trim(util.readfile('/lib/gluon/release')) },
|
||||
{ 'Site', site.site_name() },
|
||||
{ 'Domain', uci:get('gluon', 'core', 'domain') or 'n/a' },
|
||||
{ 'Public VPN key', pubkey or 'n/a' },
|
||||
}
|
||||
|
||||
|
@ -60,31 +60,6 @@ function M.is_outdoor_device()
|
||||
'mikrotik,sxtsq-5-ac',
|
||||
}) then
|
||||
return true
|
||||
|
||||
elseif M.match('ramips', 'mt7621', {
|
||||
'wavlink,ws-wn572hp3-4g',
|
||||
'zyxel,nwa55axe',
|
||||
}) then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
end
|
||||
|
||||
function M.is_cellular_device()
|
||||
if M.match('ath79', 'nand', {
|
||||
'zte,mf281',
|
||||
'glinet,gl-xe300',
|
||||
}) then
|
||||
return true
|
||||
elseif M.match('ipq40xx', 'generic', {
|
||||
'glinet,gl-ap1300',
|
||||
}) then
|
||||
return true
|
||||
elseif M.match('ramips', 'mt7621', {
|
||||
'wavlink,ws-wn572hp3-4g',
|
||||
}) then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
|
@ -23,7 +23,7 @@ local function find_phy_by_path(path)
|
||||
path_prefix = 'platform/'
|
||||
end
|
||||
|
||||
-- Get all available PHYs of the device and determine the one with the lowest index
|
||||
-- Get all available PHYs of the device and dertermine the one with the lowest index
|
||||
local phy_names = dirent.dir('/sys/devices/' .. path_prefix .. device_path .. '/ieee80211')
|
||||
local device_phy_idxs = {}
|
||||
for _, v in ipairs(phy_names) do
|
||||
|
339
package/gluon-ebtables-limit-arp/src/LICENSE
Normal file
339
package/gluon-ebtables-limit-arp/src/LICENSE
Normal file
@ -0,0 +1,339 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Lesser General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License.
|
@ -1,5 +1,7 @@
|
||||
# SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
# SPDX-License-Identifier: GPL-2.0-or-later
|
||||
# Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
#
|
||||
# SPDX-License-Identifier: GPL-2.0+
|
||||
# License-Filename: LICENSE
|
||||
|
||||
all: gluon-arp-limiter
|
||||
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h>
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#ifndef _ADDR_STORE_H_
|
||||
#define _ADDR_STORE_H_
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#include <arpa/inet.h>
|
||||
#include <errno.h>
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#ifndef _GLUON_ARP_LIMITER_H_
|
||||
#define _GLUON_ARP_LIMITER_H_
|
||||
|
@ -159,15 +159,15 @@ and these came close:
|
||||
|
||||
/*
|
||||
--------------------------------------------------------------------
|
||||
This works on all machines. To be useful, it requires
|
||||
-- that the key be an array of uint32_t's, and
|
||||
-- that the length be the number of uint32_t's in the key
|
||||
This works on all machines. To be useful, it requires
|
||||
-- that the key be an array of uint32_t's, and
|
||||
-- that the length be the number of uint32_t's in the key
|
||||
|
||||
The function hashword() is identical to hashlittle() on little-endian
|
||||
machines, and identical to hashbig() on big-endian machines,
|
||||
except that the length has to be measured in uint32_ts rather than in
|
||||
bytes. hashlittle() is more complicated than hashword() only because
|
||||
hashlittle() has to dance around fitting the key bytes into registers.
|
||||
The function hashword() is identical to hashlittle() on little-endian
|
||||
machines, and identical to hashbig() on big-endian machines,
|
||||
except that the length has to be measured in uint32_ts rather than in
|
||||
bytes. hashlittle() is more complicated than hashword() only because
|
||||
hashlittle() has to dance around fitting the key bytes into registers.
|
||||
--------------------------------------------------------------------
|
||||
*/
|
||||
uint32_t hashword(
|
||||
@ -215,10 +215,10 @@ both be initialized with seeds. If you pass in (*pb)==0, the output
|
||||
--------------------------------------------------------------------
|
||||
*/
|
||||
void hashword2 (
|
||||
const uint32_t *k, /* the key, an array of uint32_t values */
|
||||
size_t length, /* the length of the key, in uint32_ts */
|
||||
uint32_t *pc, /* IN: seed OUT: primary hash value */
|
||||
uint32_t *pb) /* IN: more seed OUT: secondary hash value */
|
||||
const uint32_t *k, /* the key, an array of uint32_t values */
|
||||
size_t length, /* the length of the key, in uint32_ts */
|
||||
uint32_t *pc, /* IN: seed OUT: primary hash value */
|
||||
uint32_t *pb) /* IN: more seed OUT: secondary hash value */
|
||||
{
|
||||
uint32_t a,b,c;
|
||||
|
||||
@ -310,7 +310,7 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
|
||||
* rest of the string. Every machine with memory protection I've seen
|
||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||
* still catch it and complain. The masking trick does make the hash
|
||||
* noticeably faster for short strings (like English words).
|
||||
* noticably faster for short strings (like English words).
|
||||
*/
|
||||
#ifndef VALGRIND
|
||||
|
||||
@ -442,6 +442,7 @@ uint32_t hashlittle( const void *key, size_t length, uint32_t initval)
|
||||
case 0 : return c;
|
||||
}
|
||||
}
|
||||
|
||||
final(a,b,c);
|
||||
return c;
|
||||
}
|
||||
@ -493,7 +494,7 @@ void hashlittle2(
|
||||
* rest of the string. Every machine with memory protection I've seen
|
||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||
* still catch it and complain. The masking trick does make the hash
|
||||
* noticeably faster for short strings (like English words).
|
||||
* noticably faster for short strings (like English words).
|
||||
*/
|
||||
#ifndef VALGRIND
|
||||
|
||||
@ -669,8 +670,8 @@ uint32_t hashbig( const void *key, size_t length, uint32_t initval)
|
||||
* rest of the string. Every machine with memory protection I've seen
|
||||
* does it on word boundaries, so is OK with this. But VALGRIND will
|
||||
* still catch it and complain. The masking trick does make the hash
|
||||
* noticeably faster for short strings (like English words).
|
||||
* */
|
||||
* noticably faster for short strings (like English words).
|
||||
*/
|
||||
#ifndef VALGRIND
|
||||
|
||||
switch(length)
|
||||
@ -805,6 +806,7 @@ void driver2()
|
||||
{
|
||||
for (l=0; l<HASHSTATE; ++l)
|
||||
e[l]=f[l]=g[l]=h[l]=x[l]=y[l]=~((uint32_t)0);
|
||||
|
||||
/*---- check that every output bit is affected by that input bit */
|
||||
for (k=0; k<MAXPAIR; k+=2)
|
||||
{
|
||||
@ -843,7 +845,7 @@ void driver2()
|
||||
}
|
||||
}
|
||||
}
|
||||
done:
|
||||
done:
|
||||
if (z < MAXPAIR)
|
||||
{
|
||||
printf("Mix success %2d bytes %2d initvals ",i,m);
|
||||
@ -945,7 +947,7 @@ void driver3()
|
||||
}
|
||||
|
||||
/* check for problems with nulls */
|
||||
void driver4()
|
||||
void driver4()
|
||||
{
|
||||
uint8_t buf[1];
|
||||
uint32_t h,i,state[HASHSTATE];
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#include <linux/if_ether.h>
|
||||
#include <stdio.h>
|
||||
|
@ -1,5 +1,9 @@
|
||||
// SPDX-FileCopyrightText: 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
/*
|
||||
* Copyright (c) 2017 Linus Lüssing <linus.luessing@c0d3.blue>
|
||||
*
|
||||
* SPDX-License-Identifier: GPL-2.0+
|
||||
* License-Filename: LICENSE
|
||||
*/
|
||||
|
||||
#ifndef _MAC_H_
|
||||
#define _MAC_H_
|
||||
|
@ -6,7 +6,7 @@ include ../gluon.mk
|
||||
|
||||
define Package/gluon-l3roamd
|
||||
TITLE:=Configure l3roamd for babel
|
||||
DEPENDS:=+gluon-core +gluon-mesh-layer3-common +l3roamd +uc
|
||||
DEPENDS:=+gluon-core +l3roamd +uc
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackageGluon,gluon-l3roamd))
|
||||
|
1
package/gluon-l3roamd/check_site.lua
Normal file
1
package/gluon-l3roamd/check_site.lua
Normal file
@ -0,0 +1 @@
|
||||
need_string_match(in_domain({'node_client_prefix6'}), '^[%x:]+/64$', false)
|
@ -43,7 +43,7 @@ start_service () {
|
||||
local 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())')"
|
||||
local localip="$(uci get network.loopback.ip6addr | cut -d/ -f1)"
|
||||
local roamingprefix="$(lua -e 'print(" -P " .. require("gluon.l3").node_client_prefix6())')"
|
||||
local roamingprefix="$(lua -e 'roamingprefix = require("gluon.site").node_client_prefix6() if roamingprefix then print(" -P " .. roamingprefix) end')"
|
||||
|
||||
/sbin/sysctl -w net.ipv6.neigh.default.gc_thresh1=2
|
||||
/sbin/sysctl -w net.ipv4.neigh.default.gc_thresh1=2
|
||||
|
@ -1,4 +1,5 @@
|
||||
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)
|
||||
|
@ -1,2 +0,0 @@
|
||||
#!/bin/sh
|
||||
echo dump | nc ::1 33123 | grep -qF "add neighbour"
|
@ -1,7 +1,6 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local site = require 'gluon.site'
|
||||
local l3 = require 'gluon.l3'
|
||||
local uci = require('simple-uci').cursor()
|
||||
local nodeip = uci:get('network', 'loopback', 'ip6addr'):match('^[^/]+')
|
||||
local babelconf='/etc/gluon-babeld.conf'
|
||||
@ -15,7 +14,7 @@ file:write("import-table 254\n")
|
||||
file:write("out ip " .. site.next_node.ip6() .. "/128 deny\n")
|
||||
file:write("redistribute ip " .. site.next_node.ip6() .. "/128 deny\n")
|
||||
file:write("redistribute ip " .. site.prefix6() .. " eq 128 allow\n")
|
||||
file:write("redistribute ip " .. l3.node_client_prefix6() .. " eq 128 allow\n")
|
||||
file:write("redistribute ip " .. site.node_client_prefix6() .. " eq 128 allow\n")
|
||||
file:write("redistribute ip " .. site.node_prefix6() .. " eq 128 allow\n")
|
||||
file:write("redistribute ip 2000::/3 allow\n")
|
||||
file:write("redistribute local if br-wan deny\n")
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <respondd.h>
|
||||
|
@ -1,6 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "respondd-common.h"
|
||||
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "respondd-common.h"
|
||||
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "respondd-common.h"
|
||||
|
||||
@ -214,7 +236,7 @@ static struct json_object * get_traffic(void) {
|
||||
json_object_object_add(ret, "mgmt_rx", mgmt_rx);
|
||||
json_object_object_add(ret, "mgmt_tx", mgmt_tx);
|
||||
|
||||
out:
|
||||
out:
|
||||
free(stats);
|
||||
free(strings);
|
||||
close(fd);
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-FileCopyrightText: 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2016-2019, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "respondd-common.h"
|
||||
|
||||
|
@ -1,2 +1,2 @@
|
||||
need_string_match(in_domain({'node_prefix6'}), '^[%x:]+/64$')
|
||||
need_string_match(in_domain({'node_client_prefix6'}), '^[%x:]+/64$', false)
|
||||
|
||||
|
@ -1,20 +0,0 @@
|
||||
local site = require("gluon.site")
|
||||
local util = require("gluon.util")
|
||||
|
||||
local M = {}
|
||||
|
||||
-- returns a prefix generated from the domain-seed
|
||||
-- for l3roamd -P <node-client-prefix>
|
||||
function M.node_client_prefix6()
|
||||
local key = "gluon-l3roamd.node_client_prefix6"
|
||||
local prefix = site.node_client_prefix6()
|
||||
|
||||
if not prefix then
|
||||
local prefix_seed = util.domain_seed_bytes(key, 7)
|
||||
prefix = ("fd" .. prefix_seed):gsub(("(%x%x%x%x)"):rep(4), "%1:%2:%3:%4" .. "::/64")
|
||||
end
|
||||
|
||||
return prefix
|
||||
end
|
||||
|
||||
return M
|
@ -1,19 +0,0 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gluon-mesh-olsrd
|
||||
PKG_VERSION=1
|
||||
|
||||
include ../gluon.mk
|
||||
|
||||
define Package/gluon-mesh-olsrd
|
||||
TITLE:=olsrd mesh
|
||||
DEPENDS:= \
|
||||
+gluon-core \
|
||||
@IPV6 \
|
||||
+oonf-olsrd2 \
|
||||
+firewall \
|
||||
+gluon-mesh-layer3-common
|
||||
PROVIDES:=gluon-mesh-provider
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackageGluon,gluon-mesh-olsrd))
|
@ -1 +0,0 @@
|
||||
need_table({'mesh', 'olsrd', 'v2', 'config'}, nil, false)
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
reload_running() {
|
||||
if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled && /etc/init.d/"$1" running; then
|
||||
echo "(post-setup.d:$IFNAME) Reloading $1..."
|
||||
/etc/init.d/"$1" reload
|
||||
fi
|
||||
}
|
||||
|
||||
reload_running olsrd2
|
@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
reload_running() {
|
||||
if [ -x /etc/init.d/"$1" ] && /etc/init.d/"$1" enabled && /etc/init.d/"$1" running; then
|
||||
echo "(teardown.d:$IFNAME) Reloading $1..."
|
||||
/etc/init.d/"$1" reload
|
||||
fi
|
||||
}
|
||||
|
||||
reload_running olsrd2
|
@ -1 +0,0 @@
|
||||
mmfd
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
start_enabled olsrd2
|
||||
wifi up
|
@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/gluon/autoupdater/lib.sh
|
||||
|
||||
|
||||
stop olsrd2
|
||||
wifi down
|
@ -1,163 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
local site = require 'gluon.site'
|
||||
local util = require 'gluon.util'
|
||||
local wireless = require 'gluon.wireless'
|
||||
local mesh_interfaces = util.get_role_interfaces(uci, 'mesh')
|
||||
local uplink_interfaces = util.get_role_interfaces(uci, 'uplink')
|
||||
local client_interfaces = util.get_role_interfaces(uci, 'client')
|
||||
|
||||
local mesh_interfaces_uplink = {}
|
||||
local mesh_interfaces_client = {}
|
||||
local mesh_interfaces_other = {}
|
||||
for _, iface in ipairs(mesh_interfaces) do
|
||||
if util.contains(uplink_interfaces, iface) then
|
||||
table.insert(mesh_interfaces_uplink, iface)
|
||||
elseif util.contains(client_interfaces, iface) then
|
||||
table.insert(mesh_interfaces_client, iface)
|
||||
else
|
||||
table.insert(mesh_interfaces_other, iface)
|
||||
end
|
||||
end
|
||||
|
||||
local intf = {
|
||||
wired_mesh = {},
|
||||
vpn_mesh = {},
|
||||
radio_mesh = {},
|
||||
}
|
||||
|
||||
intf.all_intfs = {}
|
||||
|
||||
for _, l in ipairs({ intf.wired_mesh, intf.vpn_mesh, intf.radio_mesh }) do
|
||||
for _, n in ipairs(l) do
|
||||
table.insert(intf.all_intfs, n)
|
||||
end
|
||||
end
|
||||
|
||||
-- get all mesh radios and mesh lans and then add them to olsrd
|
||||
wireless.foreach_radio(uci, function(radio, _, _)
|
||||
local radio_name = radio['.name']
|
||||
table.insert(intf.radio_mesh, 'mesh_' .. radio_name)
|
||||
end)
|
||||
|
||||
if pcall(function() require 'gluon.mesh-vpn' end) then
|
||||
local vpn_core = require 'gluon.mesh-vpn'
|
||||
|
||||
if vpn_core.enabled() then
|
||||
-- mesh_vpn is a interface that has the right ifname
|
||||
-- we can't use mesh-vpn (dash instead of underscore) since it's not a uci interface
|
||||
table.insert(intf.vpn_mesh, 'mesh_vpn')
|
||||
end
|
||||
end
|
||||
|
||||
table.insert(intf.wired_mesh, 'loopback')
|
||||
|
||||
local has_uplink_mesh = false
|
||||
local has_other_mesh = false
|
||||
|
||||
for _,i in pairs(mesh_interfaces) do
|
||||
if util.contains(uplink_interfaces, i) then
|
||||
has_uplink_mesh = true
|
||||
else
|
||||
has_other_mesh = true
|
||||
end
|
||||
end
|
||||
|
||||
if has_uplink_mesh then
|
||||
table.insert(intf.wired_mesh, 'mesh_uplink')
|
||||
end
|
||||
|
||||
if has_other_mesh then
|
||||
table.insert(intf.wired_mesh, 'mesh_other')
|
||||
end
|
||||
|
||||
uci:delete_all('olsrd2', 'interface')
|
||||
|
||||
if site.mesh.olsrd.v2.enable(true) then
|
||||
os.execute('/etc/init.d/olsrd2 enable')
|
||||
|
||||
local addrs = { }
|
||||
local lan = { }
|
||||
local cfg = site.mesh.olsrd.v2
|
||||
local config = uci:get_first("olsrd2", "olsrv2")
|
||||
|
||||
-- set global config
|
||||
local olsr2Config = {
|
||||
failfast = 'no',
|
||||
pidfile = '/var/run/olsrd2.pid',
|
||||
lockfile = '/var/lock/olsrd2'
|
||||
}
|
||||
|
||||
local extraConf = cfg.config()
|
||||
if extraConf then
|
||||
for k, _ in pairs(extraConf) do
|
||||
olsr2Config[k] = extraConf[k]
|
||||
end
|
||||
end
|
||||
|
||||
uci:delete_all('olsrd2', 'global')
|
||||
uci:section('olsrd2', 'global', 'global', olsr2Config)
|
||||
|
||||
uci:delete_all('olsrd2', 'telnet')
|
||||
uci:section('olsrd2', 'telnet', 'telnet', {
|
||||
|
||||
})
|
||||
|
||||
uci:delete_all('olsrd2', 'http')
|
||||
uci:section('olsrd2', 'http', 'http', {
|
||||
|
||||
})
|
||||
|
||||
if cfg.lan() then
|
||||
lan = cfg.lan()
|
||||
end
|
||||
|
||||
table.insert(addrs, '-127.0.0.1/8')
|
||||
table.insert(addrs, '-::1/128')
|
||||
|
||||
table.insert(addrs, 'default_accept')
|
||||
|
||||
uci:set("olsrd2", config, "originator", addrs)
|
||||
uci:set("olsrd2", config, "lan", lan)
|
||||
|
||||
if #intf.wired_mesh then
|
||||
uci:section('olsrd2', 'interface', 'wired_mesh', {
|
||||
ifname = intf.wired_mesh,
|
||||
bindto = addrs,
|
||||
})
|
||||
end
|
||||
|
||||
if #intf.vpn_mesh then
|
||||
uci:section('olsrd2', 'interface', 'vpn_mesh', {
|
||||
ifname = intf.vpn_mesh,
|
||||
bindto = addrs,
|
||||
})
|
||||
end
|
||||
|
||||
if #intf.radio_mesh then
|
||||
uci:section('olsrd2', 'interface', 'radio_mesh', {
|
||||
ifname = intf.radio_mesh,
|
||||
bindto = addrs,
|
||||
})
|
||||
end
|
||||
|
||||
uci:section('olsrd2', 'interface', 'loopback', {
|
||||
ifname = { 'loopback' },
|
||||
bindto = addrs,
|
||||
})
|
||||
|
||||
uci:section('firewall', 'rule', 'allow_olsr2_mesh', {
|
||||
src = 'mesh',
|
||||
dest_port = '269',
|
||||
proto = 'udp',
|
||||
target = 'ACCEPT',
|
||||
})
|
||||
else
|
||||
-- site.mesh.olsrd.v2.enable false
|
||||
os.execute('/etc/init.d/olsrd2 disable')
|
||||
uci:delete('firewall', 'allow_olsr2_mesh')
|
||||
end
|
||||
uci:save('olsrd2')
|
||||
uci:save('firewall')
|
||||
uci:save('network')
|
@ -1,10 +0,0 @@
|
||||
#!/usr/bin/lua
|
||||
|
||||
local uci = require('simple-uci').cursor()
|
||||
local util = require 'gluon.util'
|
||||
|
||||
local networks = uci:get_list('firewall', 'drop', 'network')
|
||||
util.remove_from_set(networks, 'client')
|
||||
uci:set_list('firewall', 'drop', 'network', networks)
|
||||
|
||||
uci:save('firewall')
|
@ -1,6 +1,25 @@
|
||||
/* SPDX-FileCopyrightText: 2021, Aiyion <gluon@aiyionpri.me> */
|
||||
/* SPDX-FileCopyrightText: 2016, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/*
|
||||
Copyright (c) 2021, Aiyion <gluon@aiyionpri.me>
|
||||
Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include <respondd.h>
|
||||
|
||||
|
@ -1,5 +1,27 @@
|
||||
/* SPDX-License-Identifier: BSD-2-Clause */
|
||||
/* SPDX-FileCopyrightText: 2016, Matthias Schiffer <mschiffer@universe-factory.net> */
|
||||
/*
|
||||
Copyright (c) 2016, Matthias Schiffer <mschiffer@universe-factory.net>
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice,
|
||||
this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
|
||||
#include <respondd.h>
|
||||
@ -320,7 +342,7 @@ static struct json_object * get_mesh_vpn(void) {
|
||||
|
||||
ret = get_peer_group(mesh_vpn_fastd, peers);
|
||||
|
||||
end:
|
||||
end:
|
||||
json_object_put(site);
|
||||
json_object_put(status);
|
||||
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user