Compare commits

..

585 Commits

Author SHA1 Message Date
Mohd Husaam Mehdi
73055de3ea netmode: use distinct rule names, for correct datamodel entries 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
debeddd6c1 netmode: update docs 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
bfa4cc9f97 netmode: update affected data model files in post script 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
1498b5de62 netmode: avoid multiple filter entries in mcast config 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
1e2f548e03 netmode: use single base bridge for bridge-vlans 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
16eb5f12b6 netmode: update existing netmodes 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
4e88bee38b netmode: macoffset handling 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
ebba54c2bf netmode: firewall fixes 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
2ea7b64c76 netmode: misc fixes 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
85a8b2e1a0 netmode: update macvlan handling 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
a971260d42 netmode: ensure smooth restore of base UCI between netmode change 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
b761e667e4 netmode: remove redundant function call in advance mode 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
20eca0fcc9 netmode: fix firewall, mcast and dhcp config in advanced netmode 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
97ae9f1a46 netmode: allow specific untagged ports in advanced netmode 2025-12-23 17:58:08 +05:30
Mohd Husaam Mehdi
5101e40156 netmode: support proto and disabled modifier together 2025-12-23 17:58:08 +05:30
Sukru Senli
52e2f9b33e netmode: add advanced mode with bridge VLAN/QinQ and multi-service support 2025-12-23 17:58:08 +05:30
Amin Ben Romdhane
9c0ae45ea9 wifidmd: 1.4.10 2025-12-23 13:20:01 +01:00
Elena Vengerova
5ab944d42f libwifi: 7.22.11 2025-12-22 19:06:57 +04:00
Vivek Kumar Dutta
783857b0b3 icwmp: 9.10.12 2025-12-22 13:38:48 +05:30
Vivek Kumar Dutta
3a09f3b1bb xmppc: 2.2.15 2025-12-22 13:36:55 +05:30
Vivek Kumar Dutta
3370d6f4a8 dnsmngr: 1.0.21 2025-12-22 13:25:12 +05:30
Vivek Kumar Dutta
a8f81dc358 obuspa: fix compilation warnings with gcc-14 2025-12-22 13:17:44 +05:30
Xiaofeng Meng
dc670b2621 quickjs: added fPIC flag 2025-12-19 18:51:37 +05:30
Amin Ben Romdhane
83a5721b93 bbfdm: 1.18.18 2025-12-19 13:22:01 +01:00
Vivek Kumar Dutta
41f26348b9 obuspa: Fix compatibility with CMake4 2025-12-19 16:56:58 +05:30
Jakob Olsson
e36012bcc7 map-agent: 6.5.0.10 2025-12-18 16:30:00 +01:00
Andreas Gnau
c2f1103417 rulengd: Set PKG_MIRROR_HASH:=skip
There are differences in tar generation between OpenWrt 23.05 and 25.12.
This hash had been added automatically by the version-bump script
update_git_source_package.sh from maintainer-tools.  This causes the
build to fail on later OpenWrt versions such as 25.12. For now, skip
hash verification. Once we have moved to 25.

For now, we have multiple choices:
* backport changes done to tarball generation to 23.05-based OpenWrt
  branch
* only update hashes using OpenWrt 25.12 based branch (23.05-based
  branch will happily ignore and redownload in such cases, which is not
  an issue as long as we do not upload those tarballs
* use skip for now and do not use bump-script from OpenWrt and only
  adopt using proper hashes when we have moved to OpenWrt 25.12

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-18 14:10:58 +01:00
Andreas Gnau
248c8fe510 obudpst: fix compatibility with CMake 4
CMake 4 has dropped compatibility with old versions < 3.5, and will
drop compatibility for < 3.10 in the future. Update the minimum required
CMake version accordingly.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-18 13:01:43 +01:00
Amin Ben Romdhane
c61e80db94 decollector: 6.2.3.9 2025-12-18 12:37:50 +01:00
Amin Ben Romdhane
d7fe821608 wifidmd: 1.4.9 2025-12-18 10:59:42 +01:00
Jakob Olsson
8dae05642a map-controller: 6.4.5.0 2025-12-17 17:39:43 +01:00
Olga Kitaina
77914bbb43 treewide: use gzip-compressed tarballs if git isn't used
Packages that use tarballs as the primary download method cannot
change from gzip to zstd without upstream providing that zstd.
For packages that use https://github.com/*/*/archive/ directly,
without dl_github_archive, only .tar.gz or .zip can be used.
This reverts part of 454dda3433 (treewide: change to zstd tarballs,
2025-12-15) for packages umoci, ndt, skopeo.

Fixes: 454dda3433 ("treewide: change to zstd tarballs")
2025-12-17 16:45:32 +04:00
Andreas Gnau
00f31bb4ba sysmngr: update to Git HEAD (2025-12-15)
60bc2108b5ec processes: include libgen.h for basename

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-16 17:00:40 +01:00
Andreas Gnau
2de38cd3c4 icwmp: update to Git HEAD (2025-12-15)
e672f84d9580 cmake: Fix compat with CMake 4

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-16 17:00:40 +01:00
Andreas Gnau
d4f437c6c1 bbfdm: update to Git HEAD (2025-12-15)
e883c4c69bd1 cmake: Fix compat with CMake 4
df25ff7ce0e4 libbbfdm-api: proper parenthesis in macros

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-16 17:00:39 +01:00
Andreas Gnau
088df53f81 rulengd: update to Git HEAD (2025-12-15)
a19175a70da4 cmake: Fix compat with CMake 4

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-16 16:53:53 +01:00
Andreas Gnau
2887f4053a sulu-builder: use gzip-compressed tarballs
Sulu-builder relies on a tar.gz being present on download.iopsys.eu
which is pushed there by some pipeline.
This reverts part of 454dda3433 (treewide: change to zstd tarballs,
2025-12-15) for the sulu-builder package.

Fixes: 454dda3433 ("treewide: change to zstd tarballs")
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-16 13:29:41 +01:00
Andreas Gnau
454dda3433 treewide: change to zstd tarballs
Change to zstd compressed instead of gz-compressed tarballs. zstd
compresses 7-8 times faster and decompresses 2-3 times faster.

This change also make sharing tarballs between different branches
possible, because OpenWrt 25.12 uses zstd as default.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-12-15 17:04:02 +01:00
Janusz Dziedzic
74577dd729 wifimngr: 20.2.0 2025-12-15 10:08:40 +00:00
Amin Ben Romdhane
6effe4023e wifidmd: 1.4.8 2025-12-12 13:13:56 +01:00
Reidar Cederqvist
bb3adc86ff sulu update to version 5.3.10 2025-12-12 11:54:56 +01:00
Reidar Cederqvist
82a32a7731 sulu: update to version 5.3.9 2025-12-12 11:54:56 +01:00
Amin Ben Romdhane
f0f18ed780 wifidmd: 1.4.7 2025-12-11 16:58:58 +01:00
Jakob Olsson
677357d997 map-agent: 6.5.0.9 2025-12-10 13:19:57 +01:00
Jakob Olsson
fa608bc23b map-controller: 6.4.4.16 2025-12-10 13:19:17 +01:00
Jakob Olsson
563a5d03b8 iee1e905: 8.7.44 2025-12-10 13:17:33 +01:00
Husaam Mehdi
b1b432d852 Revert "iopsys-analytics: run non-threaded fluent-bit input plugins"
This reverts commit 61bda623ca
2025-12-10 14:41:49 +05:30
Jakob Olsson
fe06c8515f map-controller: 6.4.4.15 2025-12-09 17:17:58 +01:00
Vivek Kumar Dutta
9101095a0a parental-control: 1.4.6 2025-12-09 18:20:27 +05:30
Husaam Mehdi
2bd4c0c236 sshmngr: generate pam config and add MFA support 2025-12-09 17:45:58 +05:30
Mohd Husaam Mehdi
61bda623ca iopsys-analytics: run non-threaded fluent-bit input plugins 2025-12-09 13:44:46 +05:30
Suvendhu Hansa
e2eaf6221a tr143: per connection upload test using fast path 2025-12-09 12:27:44 +05:30
Vivek Kumar Dutta
82183e9e3b parental-control: disable urlfilter by default 2025-12-08 21:58:50 +05:30
Vivek Kumar Dutta
edfbcb1074 Revert "parental-control: disable urlfilter by default"
This reverts commit 5af1df3493.
2025-12-08 21:45:01 +05:30
Vivek Kumar Dutta
5af1df3493 parental-control: disable urlfilter by default 2025-12-08 20:56:21 +05:30
Jakob Olsson
3ec6c21456 map-controller: 6.4.4.14 2025-12-08 16:09:18 +01:00
Reidar Cederqvist
9d251b5d9d sulu: update to version 5.3.8
(cherry picked from commit 54f08fc89b)

Co-authored-by: Reidar Cederqvist <reidar.cederqvist@genexis.eu>
2025-12-08 14:38:37 +00:00
Amin Ben Romdhane
a3e4a0f6e9 map-controller: uci-defaults: Assign unique ID to qos_rule sections 2025-12-08 14:17:20 +01:00
Vivek Dutta
d5044df134 parental-control: read urlbundle definition from json 2025-12-08 18:07:13 +05:30
Jakob Olsson
cef4d4efea ieee1905: 8.7.43 2025-12-08 12:17:06 +01:00
Jakob Olsson
1f093159d8 map-agent: 6.5.0.8 2025-12-08 11:14:57 +01:00
Vivek Kumar Dutta
22e6d80384 bbfdm: 1.18.16 2025-12-08 12:21:10 +05:30
Sukru Senli
fe1bf101c3 sulu: 5.3.7 2025-12-07 11:11:12 +01:00
Reidar Cederqvist
24c30a098e sulu: update to version 5.3.6 2025-12-05 18:53:16 +01:00
Sukru Senli
a0c1801511 netmode: fallback to checking usr_data if /opconf/opconf.json is not available 2025-12-05 17:24:09 +01:00
Reidar Cederqvist
59e7ece054 sulu: update to version 5.3.5 2025-12-05 17:00:22 +01:00
Jakob Olsson
cb9825504d Revert "map-agent: 6.5.0.8"
This reverts commit 3158f92912.
2025-12-05 16:26:44 +01:00
Jakob Olsson
628331c808 Revert "map-controller: 6.4.4.14"
This reverts commit 9bb0da51cf.
2025-12-05 16:26:43 +01:00
Reidar Cederqvist
229f62a906 sulu: update to version 5.3.4 2025-12-05 15:24:31 +01:00
Vivek Kumar Dutta
034bd7e8b2 sysmngr: 1.1.6 2025-12-05 18:32:51 +05:30
Vivek Kumar Dutta
c594a4957f tr143: 1.1.12 2025-12-05 18:13:04 +05:30
Vivek Kumar Dutta
5fd540d5ba bbfdm: increase IPC max len to 20M 2025-12-05 16:10:38 +05:30
Vivek Kumar Dutta
64fcaaadc7 userinterface: Use FirstLogin as false, if not set 2025-12-05 15:20:45 +05:30
Vivek Dutta
64f4ceda35 netmode: clean all vlans before creating new ones 2025-12-05 14:37:31 +05:30
Vivek Kumar Dutta
0485c372bd dnsmngr: Fix DNS Client Interface reference 2025-12-05 14:12:31 +05:30
Suvendhu Hansa
155b4fe2b3 netmode: fix lowerlayers on mode change 2025-12-04 21:16:33 +05:30
Vivek Kumar Dutta
cf573d3fad logmngr: fix typo
(cherry picked from commit d39b3ebaa4)
2025-12-04 20:01:21 +05:30
Sukru Senli
09aa9746d5 netmode: remove wan6 for pppoe and static modes 2025-12-04 19:50:23 +05:30
Vivek Kumar Dutta
e56ad858aa tr143: 1.1.11 2025-12-04 19:42:14 +05:30
Vivek Dutta
362bb8b1cf logmngr: reload fluent-bit on ntp sync event (via hotplug)
(cherry picked from commit bdc435c392)

Co-authored-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
2025-12-04 19:41:25 +05:30
Jakob Olsson
9bb0da51cf map-controller: 6.4.4.14 2025-12-04 15:08:46 +01:00
Jakob Olsson
3158f92912 map-agent: 6.5.0.8 2025-12-04 14:23:07 +01:00
Vivek Kumar Dutta
2847fdd2c2 dhcpmngr: vendor extn to set name with static lease
(cherry picked from commit 9aa6878efc)
2025-12-04 18:45:48 +05:30
Reidar Cederqvist
bde6e11169 sulu: update to versiohn 5.3.3 2025-12-04 14:08:08 +01:00
Vivek Kumar Dutta
543ba2ac7a hostmngr: add uniqueness check for name extn 2025-12-04 18:25:32 +05:30
Vivek Kumar Dutta
c02548298d tr143: 1.1.10 2025-12-04 18:23:37 +05:30
Xiaofeng Meng
0f03e3ae70 dmcli: v1.9.6 2025-12-04 16:48:59 +05:30
Amin Ben Romdhane
2c4307f83a decollector: 6.2.3.8 2025-12-04 11:24:50 +01:00
Suvendhu Hansa
98925cc464 netmode: Fix missing IP interface after wan mode change 2025-12-04 14:12:31 +05:30
Vivek Kumar Dutta
d8d2d0090b dhcpmngr: Fix clinet info on lan ip change 2025-12-04 09:32:12 +05:30
Suvendhu Hansa
2fc98ac307 tr143: Added support of NumberOfConnection for airoha download test 2025-12-03 18:34:57 +05:30
Suvendhu Hansa
98f5e19916 netmode: Fix switching wan mode from pppoe to other modes 2025-12-03 17:33:48 +05:30
Vivek Kumar Dutta
e8da3d1cd7 sysmngr: 1.1.5 2025-12-03 15:11:01 +05:30
Vivek Kumar Dutta
4112fbd17c dmcli: align with usp-js version 2025-12-03 09:51:12 +05:30
Vivek Kumar Dutta
26f202edb7 usp-js: 1.2.10 2025-12-03 09:35:39 +05:30
Amin Ben Romdhane
67b4ba0301 decollector: 6.2.3.7 2025-12-02 17:22:04 +01:00
Jakob Olsson
68fb3bea32 libdpp: 2.1.3 2025-12-02 12:46:52 +01:00
Meng
c0a1139764 dmcli: v1.9.5 2025-12-02 10:08:10 +01:00
Vivek Kumar Dutta
39f30cd31a sysmngr: use sysfs for TemperatureStatus 2025-12-02 13:59:21 +05:30
Vivek Kumar Dutta
ac78f69136 bbfdm: improve generic browse logic to skip dirty sections 2025-12-02 10:41:04 +05:30
Anjan Chanda
f72d4e35d0 usp-js: fix build 2025-12-02 10:04:26 +05:30
Vivek Kumar Dutta
e5fc33e941 obuspa: 10.0.7.10 2025-12-02 08:56:33 +05:30
Mohd Husaam Mehdi
5faab025cc libqos: econet fix proc file for downstream queue 2025-12-02 08:50:30 +05:30
Jakob Olsson
7a62843c29 map-agent: 6.5.0.7 2025-12-01 16:13:34 +01:00
Vivek Kumar Dutta
b0d2b10055 Revert "libqos: econet fix proc file for downstream queue"
This reverts commit 7129b55362.
2025-12-01 16:58:32 +05:30
Husaam Mehdi
7129b55362 libqos: econet fix proc file for downstream queue 2025-12-01 15:02:44 +05:30
Mohd Husaam Mehdi
6662f27493 logmngr: set coro_stack_size 1MB by default
according to libco documentation: "Heapsize is the amount of
memory allocated for the cothread stack, specified in bytes. This
is unfortunately impossible to make fully portable. It is
recommended to specify sizes using `n * sizeof(void*)'. It is
better to err on the side of caution and allocate more memory than
will be needed to ensure compatibility with other platforms,
within reason. A typical heapsize for a 32-bit architecture is
~1MB.", so we follow this advice in hopes of reducing crashes.
2025-12-01 12:47:04 +05:30
Vivek Kumar Dutta
b42c0201cf dhcpmngr: 1.1.4 2025-12-01 11:19:34 +05:30
Jakob Olsson
d626a673b5 map-agent: 6.5.0.6 2025-11-28 15:04:36 +01:00
Vivek Dutta
18a5f6ca5b sulu: fix mosquitto acl permission
(cherry picked from commit 9ccae677a6)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-11-28 19:10:03 +05:30
Amin Ben Romdhane
97045b2d39 decollector: 6.2.3.6 2025-11-28 12:58:58 +01:00
Reidar Cederqvist
8475fa81bc sulu: update to version 5.3.2 2025-11-28 12:05:45 +01:00
Vivek Dutta
e67f2bbcf7 netmode: check mode from opconf in uci-default
(cherry picked from commit fe7a0b7d0c)

12c8a916 netmode: check mode from opconf.json in uci-default

Co-authored-by: Vivek Dutta <vivek.dutta@iopsys.eu>
2025-11-28 15:57:28 +05:30
Vivek Kumar Dutta
a3d7280423 obuspa: Fix schema registration 2025-11-28 13:49:03 +05:30
Amin Ben Romdhane
61de08f440 decollector: 6.2.3.5 2025-11-27 17:04:20 +01:00
Amin Ben Romdhane
05ecde4f55 wifidmd: 1.4.6 2025-11-27 16:58:51 +01:00
Reidar Cederqvist
55c3233739 sulu: update to version 5.3.1 2025-11-27 16:27:04 +01:00
Vivek Dutta
6e9a38beac obuspa: Fix segfault while getting endpointid 2025-11-27 20:11:42 +05:30
Amin Ben Romdhane
fea9e4de88 wifidmd: Update the handling of Multi-AP Mode vendor extension 2025-11-27 14:13:52 +00:00
Jakob Olsson
ceb5a9f2e4 map-agent: 6.5.0.5 2025-11-27 12:03:22 +01:00
Vivek Kumar Dutta
cb8623a862 netmngr: 1.2.4 2025-11-27 14:28:45 +05:30
Vivek Dutta
c6672e3cf0 self-diagnostics: fix datamodel access
(cherry picked from commit ab5e3a42b9)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-11-27 14:21:59 +05:30
Amin Ben Romdhane
75d0b18f09 wifidmd: 1.4.5 2025-11-27 09:32:02 +01:00
Reidar Cederqvist
806f685d74 sulu: Update sulu to version 5.3.0 2025-11-26 16:42:55 +01:00
Jakob Olsson
e412cfa36d map-agent: 6.5.0.4
This time with the correct package hash
2025-11-26 15:30:00 +01:00
Jakob Olsson
55967685ef Revert "map-agent: 6.5.0.4"
This reverts commit 6fb90643c7.
2025-11-26 15:29:22 +01:00
Sukru Senli
3655ae9d79 mosquitto-auth-plugin: add SIGHUP support for dynamic ACL reload
Enable dynamic reloading of subnet ACL configuration via SIGHUP signal
  without disconnecting clients. Register MOSQ_EVT_RELOAD callback to
  reload ACL rules when mosquitto receives SIGHUP.
2025-11-26 10:47:27 +01:00
George Yang
d526ee41cd voicemngr-1.2.5 and dectmngr-3.7.13
Fix incorrect missed call entry generated in DECT call list
2025-11-25 16:25:33 +01:00
Vivek Kumar Dutta
c7315af615 bbfdm: 1.18.14 2025-11-25 19:29:02 +05:30
Vivek Kumar Dutta
4d414af657 netmode: 1.1.10
(cherry picked from commit e97d29ed6b)
2025-11-25 18:42:48 +05:30
Vivek Kumar Dutta
074e0c1cd1 dhcpmngr: 1.1.3 2025-11-25 17:44:07 +05:30
Vivek Kumar Dutta
6b81616883 netmngr: 1.2.3 2025-11-25 17:36:44 +05:30
Amin Ben Romdhane
ee3144f736 bbfdm: update critical_services to use new dmmap DHCPv4/DHCPv6 paths 2025-11-25 12:36:35 +01:00
Mohd Husaam Mehdi
c96eceed2d ethmngr: add support to set MTU for Ethernet.Link. 2025-11-25 16:21:30 +05:30
Amin Ben Romdhane
dac23ee614 decollector: 6.2.3.4 2025-11-25 11:18:33 +01:00
Amin Ben Romdhane
cc312af2f3 ieee1905: 8.7.42 2025-11-25 11:17:26 +01:00
Amin Ben Romdhane
e506f6462c bbfdm: 1.18.13 2025-11-25 11:15:57 +01:00
Jakob Olsson
6fb90643c7 map-agent: 6.5.0.4 2025-11-24 16:58:09 +01:00
Markus Gothe
7e82a1c907 libqos: econet: Add 'pon' interface support. 2025-11-24 15:51:03 +01:00
Vivek Kumar Dutta
9bf94f688c netmngr: 1.2.2 2025-11-21 20:10:23 +05:30
Elena Vengerova
ebf0e949b4 libwifi: 7.22.10; map-agent: 6.5.0.3 2025-11-21 16:06:08 +04:00
Elena Vengerova
2766fef0c3 map-agent: use different prefixes for AP and STA MLD objects 2025-11-21 12:01:40 +00:00
Amin Ben Romdhane
a73cd73fe1 decollector: 6.2.3.3 2025-11-21 12:10:29 +01:00
Amin Ben Romdhane
0df826868a wifidmd: 1.4.4 2025-11-21 12:06:27 +01:00
Vivek Kumar Dutta
2ed0a4ec01 bridgemngr: fix SSID reference in lowerlayers 2025-11-21 16:30:40 +05:30
Reidar Cederqvist
944ef75d57 sulu: update to version 5.2.12 2025-11-20 18:36:52 +01:00
Vivek Dutta
b3cfbc8536 netmode: reboot to apply mode change 2025-11-20 18:36:48 +01:00
Vivek Kumar Dutta
36928bdcb9 netmode: 1.1.9 2025-11-20 20:23:26 +05:30
Vivek Kumar Dutta
b8634e5bec sysmngr: 1.1.3 2025-11-20 19:02:29 +05:30
Vivek Kumar Dutta
a0ba20647d dmcli-plugins: 2.2.6 2025-11-20 13:59:32 +05:30
Vivek Kumar Dutta
642544f579 dmcli: 1.9.4 2025-11-20 13:59:03 +05:30
Jakob Olsson
f71042d2eb map-agent: 6.5.0.2 2025-11-19 17:28:19 +01:00
Jakob Olsson
40c9c7ac7c map-controller: 6.4.4.13 2025-11-19 16:59:20 +01:00
Jakob Olsson
f9a046f0b4 map-agent: 6.5.0.1 2025-11-19 12:24:33 +01:00
Mohd Husaam Mehdi
a7ea8701b9 bridgemngr: option to copy pbit from cvlan to svlan 2025-11-19 16:10:50 +05:30
Jakob Olsson
718fde966f map-controller: 6.4.4.12 2025-11-19 10:17:54 +01:00
Vivek Kumar Dutta
e198ed73c7 parental-control: remove dhcp.leases from keep.d
(cherry picked from commit 92b0d5aed2)
2025-11-19 14:31:36 +05:30
Husaam Mehdi
5e7a131b64 parentalcontrol: remove dhcp.leases usages & add HostRef dm 2025-11-19 12:40:59 +05:30
Jakob Olsson
7816cc1e49 map-agent: 6.5.0.0 2025-11-18 17:51:49 +01:00
Reidar Cederqvist
28d70c56c8 sulu: update to version 5.2.11 2025-11-18 12:31:07 +01:00
Vivek Kumar Dutta
2c9a35eb8c logmngr: prepone to start before most of the apps 2025-11-18 12:50:04 +05:30
Vivek Kumar Dutta
0779d9f121 netmngr: align active port refreshing with cwmp sessions 2025-11-18 10:25:55 +05:30
Vivek Kumar Dutta
afa5f38654 icwmp: publish session status 2025-11-18 10:25:54 +05:30
Amin Ben Romdhane
1eeb06fd36 decollector: 6.2.3.2 2025-11-17 16:43:06 +01:00
Reidar Cederqvist
d64bf6ceea sulu: update to version 5.2.10 2025-11-14 14:11:55 +01:00
Vivek Kumar Dutta
c28f5afe45 dhcpmngr: fix setting DNSServer option 2025-11-14 18:02:04 +05:30
Vivek Dutta
1ed383bee7 sulu: Fix overriding config
(cherry picked from commit 5b5a9bb231)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-11-13 23:13:50 +05:30
Reidar Cederqvist
8236cd4093 sulu: update to version 5.2.9 2025-11-13 17:31:33 +01:00
Reidar Cederqvist
46a09d8f8d sulu: update to version 5.2.8 2025-11-13 17:31:24 +01:00
Vivek Kumar Dutta
61c7afe582 obuspa: 10.0.7.7
(cherry picked from commit d39d28e6d8)
2025-11-13 19:22:12 +05:30
Jakob Olsson
258449fc11 map-agent: 6.4.3.11 2025-11-13 14:04:58 +01:00
Amin Ben Romdhane
f5db3d3d45 decollector: 6.2.3.1 2025-11-13 12:46:22 +01:00
Jakob Olsson
a0c6545534 map-plugins: 1.2.7 2025-11-12 17:02:30 +01:00
Jakob Olsson
96d18ad234 map-controller: 6.4.4.11 2025-11-12 17:00:45 +01:00
George Yang
18c9bef5f8 libvoice-airoha: 1.1.8 and dectmngr: 3.7.12
For Airoha: fix no audio on DECT caused by Airoha 2025Q2 SDK
2025-11-12 12:49:39 +01:00
Vivek Kumar Dutta
bd3b904c15 usermngr: 1.4.7 2025-11-12 17:02:31 +05:30
Suvendhu Hansa
350ced4c32 usermngr: fix passwdqc options 2025-11-12 16:52:27 +05:30
Vivek Kumar Dutta
b4e735e731 hostmngr: 1.4.2 2025-11-12 15:52:22 +05:30
Jakob Olsson
e96e2328a7 map-agent: 6.4.3.10 2025-11-11 17:43:58 +01:00
Jakob Olsson
c8c6b5ab4b map-agent: 6.4.3.9 2025-11-11 15:21:10 +01:00
Vivek Kumar Dutta
9bd7e17835 dhcpmngr: 1.1.1 2025-11-11 19:12:06 +05:30
Vivek Kumar Dutta
fa703437e1 hostmngr: update hostname on dhcp renew 2025-11-11 18:58:00 +05:30
Vivek Kumar Dutta
cfc335aed8 sysmngr: rename restart option to reboot in upgrade 2025-11-11 18:50:35 +05:30
Vivek Kumar Dutta
1139c21f34 sysmngr: fwbank option to restart with upgrade 2025-11-11 18:37:28 +05:30
Markus Gothe
6af6728603 obuspa: Don't add empty whitespace to reqopts. 2025-11-11 13:40:32 +01:00
Vivek Kumar Dutta
5a208be259 firewallmngr: align internal port with external port range 2025-11-11 14:11:21 +05:30
Vivek Kumar Dutta
8764f317d0 dhcpmngr: align with dmmap schema 2025-11-11 12:09:45 +05:30
Vivek Kumar Dutta
c2e9144819 icwmp: DHCP re-discovery if ACS not reachable 2025-11-11 11:18:32 +05:30
Vivek Kumar Dutta
fc9f946be7 sysmngr: update fwbank cache on sysupgrade event 2025-11-11 11:04:38 +05:30
Markus Gothe
2aed4dc8f5 qosmngr: Refine fix for QoS on EN7523.
It seems like it is the rules conflicting
and not the overflow itself causing the
issue. Disable the use of custom IFC
rules on EN7523.
2025-11-11 00:48:00 +01:00
Markus Gothe
ce1b42e095 qosmngr: airoha: Fix QoS issue with EN7523+IFC.
When the LUT1 IFC table overflows it seems to
affect tagged TCP-based VLAN traffic and
ingress flows are not properly setup in HW NAT.
2025-11-10 19:25:28 +01:00
Vivek Kumar Dutta
8fee332f4c dnsmngr: Fix interface references 2025-11-10 21:49:51 +05:30
Jakob Olsson
ca78501dba map-agent: set START order 97
Map-agent init.d script sets up the appropriate UCI configurations, and must run before map-controller with start order 98
2025-11-10 15:13:20 +01:00
Amin Ben Romdhane
9280ddd093 libeasy: 7.5.1 2025-11-10 13:11:15 +01:00
Amin Ben Romdhane
15563ca117 map-plugins: 1.2.6 2025-11-10 13:09:41 +01:00
Amin Ben Romdhane
0718730d6b wifidmd: add timing-based wait logic to detect completion of wifi reload 2025-11-10 12:04:22 +00:00
Vivek Kumar Dutta
f9ad16934c sysmngr: fallback to full backup if usr_data partition missing 2025-11-10 17:21:36 +05:30
Jakob Olsson
966dbd6038 ieee1905: 8.7.41 2025-11-07 17:55:19 +01:00
Reidar Cederqvist
b1809e6993 sulu: update to version 5.2.7 2025-11-07 16:55:09 +01:00
Jakob Olsson
ad8b8b2a55 map-controller: 6.4.4.10 2025-11-07 16:15:52 +01:00
Jakob Olsson
6bf1cae138 map-agent: 6.4.3.8 2025-11-07 16:15:13 +01:00
Vivek Kumar Dutta
92c3d6d721 firewallmngr: support for RemainingLeaseTime in NAT 2025-11-07 11:30:38 +05:30
Amin Ben Romdhane
853a0c840c wifidmd: 1.4.3 2025-11-06 13:08:55 +01:00
Jakob Olsson
49bcef77aa ieee1905: 8.7.40 2025-11-06 12:37:16 +01:00
Anjan Chanda
fa8e9fc3ef decollector: 6.2.3.0 2025-11-06 12:27:22 +01:00
Anjan Chanda
e3eec0d7ab libwifi: 7.22.9 2025-11-06 11:35:03 +01:00
Sukru Senli
74339e6216 netmode: set MTU on WAN device section 2025-11-05 16:14:55 +01:00
Sukru Senli
8197f9ad93 netmode: expose MTU as supported argument for PPPoE 2025-11-05 16:14:52 +01:00
Vivek Kumar Dutta
1f96c3d295 sysmngr: 1.1.1 2025-11-05 15:47:15 +05:30
Vivek Kumar Dutta
d1d57ca528 icwmp: 9.10.8 2025-11-05 15:46:26 +05:30
Amin Ben Romdhane
10428fbda0 wifimngr: 20.1.9 2025-11-05 10:47:59 +01:00
Amin Ben Romdhane
8e5d4c53ff decollector: 6.2.2.8 2025-11-05 10:46:51 +01:00
Amin Ben Romdhane
1fb22dfe8c wifidmd: 1.4.2 2025-11-05 10:45:39 +01:00
Vivek Kumar Dutta
99fe2c2b2a icwmp: align with opconf 2025-11-04 21:27:46 +05:30
Vivek Kumar Dutta
c153911acf sysmngr: align with opconf 2025-11-04 20:16:07 +05:30
Vivek Kumar Dutta
31cd59b33c obuspa: 10.0.7.6 2025-11-03 22:00:43 +05:30
Jakob Olsson
21e6193e0a map-agent: 6.4.3.7 2025-11-03 17:00:56 +01:00
Jakob Olsson
3af94e2180 map-controller: 6.4.4.9 2025-11-03 17:00:29 +01:00
Filip Matusiak
df91d06078 map-plugins: allow for local compile 2025-11-03 12:35:17 +01:00
Vivek Kumar Dutta
ea090f50e1 icwmp: Support to install opconf 2025-11-03 11:33:42 +05:30
Amin Ben Romdhane
7df4486a43 decollector: 6.2.2.7 2025-10-31 10:28:18 +01:00
Amin Ben Romdhane
6818818127 decollector: 6.2.2.6 2025-10-30 16:39:00 +01:00
Amin Ben Romdhane
63c0fb7d3b ieee1905: 8.7.39 2025-10-30 16:37:41 +01:00
Jakob Olsson
2a38e7cd23 map-plugins: 1.2.5 2025-10-30 15:38:42 +01:00
Marina Maslova
8f6ae03e7e wifimngr: 20.1.8 2025-10-30 14:51:40 +04:00
Marina Maslova
fecbbe90af libwifi: 7.22.6 2025-10-30 14:51:15 +04:00
Roman Azarenko
fe1cdbd9bc iopsys-analytics: move iperf3 from default build to analytics
We're using `iperf3` for development and testing, so there is no need
to include it in the default firmware builds.
2025-10-30 09:43:51 +01:00
Vivek Kumar Dutta
67bf2c0227 bbfdm: 1.18.12 2025-10-30 11:06:53 +05:30
Jakob Olsson
307059d44b map-plugin: 1.2.4 2025-10-29 17:22:21 +01:00
Jakob Olsson
a8aa693e18 map-controller: 6.4.4.8 2025-10-29 17:12:27 +01:00
Reidar Cederqvist
53fc48997a Sulu: upgrade to version 5.2.2 2025-10-29 16:54:41 +01:00
Jakob Olsson
9e180eb2bf map-controller: set enable_bsta_steer to '1' by default 2025-10-29 16:40:30 +01:00
Jakob Olsson
b98ccac057 map-controler: 6.4.4.6 2025-10-29 13:47:51 +01:00
Jouni Ikonen
fb236949fc usermngr: json schema to validate the role acl 2025-10-29 15:53:04 +05:30
Erik Karlsson
5631c28df4 sulu: disregard client-provided X-Forwarded-For
This prevents clients from lying about their identity to the MQTT
broker by supplying their own X-Forwarded-For in the request.
2025-10-29 10:39:53 +01:00
Sukru Senli
8170684100 sulu: adapt to mosquitto-auth-shadow->mosquitto-auth-plugin change 2025-10-29 09:36:15 +00:00
Sukru Senli
332a35102d mosquitto-auth-plugin: add per-user subnet-based access control with IPv4/IPv6 support
- Implement whitelist/blacklist subnet filtering for MQTT users
- Add full IPv4 and IPv6 CIDR subnet matching support
- Check subnet restrictions during authentication (MOSQ_EVT_BASIC_AUTH)
- Reject login immediately if subnet check fails (return MOSQ_ERR_AUTH)
- Parse subnet ACL files via auth_opt_subnet_acl_file option
- Support multiple subnets per user (up to 32 allow + 32 deny rules)
- Support both IPv4 (e.g., 192.168.1.0/24) and IPv6 (e.g., 2001:db8::/32) CIDR notation
- Deny rules take precedence over allow rules for both IP versions
- Localhost (127.0.0.1 and ::1) always allowed
- Backward compatible: users without subnet rules are not affected
- Configuration format: 'subnet allow|deny <username> <cidr>'
- Integrates with existing shadow/PAM authentication and topic ACLs
2025-10-29 09:33:49 +00:00
Sukru Senli
ba5e332b0d rename mosquitto-auth-shadow to mosquitto-auth-plugin 2025-10-29 09:33:49 +00:00
Jakob Olsson
09560fb532 map-agent: 6.4.3.6 2025-10-28 16:37:17 +01:00
Janusz Dziedzic
c4cf8cb24b libwifi: 7.22.5 2025-10-28 15:14:29 +00:00
Amin Ben Romdhane
56c94f1ec6 decollector: 6.2.2.5 2025-10-28 14:30:03 +01:00
Amin Ben Romdhane
279fe9d291 bbfdm: 1.18.11 2025-10-28 14:26:50 +01:00
Vivek Kumar Dutta
924675d271 netmode: 1.1.8 2025-10-28 15:29:17 +05:30
Jakob Olsson
64cf5c7c9f map-controller: 6.4.4.5 2025-10-28 10:15:03 +01:00
Vivek Kumar Dutta
9fa9b1adbf sysmngr: Fix set_bootbank status 2025-10-28 13:51:43 +05:30
Jakob Olsson
9944917399 libwifi: 7.22.4 2025-10-27 17:30:35 +01:00
Amin Ben Romdhane
2a25fc0ec7 ieeee1905: 8.7.38 2025-10-27 17:12:52 +01:00
Jakob Olsson
ebd7e68714 map-controller: 6.4.4.4 2025-10-27 16:37:17 +01:00
Jakob Olsson
000762c0cb map-plugins: 1.2.2 2025-10-27 14:21:17 +01:00
Amin Ben Romdhane
c4328f411f decollector: 6.2.2.4 2025-10-24 14:32:49 +02:00
Vivek Kumar Dutta
0428934a69 bbfdm: 1.18.10 2025-10-24 16:30:02 +05:30
Erik Karlsson
580d24e04a logmngr: simplify default PID to 0 logic
Note that the "add" directive only adds if nothing is already present.
2025-10-24 10:28:37 +02:00
Mohd Husaam Mehdi
95778a4262 usermngr: added password expiry extension 2025-10-24 11:37:26 +05:30
Vivek Kumar Dutta
02ee448479 bbfdm: 1.18.9 2025-10-24 09:45:13 +05:30
Jakob Olsson
0dcc9743a2 map-agent: 6.4.3.5 2025-10-23 16:18:58 +02:00
Amin Ben Romdhane
1a1a1e1255 decollector: 6.2.2.3 2025-10-23 13:18:36 +02:00
Vivek Kumar Dutta
9710e46c51 obuspa: Fix group set method 2025-10-23 15:59:17 +05:30
Amin Ben Romdhane
19e69f7b61 decollector: 6.2.2.2 2025-10-23 11:18:47 +02:00
Mohd Husaam Mehdi
e319c85064 logmngr: set pid to 0 when it does not exist 2025-10-23 14:23:11 +05:30
Jakob Olsson
29638a28f7 map-agent: 6.4.3.4 2025-10-23 10:29:20 +02:00
Jakob Olsson
ccb337ecbd map-controller: 6.4.4.3 2025-10-23 10:27:39 +02:00
Amin Ben Romdhane
5474b1c6d0 wifidmd: 1.4.1: Move WiFi.DataElements Object to decollector 2025-10-22 12:40:46 +02:00
Amin Ben Romdhane
8df0ad8e46 decollector: 6.2.2.1: introduce WiFi.DataElements. tree 2025-10-22 12:40:34 +02:00
Jakob Olsson
6e358a6bd1 Revert "decollector: introduce data model"
This reverts commit 20a28db536.
2025-10-22 12:34:01 +02:00
Amin Ben Romdhane
20a28db536 decollector: introduce data model 2025-10-22 10:30:06 +00:00
Sukru Senli
c6ee9114bc netmode: skip obuspa restart 2025-10-22 08:58:33 +02:00
Sukru Senli
89fb4a0857 netmode: enable by default and auto-detect mode 2025-10-22 08:43:15 +02:00
Markus Gothe
8d86188ff1 obuspa: Fix spelling of log messages.
Abbrevations like UCI must be in capital letters.
Add correct punctation.
2025-10-21 16:27:34 +02:00
Jakob Olsson
18d6afea15 map-agent: 6.4.3.3 2025-10-21 10:41:58 +02:00
Vivek Kumar Dutta
0cb9aac1f1 userinterface: vendor extension for FirstLogin 2025-10-21 12:14:16 +05:30
Sukru Senli
dfe2af4643 netmode: fix static mode
and improve other modes
2025-10-20 16:45:09 +02:00
Amin Ben Romdhane
2fe133227d bbfdm: 1.18.8 2025-10-20 13:37:31 +02:00
Sukru Senli
15f17da6e5 netmode: add static mode and vlanid and dns servers as arguments to all modes 2025-10-20 12:52:39 +02:00
Vivek Kumar Dutta
2e56ef292c bbfdm:micro-services: Fix probable segfault during startup 2025-10-17 22:50:51 +05:30
Marina Maslova
65e4bebc0f libwifi: 7.22.3 2025-10-17 15:04:02 +04:00
Jakob Olsson
ceb577a6ab map-controller: config: add zerotouch, rate, bsteer plugins to default 2025-10-17 10:19:46 +02:00
Jakob Olsson
2d45a45126 map-agent: map_genconfig: add dpp_chirp section for 2.4GHz 2025-10-17 10:19:46 +02:00
Vivek Dutta
45294a9f0c usermngr: Only select shadow pam utils with security hardening
(cherry picked from commit 4e33db2700)

Co-authored-by: Vivek Kumar Dutta <vivek.dutta@iopsys.eu>
2025-10-17 11:19:59 +05:30
Jakob Olsson
eb5c837353 map-controller: 6.4.4.1 2025-10-16 16:37:54 +02:00
Vivek Kumar Dutta
495d95dcc8 icwmp: 9.10.5 2025-10-16 18:01:44 +05:30
Suvendhu Hansa
32e5dc46b3 usermngr: Vendor extension for Security Hardening parameters 2025-10-16 15:23:34 +05:30
Erik Karlsson
6980c1e2e5 ponmngr: use iopsys-environment for reading production data
U-Boot environment is kept as a fallback for legacy reasons.
2025-10-16 08:55:36 +00:00
Erik Karlsson
da727b4dc1 ponmngr: use get_mac_label to read MAC address 2025-10-16 08:55:36 +00:00
Vivek Kumar Dutta
d8aaacc4c9 obuspa: Optimize startup to avoid db corruption
- Force update values from uci on firmware update
- In case of reload(uci update), old sql db gets deleted and created from uci
- Use In memory sql journal mode
2025-10-16 12:30:35 +05:30
Vivek Kumar Dutta
e036702c16 wifidmd: align with bbfdm 2025-10-15 17:15:32 +05:30
Vivek Kumar Dutta
604a105bc9 usermngr: align with bbfdm 2025-10-15 17:15:32 +05:30
Vivek Kumar Dutta
04bdaa950f timemngr: align with bbfdm 2025-10-15 17:15:32 +05:30
Vivek Kumar Dutta
54fdaf2b43 sysmngr: align with bbfdm 2025-10-15 17:15:32 +05:30
Vivek Kumar Dutta
644e98e595 qosmngr: align with bbfdm 2025-10-15 17:15:31 +05:30
Vivek Kumar Dutta
9fc594d74f periodicstats: align with bbfdm 2025-10-15 17:15:31 +05:30
Vivek Kumar Dutta
ac7cfb581e parental-control: align with bbfdm 2025-10-15 17:15:31 +05:30
Vivek Kumar Dutta
ba75b33fc5 ethmngr: align with bbfdm 2025-10-15 17:15:31 +05:30
Vivek Kumar Dutta
912978164b bulkdata: align with bbfdm 2025-10-15 17:15:30 +05:30
Vivek Kumar Dutta
7a50c328e1 bbfdm: Fix typo in ubus APIs 2025-10-15 17:15:30 +05:30
Vivek Kumar Dutta
f8c9088db7 tr143: 1.1.8 2025-10-15 17:14:35 +05:30
Vivek Kumar Dutta
fd34c3e9f3 ethmngr: 3.1.1 2025-10-15 14:36:01 +05:30
Suvendhu Hansa
70d7d7a64d usermngr: Added password strength validation 2025-10-15 13:48:40 +05:30
Janusz Dziedzic
112f4cb99d wifimngr: 20.1.7 2025-10-15 05:48:52 +00:00
Jakob Olsson
2380a6de86 map-agent: 6.4.3.2 2025-10-14 17:22:30 +02:00
Filip Matusiak
b0c168322e self-diagnostics: get map-agent backhaul status 2025-10-14 16:12:41 +02:00
Filip Matusiak
22d8a0992c map-agent: 6.4.3.1 2025-10-14 16:12:33 +02:00
Janusz Dziedzic
3c075c293c wifimngr: 20.1.6 2025-10-13 16:25:56 +00:00
Suvendhu Hansa
17ae16e5d2 passwdqc: Install pwqcheck tool 2025-10-13 17:56:57 +05:30
Erik Karlsson
46dc9e86d8 logmngr: include pid when migrating also 2025-10-13 10:50:55 +02:00
Mohd Husaam Mehdi
0b3420240d logmngr: include pid in log output by fluent-bit 2025-10-10 19:33:27 +05:30
Jakob Olsson
83ca06b626 map-controller: 6.4.4.0: add ZEROTOUCH_DPP 2025-10-10 13:54:52 +02:00
Jakob Olsson
2dafb9ec2c map-plugin: 1.2.1 2025-10-10 13:53:33 +02:00
Jakob Olsson
c2c54e5ca0 map-agent: 6.4.3.0 2025-10-10 13:51:53 +02:00
Janusz Dziedzic
9314e4bbf3 wifimngr: 20.1.5 2025-10-10 08:42:29 +00:00
Janusz Dziedzic
5840332288 libwifi: 7.22.2 2025-10-10 08:42:29 +00:00
Anjan Chanda
bb4fffb680 map-plugins: 1.2.0 2025-10-10 09:06:56 +02:00
Marina Maslova
4b2b09080d map-agent: 6.4.2.4 2025-10-09 18:38:45 +04:00
Elena Vengerova
ba651b5457 libwifi: 7.22.1 2025-10-09 18:04:27 +04:00
Janusz Dziedzic
1509db0630 wifimngr: 20.1.4 2025-10-09 12:56:14 +00:00
Mohd Husaam Mehdi
85e97ca660 parental-control: improve bundle sync logic
* handle the case when interface comes up after parental-control
* handle the case when bundle size can't be fetched for some reason
2025-10-09 14:32:52 +05:30
Vivek Kumar Dutta
f9640bc237 tr143: workaround for download byte mismatch 2025-10-09 14:32:02 +05:30
Amin Ben Romdhane
72b16e33ab decollector: 6.2.1.13 2025-10-08 16:41:27 +02:00
Amin Ben Romdhane
4e81706967 wifidmd: 1.3.12 2025-10-08 16:10:09 +02:00
Anjan Chanda
483fc2e6cb wifimngr: 20.1.3 2025-10-08 12:14:47 +02:00
Mohd Husaam Mehdi
c2594f2d37 parental-control: fix handling of tcp and ipv6 based dns responses 2025-10-06 21:18:32 +05:30
Jakob Olsson
fb2eac485b map-agent: 6.4.2.3 2025-10-06 17:09:55 +02:00
Elena Vengerova
c867ab610e libwifi: 7.22.0 2025-10-06 15:14:13 +04:00
Janusz Dziedzic
ef8d667b83 wifimngr: 20.1.2 2025-10-06 08:42:34 +00:00
Mohd Husaam Mehdi
3934674c81 parental-control: config option for nfqueue number 2025-10-06 11:25:36 +05:30
Amin Ben Romdhane
4f53f35dc1 bbfdm: 1.18.5 2025-10-04 19:44:55 +02:00
Erik Karlsson
4fe815299a sulu: fix faulty ACL generation logic
Also remove leftovers from QR code generation and pointless uci_load

(cherry picked from commit 91dced7427)
2025-10-03 11:40:49 +02:00
Vivek Kumar Dutta
9394517727 sulu: Fix migration scripts
(cherry picked from commit 9a36c0310f)
2025-10-03 11:40:17 +02:00
Vivek Kumar Dutta
742b357026 obuspa: Skip overriding of uci in case of firstboot
(cherry picked from commit f317c67aed)
2025-10-03 11:37:42 +02:00
Jakob Olsson
d383896918 map-controller: 6.4.3.5 2025-10-03 09:55:47 +02:00
Jakob Olsson
646f5d6e1c map-plugins: 1.1.1 2025-10-03 09:55:46 +02:00
Jakob Olsson
d897632279 map-controller: 6.4.3.4 2025-10-02 16:51:01 +02:00
Janusz Dziedzic
47e93f13c1 wifimngr: 20.1.1 2025-10-02 13:13:15 +00:00
Janusz Dziedzic
70bb662514 libwifi: 7.21.0 2025-10-02 13:12:29 +00:00
Jakob Olsson
6f9ec4bf7d map-controller: 6.4.3.3 2025-10-02 13:20:33 +02:00
Janusz Dziedzic
fc88c554c1 libwifi: 7.20.9 2025-10-02 09:04:58 +00:00
Jakob Olsson
5ba6ade386 map-controller: 6.4.3.2 2025-10-02 09:38:23 +02:00
Jakob Olsson
0d1b585c5d map-controller: 6.4.3.1 2025-10-01 17:15:58 +02:00
Jakob Olsson
bf43efa993 map-agent: 6.4.2.2 2025-10-01 13:24:18 +02:00
Erik Karlsson
0e3545cacb timemngr: do not fail uci-defaults on keep-settings upgrade
(cherry picked from commit 22bded8f33)
2025-10-01 09:49:42 +02:00
Jakob Olsson
fefe14d540 map-agent: 6.4.2.1 2025-09-29 10:50:04 +02:00
Anjan Chanda
b6df14f78e map-agent: 6.4.2.0 2025-09-26 12:06:44 +02:00
Anjan Chanda
24cfbe2e48 map-plugins: 1.1.0 2025-09-26 12:06:44 +02:00
Jakob Olsson
eee28bb66c map-controller: 6.4.3.0 2025-09-26 09:46:59 +02:00
Mohd Husaam Mehdi
5fcee38906 ssdpd: add UPnPIGD param support in UPnP datamodel 2025-09-26 10:18:07 +05:30
Filip Matusiak
72a9da5bd3 map-controller: 6.4.2.10 2025-09-25 14:37:20 +02:00
Marina Maslova
2cf19c9469 libwifi: set mtk driver flags for mt7987a refboard 2025-09-23 14:28:47 +00:00
Janusz Dziedzic
bd0fed8409 libwifi: 7.20.8 2025-09-23 14:15:42 +00:00
Jakob Olsson
b23e510dd3 map-controller: config: add name to unique sections
channel_plan and sta_steering are unique sections, and should be named. Additionally added uci-default script to name the sections if missing
2025-09-23 11:49:12 +02:00
Suvendhu Hansa
bf06544066 wifidmd: use bbfdm external handler for sync after reloads 2025-09-23 14:01:17 +05:30
Vivek Kumar Dutta
85762b4641 bbfdm: execute sync handler if defined 2025-09-23 14:01:17 +05:30
Husaam Mehdi
60dafc2028 logmngr: Fix /dev/log permission to allow all processes to write 2025-09-22 18:57:28 +05:30
Suvendhu Hansa
e6054d9f8f icwmp: update dhcp on-boading
- disable dhcp_discovery once on-boarded
- Only allow `https` url through dhcp option 43
2025-09-22 12:56:25 +05:30
Anjan Chanda
8b106e6b58 wifimngr: 20.1.0 2025-09-22 09:08:44 +02:00
Vivek Kumar Dutta
41edb9f1a5 tr143: 1.1.6 2025-09-22 11:00:16 +05:30
Vivek Kumar Dutta
f6026298e8 bridgemngr: 1.1.4 2025-09-19 15:22:46 +05:30
Jakob Olsson
c3ab091cdc hostmngr: 1.4.0: bump version 2025-09-18 17:25:41 +02:00
Jakob Olsson
dcfca56db8 hostmngr: 1.3.2 2025-09-18 17:07:20 +02:00
Markus Gothe
991657fc99 dslmngr: airoha: Fix QoS uplink bandwidth monitor. 2025-09-17 19:41:36 +02:00
Markus Gothe
90f13664e9 qosmng: airoha: Don't flush HW NAT unless necessary. 2025-09-17 18:03:31 +02:00
Vivek Kumar Dutta
e843c83d0c tr104: Vendor extension for SIP bind Interface 2025-09-17 18:45:06 +05:30
Jakob Olsson
7d5c13a9f5 map-controller: 6.4.2.8: obsolete config option initial_channel_scan 2025-09-17 15:13:51 +02:00
Markus Gothe
417a5c5428 qosmngr: airoha: Fix uplink bandwidth calculation.
For lower speeds we need to adjust the bandwidth
calculation for QoS to work on AN7581 (but not on EN7523).

Also make sure we clear old HW NAT entries if the uplink
bandwidth changes for QoS to take effect immediaty.
2025-09-17 14:51:18 +02:00
Vivek Kumar Dutta
0074af0d3c bridgemngr: Fix deletion of ProviderBridge 2025-09-17 16:17:52 +05:30
Jakob Olsson
fae1f7d816 map-controller: 6.4.2.8 2025-09-17 12:21:04 +02:00
Janusz Dziedzic
f500a8c749 libwifi: 7.20.7 2025-09-17 06:20:24 +00:00
Janusz Dziedzic
af9e4f99c6 libwifi: 7.20.6 2025-09-17 06:19:08 +00:00
Vivek Kumar Dutta
e451e32f77 bridgemngr: 1.1.2 2025-09-16 16:53:42 +05:30
Vivek Kumar Dutta
26cbba9724 icwmp: 9.10.3 2025-09-16 16:12:07 +05:30
arbala
5be4e38c68 map-plugins: 1.0.32 2025-09-16 11:59:18 +02:00
arbala
549534f8aa map-controller: 6.4.2.7 2025-09-16 11:16:35 +02:00
arbala
f4a623e637 wifidmd: 1.3.10 2025-09-16 11:14:33 +02:00
Anjan Chanda
833a9a002a libwifi: 7.20.5 2025-09-16 10:38:59 +02:00
Erik Karlsson
ff4e68f70a fdtextract: fix CI pipeline
Argument parsing is also made more strict so that -z/--size cannot be
used together with other options.
2025-09-16 08:30:44 +00:00
Markus Gothe
b471113bfa qosmngr: airoha: Fix TCP ACK prioritization. 2025-09-15 15:57:06 +02:00
Markus Gothe
2b997a4386 qosmngr: airoha: flush HW NAT to directly apply changes. 2025-09-15 15:54:32 +02:00
Markus Gothe
06a280707a Revert "qosmngr: airoha: flush HW NAT to directly apply changes."
This reverts commit c54fd95889.
2025-09-15 15:51:50 +02:00
Markus Gothe
c54fd95889 qosmngr: airoha: flush HW NAT to directly apply changes. 2025-09-15 11:13:08 +02:00
Vivek Kumar Dutta
86fb3db75b bulkdata: 2.1.21 2025-09-15 12:38:19 +05:30
Vivek Kumar Dutta
70cda05eda usermngr: 1.4.1 2025-09-15 12:37:18 +05:30
Vivek Kumar Dutta
502aab4f3c periodicstats: 1.6.1 2025-09-15 12:35:04 +05:30
Vivek Kumar Dutta
34b63e84aa icwmp: 9.10.2 2025-09-15 12:32:18 +05:30
Vivek Kumar Dutta
5f2aa06285 bbfdm: Fix setting debug log_level 2025-09-15 12:29:59 +05:30
Suvendhu Hansa
5232cc61ac bbfdm: handle externally changed uci 2025-09-14 12:47:21 +05:30
Anjan Chanda
98d8e9866c map-plugins: 1.0.31 2025-09-12 17:02:49 +02:00
Vivek Kumar Dutta
0e59fd0d47 parental-control: 1.3.2 2025-09-11 15:03:46 +05:30
Anjan Chanda
a7e8e65d88 map-controller: 6.4.2.6 2025-09-11 10:45:06 +02:00
Suvendhu Hansa
1fd74364fa wifidmd: add external apply handler 2025-09-11 14:10:32 +05:30
Suvendhu Hansa
20c49302c1 bbfdm: add default apply handler 2025-09-11 13:59:47 +05:30
Anjan Chanda
c2e5ade3bb ieee1905: 8.7.37 2025-09-10 17:08:14 +02:00
Anjan Chanda
b933622547 map-plugins: 1.0.24 2025-09-10 17:06:16 +02:00
Reidar Cederqvist
7b12c29425 sulu: update to version 5.1.1 for IOWRT-7.6.0ALPHA2 2025-09-10 16:01:27 +02:00
Vivek Kumar Dutta
082452bfb5 mosquitto-auth-shadow: support libpam based authentication 2025-09-10 15:32:24 +05:30
Mohd Husaam Mehdi
a6b8987dac parental-control: only flush relevant connections using conntrack 2025-09-10 12:14:27 +05:30
Vivek Kumar Dutta
d1307bfd76 obuspa: Fix setting multiple params 2025-09-09 18:34:08 +05:30
Andreas Gnau
edd78f675e peripheral_manager: Remove
Remove peripheral_manager, it is no longer used or maintainted.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-09-09 13:23:06 +02:00
Janusz Dziedzic
3a1772e1b8 ieee1905: 8.7.36 2025-09-09 09:36:29 +00:00
Jakob Olsson
b2dd40cae3 map-controller: 6.4.2.2 2025-09-08 16:27:29 +02:00
Jakob Olsson
24f22d0ecc map-agent: 6.4.1.11 2025-09-08 13:59:36 +02:00
Jakob Olsson
a86f478014 map-controller: 6.4.2.1 2025-09-08 11:18:12 +02:00
Vivek Kumar Dutta
9a59ccc498 swmodd: Replace jq with jsonfilter 2025-09-06 15:14:24 +05:30
Vivek Kumar Dutta
15e4dd732a obuspa: 10.0.7.3 2025-09-06 09:57:18 +05:30
Husaam Mehdi
784a281fa6 logmngr: 1.1.4 2025-09-05 19:24:00 +05:30
Vivek Kumar Dutta
8f82b31658 obuspa: align with bbfdm 2025-09-05 19:10:41 +05:30
Vivek Kumar Dutta
3745b4e913 icwmp: align with bbfdm 2025-09-05 19:10:41 +05:30
Suvendhu Hansa
90d646319b bbfdm: update critical service config & dmmap path 2025-09-05 19:10:41 +05:30
Vivek Kumar Dutta
13064e27b3 bbfdm: Only commit changes done by datamodel 2025-09-05 19:10:41 +05:30
Vivek Kumar Dutta
539bf50985 ieee1905: 8.7.35 2025-09-05 18:42:16 +05:30
Anjan Chanda
1b7b377bd1 map-plugins: 1.0.18 - fix build when multiple plugins selected 2025-09-05 11:41:40 +02:00
Anjan Chanda
1c9ba1c83c map-plugins: 1.0.18 (bsteer) 2025-09-05 10:07:00 +02:00
Anjan Chanda
e307ee7aa8 map-controller: 6.4.2.0 2025-09-05 08:58:23 +02:00
Jakob Olsson
6bcf7987d7 map-agent: 6.4.1.10 2025-09-04 16:08:10 +02:00
Vivek Kumar Dutta
ff146bf093 tr104: 1.0.39 2025-09-04 18:32:44 +05:30
Vivek Kumar Dutta
0f23bee1da userinterface: Support for ISP info parameters 2025-09-04 18:06:03 +05:30
Amin Ben Romdhane
2070630b07 wifidmd: 1.3.9 2025-09-04 12:51:48 +02:00
Amin Ben Romdhane
f1702b3e70 map-controller: 6.4.1.3 2025-09-04 12:50:47 +02:00
Amin Ben Romdhane
9634b0678b wifidmd: 1.3.8 2025-09-03 17:21:18 +02:00
Amin Ben Romdhane
d395030be7 decollector: 6.2.1.12 2025-09-03 17:20:15 +02:00
Amin Ben Romdhane
4cb0504eb3 map-agent: 6.4.1.9 2025-09-03 17:19:11 +02:00
Mohd Husaam Mehdi
6df57301f9 logmngr: fix severity and facility configuration issues 2025-09-03 18:44:21 +05:30
Vivek Kumar Dutta
f527b8a25a obuspa: fallback to get connection params from db 2025-09-03 18:08:52 +05:30
Jakob Olsson
fbba67542e map-agent: 6.4.1.8 2025-09-02 17:27:43 +02:00
Amin Ben Romdhane
824d6d3abe decollector: 6.2.1.11 2025-09-02 16:30:45 +02:00
Jakob Olsson
1a9a339cc6 map-controller: 6.4.1.2 2025-09-02 13:04:54 +02:00
Vivek Kumar Dutta
0533f114d1 bbfdm: 1.17.7 2025-09-02 14:15:18 +05:30
Andreas Gnau
dc579e3c60 xmppc: Remove the dependency on jq
jq is used inside xmppc init script but it is not declared as a
dependency. Remove this usage of jq.

jq is a complex piece of software that requires security maintenance and
adds bloat to the image. Using existing tools like jshn and jsonfilter
is preferred where the additional functionality provided by jq is not
required.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-09-02 10:07:45 +02:00
Andreas Gnau
d232e76905 packet-capture-diagnostics: Don't use jq
jq is used inside packetcapture but it is not declared as a dependency.
Remove this usage of jq.

jq is a complex piece of software that requires security maintenance and
adds bloat to the image. Using existing tools like jshn and jsonfilter
is preferred where the additional functionality provided by jq is not
required.

Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
2025-09-02 10:06:16 +02:00
Filip Matusiak
2fffb45748 map-controller: 6.4.1.1 2025-09-02 10:00:24 +02:00
Filip Matusiak
b15f1b5026 map-agent: 6.4.1.7 2025-09-02 09:59:48 +02:00
Amin Ben Romdhane
43a0dfc863 wifidmd: 1.3.7 2025-08-29 10:11:28 +02:00
Jakob Olsson
307381c9af decollector: 6.2.1.10 2025-08-28 18:10:13 +02:00
Vivek Kumar Dutta
1a80f2df47 parental-control: improve dns packet inspection 2025-08-28 12:05:15 +05:30
Mohd Husaam Mehdi
9b79eb42db parental-control: improve packet capture rules for DNS 2025-08-28 11:53:12 +05:30
Mohd Husaam Mehdi
602926b076 parental-control: flush hw_nat along with conntrack 2025-08-28 11:22:11 +05:30
Vivek Kumar Dutta
74cfe57095 sulu: remove jq dependency 2025-08-28 10:56:55 +05:30
Jakob Olsson
01845eded6 map-controller: 6.4.1.0 2025-08-27 16:39:08 +02:00
arbala
11dce5812c map-agent: 6.4.1.6 2025-08-27 15:17:58 +02:00
Vivek Kumar Dutta
7af15ec9a9 sshmngr: 1.1.1 2025-08-27 16:24:12 +05:30
Vivek Kumar Dutta
8359755dc8 bbfdm: 1.17.6 2025-08-27 16:05:18 +05:30
Amin Ben Romdhane
1a735b7730 wifidmd: 1.3.6 2025-08-26 16:26:29 +02:00
Vivek Kumar Dutta
6a008d3419 bbfdm: 1.17.5 2025-08-26 18:52:24 +05:30
Vivek Kumar Dutta
6142da5d43 sshmngr: align with bbfdm dmmap schema 2025-08-26 11:56:31 +05:30
Mohd Husaam Mehdi
f5715d478a fluent-bit: fix kmsg plugin issues
* improved type conversion
* improved error checking while string parsing
* misc improvements
2025-08-26 11:30:20 +05:30
Amin Ben Romdhane
bce9364d14 wifidmd: 1.3.5 2025-08-25 17:38:14 +02:00
Amin Ben Romdhane
425949900b decollector: 6.2.1.9 2025-08-25 17:37:22 +02:00
Amin Ben Romdhane
938681c270 map-controller: 6.4.0.18 2025-08-25 17:36:05 +02:00
Jakob Olsson
30f7a15450 map-agent: 6.4.1.5 2025-08-25 16:08:24 +02:00
Jakob Olsson
4d4006309b map-agent: 6.4.1.4 2025-08-25 15:43:18 +02:00
Vivek Kumar Dutta
41f1e0d52a bbfdm: 1.17.4 2025-08-23 17:41:26 +05:30
Vivek Kumar Dutta
db207a87fc obuspa: Integrate v10.0.7 2025-08-23 10:08:37 +05:30
Jakob Olsson
89ab349565 map-agent: 6.4.1.3 2025-08-22 16:30:08 +02:00
Filip Matusiak
8ffe108f95 map-controller: 6.4.0.17
Set debug level to 2 (INFO) by default.
2025-08-22 16:20:24 +02:00
Erik Karlsson
074d9268b0 sulu: depend on local MQTT listener regardlessly of variant 2025-08-22 16:09:49 +05:30
Vivek Kumar Dutta
fc7b21aa73 bbfdm: Fix fault message for 9007 2025-08-22 15:15:37 +05:30
Husaam Mehdi
6f83732b0e logmngr: use multiple workers for logging 2025-08-22 12:08:27 +05:30
Erik Karlsson
97141307ed sulu: remove faulty mosquitto option
The actual spelling of this option is require_certificate and it is
anyway not relevant here since it is not a TLS listener.
2025-08-21 15:19:46 +02:00
Vivek Dutta
ddec5540bc sulu: Fix restarting of mqtt broker 2025-08-21 18:39:36 +05:30
Filip Matusiak
09b97ae69d self-diagnostics: get status of MLD stations 2025-08-21 11:18:18 +00:00
Jakob Olsson
977c1b5767 map-agent: 6.4.1.2 2025-08-21 12:31:22 +02:00
Anjan Chanda
467b3897fb Revert "libwifi: 7.13.0"
This reverts commit 9917da1ca3.
2025-08-21 09:50:01 +02:00
Filip Matusiak
a688381a3c self-diagnostics: update wifi data collection 2025-08-20 15:12:51 +00:00
Vivek Kumar Dutta
9bad79439b usermngr: 1.4.0 2025-08-20 20:29:50 +05:30
Vivek Dutta
608b9637b0 parental-control: fix cleanup when bundle is default enabled
(cherry picked from commit 8bdc47344a)

Co-authored-by: Mohd Husaam Mehdi <husaam.mehdi@iopsys.eu>
2025-08-20 20:28:06 +05:30
Vivek Dutta
fcd59e95f0 parental-control: auto enable urlbundle based on /apps 2025-08-20 20:27:48 +05:30
Vivek Kumar Dutta
5820d98e2c iopsys-analytics: enable dmcli remote connection 2025-08-20 20:09:17 +05:30
Erik Karlsson
9c6b9d6260 logmngr: use fluent-bit filters to adapt kmsg fields and add hostname 2025-08-20 13:25:27 +00:00
Erik Karlsson
9fad74246e fluent-bit: human readable time in file output 2025-08-20 13:25:27 +00:00
Erik Karlsson
aab3f74290 fluent-bit: remove patches for hostname and kmsg field adaptation
Filters will be used instead.
2025-08-20 13:25:27 +00:00
Jakob Olsson
0eb2ce3728 map-agent: 6.4.1.1 2025-08-20 15:19:51 +02:00
Anjan Chanda
f9aabb68d5 wifimngr: 20.0.0 2025-08-20 10:56:02 +02:00
Anjan Chanda
9917da1ca3 libwifi: 7.13.0 2025-08-20 10:38:39 +02:00
Anjan Chanda
acf7344c13 libeasy: 7.5.0 2025-08-20 10:10:16 +02:00
Filip Matusiak
693ff8bd19 map-controller: 6.4.0.16
Reduce stale sta timeout to 20 days, to avoid exceeding
max value of parameter to uloop_timeout_set.
2025-08-20 07:25:12 +00:00
Jakob Olsson
c1286064bb map-agent: 6.4.1.0 2025-08-19 15:17:14 +02:00
Erik Karlsson
2503b1fc72 logmngr: miscellaneous fixes
Always migrate configuration. Do not set executable bit on config
files and uci-defaults scripts. Remove unused /lib/functions.sh
include. Remove redundant "default y" on choice.
2025-08-19 11:07:11 +00:00
Vivek Kumar Dutta
d468c13b3f usp-js: 1.2.9 2025-08-19 13:42:18 +05:30
Vivek Kumar Dutta
064611a15d obuspa: removed test controller definition 2025-08-19 13:42:18 +05:30
Filip Matusiak
5c427dd08a map-controller: config: change default sta timeout to 20d 2025-08-18 15:14:07 +00:00
Amin Ben Romdhane
1703e6d328 wifidmd: 1.3.4 2025-08-18 17:10:59 +02:00
Amin Ben Romdhane
35c27393ce map-controller: 6.4.0.15 2025-08-18 17:09:31 +02:00
Amin Ben Romdhane
fca93627ba bbfdm: 1.17.2 2025-08-18 10:36:21 +02:00
Erik Karlsson
417a127dd9 quickjs: clean up integration
Pass CFLAGS and LDFLAGS the correct way via environment variables and
not as arguments so the upstream Makefile CFLAGS/LDFLAGS do not get
overwritten and no ugly workaround is needed. Set PREFIX correctly and
do not set CONFIG_SMALL which was implemented in a patch that was
dropped. Remove commented out code (libquickjs.lto.a is no longer
built by default). Set PKG_SOURCE_DATE correctly as the date of the
upstream git repo and not the date of the OpenWrt package. Fix
whitespace issues in patch. Do not create empty /usr/lib/quickjs
2025-08-17 13:28:55 +05:30
arbala
afde0b98ad map-agent: 6.4.0.3 2025-08-15 16:45:12 +02:00
Markus Gothe
a0069cc9be qos: airoha: Fix mapping of accounter. 2025-08-14 21:20:07 +02:00
Markus Gothe
368255f50b qos: airoha: Use Meter 0 for IF-based QoS. 2025-08-14 18:34:40 +02:00
Janusz Dziedzic
ad1233ff32 wifimngr: 17.7.8 2025-08-14 14:47:23 +00:00
Janusz Dziedzic
697ddc356e libwifi: 7.14.0 2025-08-14 14:25:45 +00:00
Janusz Dziedzic
b82eb8325e libwifi: 7.13.9 2025-08-14 11:56:01 +00:00
Suvendhu Hansa
c150053a83 usermngr: modify password policy 2025-08-14 16:40:17 +05:30
Vivek Kumar Dutta
7ee83ff47f usp-js: 1.2.8 2025-08-14 16:27:42 +05:30
Vivek Kumar Dutta
98905256f8 periodicstats: Align with new dmmap 2025-08-14 12:42:51 +05:30
Amin Ben Romdhane
a8a511c4ff wifidmd: 1.3.3 2025-08-12 13:35:04 +02:00
Amin Ben Romdhane
d0d90946b3 map-agent: 6.4.0.2 2025-08-12 13:34:04 +02:00
Vivek Dutta
c2ad0fa44d swmodd: disable lxc support in defaults 2025-08-12 15:20:10 +05:30
Vivek Kumar Dutta
be7fa433c5 obuspa: Fix fault msg in failed set cmd 2025-08-12 15:07:35 +05:30
Mohd Husaam Mehdi
01e9d7c0bc usermngr: add UCI support for passwdqc parameters 2025-08-12 12:17:21 +05:30
Suvendhu Hansa
2f398a2671 icwmp: generate a random cpe port if not defined 2025-08-12 10:11:52 +05:30
Markus Gothe
8254547866 udhcpc_obuspa_opt125.user: Fix typo 2025-08-11 23:25:08 +02:00
Janusz Dziedzic
e8ceb167b5 ieee1905: 8.7.34 2025-08-11 11:38:51 +00:00
Amin Ben Romdhane
434c794671 decollector: 6.2.1.8 2025-08-11 12:19:37 +02:00
George Yang
9628be4812 dectmngr-3.7.11 2025-08-08 17:09:57 +02:00
Markus Gothe
bd90dc7ec2 libdsl: 7.3.2 2025-08-11 09:05:22 +02:00
Janusz Dziedzic
e0736df927 wifimngr: 17.7.7 2025-08-11 05:24:03 +00:00
Amin Ben Romdhane
afa58be1f8 wifidmd: 1.3.2 2025-08-09 22:03:24 +02:00
Vivek Kumar Dutta
3cbcac96ba netmode: Fix dm-service depedency 2025-08-08 16:55:35 +05:30
Suvendhu Hansa
a92f32eba4 icwmp: Fix overriding of port definition 2025-08-08 12:52:57 +05:30
Amin Ben Romdhane
842968da4f wifidmd: 1.3.1 2025-08-07 15:21:16 +02:00
Jakob Olsson
60ef90c1b6 map-agent: 6.4.0.1 2025-08-07 15:17:22 +02:00
Suvendhu Hansa
56cec9cb7f icwmpd: retry on bind failure 2025-08-07 18:06:53 +05:30
Vivek Kumar Dutta
4042d46009 tr104: Fix CallControlGroup Extension references 2025-08-07 17:48:46 +05:30
Markus Gothe
d6dfc5bd08 libdsl: Fix issue with G.vectoring. 2025-08-07 14:15:25 +02:00
Vivek Kumar Dutta
451036aebc obuspa: Integrated v10.0.6 2025-08-07 17:33:16 +05:30
Amin Ben Romdhane
8d01ace7a6 wifidmd: 1.3.0 2025-08-07 12:37:44 +02:00
Jakob Olsson
d7e22b922b map-agent: map-dynamic-backhaul: pass macaddr when setting uplink 2025-08-07 10:40:26 +02:00
Elena Vengerova
a1d535058d libwifi: 7.13.8 2025-08-06 22:37:57 +04:00
Markus Gothe
1bb307ef4f xdsl_wan: ros -> roc. 2025-08-06 19:50:31 +02:00
Markus Gothe
404a642e41 xdsl_wan: Enable vectoring and G.iNP by default. 2025-08-06 19:33:52 +02:00
Elena Vengerova
ae3f1819e6 libwifi: invent target for Mediatek, change path for vendor header search
Mediatek passes rather -I$(LINUX_DIR)/include/uapi/linux/mtk_nl80211_inc
than installs header with vendor attributes into the toolchain.
2025-08-06 21:00:38 +04:00
Elena Vengerova
fbd8f64c40 mapagent: invent branch for logan driver handling
Logan driver assumes that ra/rai interface names are used.
It's the same for all platforms.
2025-08-06 16:32:33 +00:00
Jakob Olsson
369fc0d4bb map-agent: 6.4.0.0: dynbh rework 2025-08-06 16:29:57 +00:00
Jakob Olsson
b44afe067f map-agent: remove dynbhd 2025-08-06 16:29:57 +00:00
Suvendhu Hansa
d69245f570 map-agent: map_genconfig: use ubus uci to commit mapcontroller changes 2025-08-06 14:53:54 +00:00
Suvendhu Hansa
c3564ff528 wifidmd: Reload wifidmd by signal 2025-08-06 20:19:54 +05:30
Vivek Kumar Dutta
fafe1d9447 icwmp: 9.9.10 2025-08-06 18:41:01 +05:30
Husaam Mehdi
e35bf1d509 logmngr: add support for Syslog Source and Template 2025-08-05 17:06:51 +05:30
Amin Ben Romdhane
8e11e5dbc8 twamp: 1.5.0 2025-08-04 17:09:23 +02:00
Amin Ben Romdhane
2698ee9358 netmngr: 1.2.0 2025-08-04 16:50:16 +02:00
Amin Ben Romdhane
92be6f1129 ethmngr: 3.1.0 2025-08-04 16:49:03 +02:00
Amin Ben Romdhane
4dfc196968 bbfdm: 1.17.1 2025-08-04 16:47:16 +02:00
Mohd Husaam Mehdi
1c17fed77d fluent-bit: align kmsg output fields with syslog fields
- this allows for a better mapping to the data model
- this reduces load on fluent-bit because now one OUTPUT section
  is sufficient (earlier we needed two output sections because of
  two different templates)
2025-08-04 14:33:28 +05:30
Markus Gothe
27b9fb9350 logmngr: Make sure we never fail to setup /var/log/messages.
If it fails during MP the verfication of buttons will not work
as expected. The problem is that the file is created before
data is commited and when power is cut prematurely it won't
re-create the file, maybe because the uci-default script has
been removed already as well.
2025-07-30 21:49:58 +02:00
arbala
b917a2177e map-agent: 6.3.7.3 2025-07-30 16:08:02 +02:00
Vivek Kumar Dutta
2372de4864 logmngr: fix /dev/log creation 2025-07-30 17:31:26 +05:30
Vivek Kumar Dutta
c5d7ddd851 logmngr: generate kmsg,log config if dev exists 2025-07-29 13:33:50 +00:00
arbala
a688b2091c map-agent: 6.3.7.2 2025-07-29 15:27:25 +02:00
Vivek Kumar Dutta
bfc7e6a78a tr143: 1.1.5 2025-07-29 18:16:33 +05:30
Suvendhu Hansa
41495cf6e5 icwmp,obuspa,gateway-info: Fix ShellCheck issues 2025-07-29 18:11:53 +05:30
Vivek Kumar Dutta
d3d1b444de obuspa: Integrate v10.0.5 2025-07-25 09:09:29 +05:30
Janusz Dziedzic
9681b6222c map-controller: 6.4.0.14 2025-07-24 10:55:16 +00:00
Meng
d20fb01a1b Upgrade quickjs to latest stable
Reworked the 002-fix_std_loadFile.patch
Removed the patches:
- 000-build-options.patch: the build options are now done in the
  Makefile
- 001-no-fenv-dtoa-libbf.patch: this patch is not needed anymore
  in the latest version: quickJS now uses a custom, high-precision
  floating-point conversion library that doesn't rely on the system's
  printf/snprintf for floating-point formatting.
2025-07-24 07:06:09 +00:00
Mohd Husaam Mehdi
85e49b3df6 usermngr: 1.3.11 2025-07-24 09:13:45 +05:30
Mohd Husaam Mehdi
511e0af668 passwdqc: align with usermngr (move PAM setup to usermngr) 2025-07-23 13:12:31 +05:30
Mohd Husaam Mehdi
1151478d13 linux-pam: align with usermngr (move PAM setup to usermngr) 2025-07-23 13:12:31 +05:30
Mohd Husaam Mehdi
7e87028731 usermngr: add support for USERMNGR_SECURITY_HARDENING
* this compile time flag will set up faildelay, lock out upon
  6 failed attempts during login via shell or console and enable
  password strength checks when changing password
* this will set openssh usePam option
* openssh and shadow-utils with PAM backend need to be selected for
  this compile time flag to work
2025-07-23 13:12:31 +05:30
arbala
cb18ecc420 map-controller: 6.4.0.13 2025-07-23 09:38:11 +02:00
Jakob Olsson
e581c05d27 map-agent: 6.3.7.1 2025-07-22 16:11:01 +02:00
Jakob Olsson
3ae6c52e7d map-agent: 6.3.7.0 2025-07-22 14:56:12 +02:00
Amin Ben Romdhane
498a06916b netmode: Align with reference updates 2025-07-21 17:46:16 +05:30
Suvendhu Hansa
332057fdd4 wifidmd,map-agent: Fix WiFi lagecy nodes for extenders 2025-07-21 17:44:04 +05:30
Vivek Kumar Dutta
58aff3cb45 obuspa: Improve file handling 2025-07-21 17:40:53 +05:30
Vivek Kumar Dutta
5678b6dcaa bbfdm: Optimize datamodel references 2025-07-21 17:08:38 +05:30
Vivek Kumar Dutta
a597c514f7 bbfdm: 1.16.8 2025-07-18 17:10:20 +05:30
Mohd Husaam Mehdi
3c1dcf90eb usermngr: set compile time flag to use pam with shadow-utils 2025-07-18 16:27:42 +05:30
Mohd Husaam Mehdi
62dc6c28a3 firewallmngr: 1.0.10 2025-07-17 19:45:09 +05:30
Amin Ben Romdhane
2703ea0421 timemngr: 1.1.11 2025-07-17 15:35:25 +02:00
Amin Ben Romdhane
b4a0572b7c bridgemngr: 1.1.1 2025-07-17 15:34:09 +02:00
Husaam Mehdi
428055c911 sshmngr: use openssh-with-pam as the default backend 2025-07-17 16:16:18 +05:30
Mohd Husaam Mehdi
97723f9e7a usermngr: include passwdqc and linux-pam
* passwdqc helps us enforce strong passwords policy
* linux-pam helps in managing failed login attempts
2025-07-17 14:48:32 +05:30
Vivek Kumar Dutta
2dceb5b44b wifidmd: 1.1.38 2025-07-16 16:51:49 +05:30
Vivek Kumar Dutta
8c9689caf7 fluent-bit: build using git proto 2025-07-16 11:56:36 +05:30
Janusz Dziedzic
af5bb94c8c fluent-bit: fix package hash 2025-07-15 14:45:26 +02:00
Janusz Dziedzic
9db65fcfba libwifi: 7.13.7 2025-07-15 10:24:24 +00:00
Vivek Kumar Dutta
2b43c27e53 xmppc: Fix ConnReqXMPPConnection reference 2025-07-15 10:07:05 +05:30
Vivek Kumar Dutta
c16f4d3f82 wifidmd: 1.1.37 2025-07-14 19:09:46 +05:30
Janusz Dziedzic
99a4f3c036 map-controller: 6.4.0.12 2025-07-14 12:37:53 +02:00
Erik Karlsson
71217d4f68 ieee1905: avoid installing datamodel_description.json into root 2025-07-14 08:50:46 +02:00
Vivek Kumar Dutta
ad012d7549 wifidmd: fix log spamming when radio disabled 2025-07-14 10:01:09 +05:30
Vivek Kumar Dutta
6cca837500 sulu: support dynamic QR 2025-07-14 09:49:23 +05:30
Amin Ben Romdhane
6bec3c159c bbfdm: Ensure UCI savedir paths are created before initialization from C code 2025-07-14 00:37:43 +02:00
Mohd Husaam Mehdi
fd921bb196 fluent-bit: bump version and adjust patch accordingly 2025-07-10 14:53:55 +05:30
Janusz Dziedzic
60d2f92da3 wifimngr: 17.7.6 2025-07-10 08:51:47 +00:00
Janusz Dziedzic
8f83250890 libwifi: 7.13.6 2025-07-10 08:50:48 +00:00
Vivek Kumar Dutta
652ec8a4af wifidmd: Updated default log level 2025-07-09 16:58:15 +05:30
Vivek Kumar Dutta
937b824055 tr143: 1.1.4 2025-07-09 16:56:02 +05:30
Vivek Kumar Dutta
889723079b bridgemngr: Add support for Bridge Type 2025-07-09 16:52:06 +05:30
Janusz Dziedzic
7a457ae32a libwifi: 7.13.5 2025-07-09 12:39:38 +02:00
Vivek Kumar Dutta
7e5e38e657 wifidmd: Support for AgentOnboard event 2025-07-09 15:44:40 +05:30
Vivek Kumar Dutta
44edac6572 icwmp: return 9003 for duplicate param in spv 2025-07-09 15:42:10 +05:30
Amin Ben Romdhane
fea3e1e4ef timemngr: Added support for SupportedZones object 2025-07-09 14:54:54 +05:30
Vivek Kumar Dutta
eae31a6dd4 obuspa: Integrated v10.0.4 2025-07-09 14:29:55 +05:30
Husaam Mehdi
3a1a65d5df logmngr: Use kmsg module instead of klogd 2025-07-09 12:45:43 +05:30
Husaam Mehdi
70a22d0299 logmngr: Include kernel logs 2025-07-09 12:43:46 +05:30
Amin Ben Romdhane
2a19a1a92a ieeee1905: Add data model description 2025-07-09 11:28:59 +05:30
Mohd Husaam Mehdi
5b865c9dbc fluent-bit: fix kmsg plugin and add syslog timestamp to kmsg logs 2025-07-09 11:20:51 +05:30
Mohd Husaam Mehdi
bc041faf04 fluent-bit: enable kmsg plugin 2025-07-09 11:20:51 +05:30
Janusz Dziedzic
de08bc79a1 ieee1905: 8.7.33 2025-07-08 08:16:56 +00:00
175 changed files with 11014 additions and 1682 deletions

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bbfdm
PKG_VERSION:=1.16.6.6
PKG_VERSION:=1.18.18
USE_LOCAL:=0
ifneq ($(USE_LOCAL),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
PKG_SOURCE_VERSION:=6317266bdfb0180d75ed2dd830e108f09fe2526a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=fbf01a9e30e7ecccc2453af7abfbccf939e27d43
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif
@@ -55,7 +55,7 @@ define Package/dm-service
CATEGORY:=Utilities
SUBMENU:=TRx69
TITLE:=Datamodel ubus backend to expose micro-service tree
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libbbfdm-ubus +bbf_configmngr
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +libjson-c +libbbfdm-api +libbbfdm-ubus +bbf_configmngr +libeasy
endef
define Package/bbf_configmngr
@@ -183,6 +183,7 @@ define Package/bbf_configmngr/install
$(INSTALL_BIN) ./files/etc/init.d/bbf_configd $(1)/etc/init.d/bbf_configd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_config_notify.sh $(1)/usr/share/bbfdm/scripts/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/utilities/files/usr/share/bbfdm/scripts/bbf_default_reload.sh $(1)/etc/bbfdm/
$(INSTALL_DATA) ./files/etc/bbfdm/critical_services.json $(1)/etc/bbfdm/
endef

View File

@@ -1,23 +1,47 @@
{
"usp": [
"firewall",
"network",
"dhcp",
"time",
"wireless",
"ieee1905",
"mapcontroller",
"mosquitto",
"nginx",
"netmode"
"/etc/config/firewall",
"/etc/bbfdm/dmmap/dmmap_firewall",
"/etc/config/network",
"/etc/bbfdm/dmmap/IP",
"/etc/bbfdm/dmmap/Ethernet",
"/etc/bbfdm/dmmap/GRE",
"/etc/bbfdm/dmmap/IPv6rd",
"/etc/bbfdm/dmmap/PPP",
"/etc/bbfdm/dmmap/Routing",
"/etc/config/dhcp",
"/etc/bbfdm/dmmap/DHCPv4",
"/etc/bbfdm/dmmap/DHCPv6",
"/etc/config/time",
"/etc/bbfdm/dmmap/dmmap_time",
"/etc/config/mapcontroller",
"/etc/config/wireless",
"/etc/bbfdm/dmmap/WiFi",
"/etc/config/ieee1905",
"/etc/config/mosquitto",
"/etc/config/nginx",
"/etc/config/netmode",
"/etc/bbfdm/dmmap/dmmap_netmode"
],
"cwmp": [
"firewall",
"network",
"dhcp",
"mapcontroller",
"wireless",
"time",
"netmode"
"/etc/config/firewall",
"/etc/bbfdm/dmmap/dmmap_firewall",
"/etc/config/network",
"/etc/bbfdm/dmmap/IP",
"/etc/bbfdm/dmmap/Ethernet",
"/etc/bbfdm/dmmap/GRE",
"/etc/bbfdm/dmmap/IPv6rd",
"/etc/bbfdm/dmmap/PPP",
"/etc/bbfdm/dmmap/Routing",
"/etc/config/dhcp",
"/etc/bbfdm/dmmap/DHCPv4",
"/etc/bbfdm/dmmap/DHCPv6",
"/etc/config/mapcontroller",
"/etc/config/wireless",
"/etc/bbfdm/dmmap/WiFi",
"/etc/config/time",
"/etc/bbfdm/dmmap/dmmap_time",
"/etc/config/netmode",
"/etc/bbfdm/dmmap/dmmap_netmode"
]
}

View File

@@ -10,19 +10,10 @@ log() {
echo "${@}"|logger -t bbf.config -p info
}
create_needed_directories()
{
mkdir -p /tmp/bbfdm/.cwmp
mkdir -p /tmp/bbfdm/.usp
mkdir -p /tmp/bbfdm/.bbfdm
}
start_service()
{
local log_level
create_needed_directories
config_load bbfdm
config_get log_level "reload_handler" log_level 2
@@ -36,6 +27,6 @@ start_service()
service_triggers() {
for config_file in /etc/config/*; do
config_name=$(basename "$config_file")
procd_add_config_trigger "config.change" "$config_name" /usr/share/bbfdm/scripts/bbf_config_notify.sh
procd_add_config_trigger "config.change" "$config_name" /usr/share/bbfdm/scripts/bbf_config_notify.sh "$config_name"
done
}

View File

@@ -9,7 +9,7 @@ PKG_SOURCE_VERSION:=7b810a696c78b746185c11282bdbe3fb7f8c5d4b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/dotse/bbk.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.zst
PKG_SOURCE_SUBDIR:=$(PKG_NAME)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)

View File

@@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/mmeeks/bootchart.git
PKG_SOURCE_VERSION:=3ab81137cafe25c2ca4bc3a5f322a63646f9ce8d
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=GPLv2

View File

@@ -5,6 +5,12 @@ config BRIDGEMNGR_BRIDGE_VLAN
help
Set this option to use bridge-vlan as backend for VLAN objects.
config BRIDGEMNGR_COPY_PBITS
bool "Copy pbits from cvlan to svlan"
default y
help
Set this option to copy cvlan pbits to svlan pbits by default (driver vlan).
config BRIDGEMNGR_BRIDGE_VENDOR_EXT
bool "Use bridge BBF vendor extensions"
default y

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bridgemngr
PKG_VERSION:=1.0.18.2
PKG_VERSION:=1.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
PKG_SOURCE_VERSION:=71ed529be038392071b0399bcfe9d46e89d3cb46
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr.git
PKG_SOURCE_VERSION:=882f8c8cc9a97372297d192cc916c4f8ffe7c25a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif
@@ -51,6 +51,10 @@ ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VLAN),y)
TARGET_CFLAGS += -DBRIDGE_VLAN_BACKEND
endif
ifeq ($(CONFIG_BRIDGEMNGR_COPY_PBITS),y)
TARGET_CFLAGS+=-DBRIDGEMNGR_COPY_PBITS
endif
define Package/bridgemngr/install
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_DIR) $(1)/etc/config

View File

@@ -7,14 +7,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=bulkdata
PKG_VERSION:=2.1.20
PKG_VERSION:=2.1.23
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
PKG_SOURCE_VERSION:=a5e57962938ca143ede65d92be90b6e9fce66e15
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=f54550f2d587a701c0a8d5cac4a0910a99ce92cf
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -11,7 +11,7 @@ PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bulut/bulut-gw-client.git
PKG_SOURCE_VERSION:=227700c44817afa2c392fa08bf4cf70fa6177f01
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -12,7 +12,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
PKG_SOURCE_VERSION:=44af9a7b3fec3929f8554af9633a5b8068189b48
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -4,4 +4,16 @@ config DECOLLECTOR_EASYMESH_VERSION
int "Support Easymesh version"
default 6
config DECOLLECTOR_BUILD_TR181_PLUGIN
bool "Build TR-181 mapping module (responsible for Device.WiFi.DataElements.)"
default y
config DECOLLECTOR_VENDOR_EXTENSIONS
bool "Iopsys vendor extensions for Device.WiFi.DataElements."
default y
config DECOLLECTOR_VENDOR_PREFIX
string "Package specific datamodel Vendor Prefix for TR181 extensions"
default ""
endmenu

View File

@@ -6,14 +6,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=decollector
PKG_VERSION:=6.2.1.14
PKG_VERSION:=6.2.3.9
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=d9ff69760bc34dd3928fa784dfb3116bfe3f95af
PKG_SOURCE_VERSION:=d1d948a48952fe2091e84af1293a6e77857439cf
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
@@ -24,6 +24,7 @@ PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENSE
include $(INCLUDE_DIR)/package.mk
include $(TOPDIR)/feeds/iopsys/bbfdm/bbfdm.mk
define Package/decollector
SECTION:=utils
@@ -66,6 +67,18 @@ MAKE_PATH:=src
TARGET_CFLAGS += -DEASYMESH_VERSION=$(CONFIG_DECOLLECTOR_EASYMESH_VERSION)
ifeq ($(CONFIG_DECOLLECTOR_BUILD_TR181_PLUGIN),y)
MAKE_FLAGS += DECOLLECTOR_BUILD_TR181_PLUGIN=y
ifeq ($(CONFIG_DECOLLECTOR_VENDOR_EXTENSIONS),y)
TARGET_CFLAGS += -DDECOLLECTOR_VENDOR_EXTENSIONS
ifeq ($(CONFIG_DECOLLECTOR_VENDOR_PREFIX),"")
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
else
TARGET_CFLAGS += -DCUSTOM_PREFIX=\\\"$(CONFIG_DECOLLECTOR_VENDOR_PREFIX)\\\"
endif
endif
endif
EXECS := \
$(if $(CONFIG_PACKAGE_decollector),decollector)
@@ -76,6 +89,7 @@ define Package/decollector/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/decollector.init $(1)/etc/init.d/decollector
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/decollector $(1)/usr/sbin/
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
endef
$(eval $(call BuildPackage,decollector))

View File

@@ -0,0 +1,26 @@
{
"daemon": {
"enable": "1",
"service_name": "decollector",
"unified_daemon": true,
"services": [
{
"parent_dm": "Device.WiFi.",
"object": "DataElements"
}
],
"config": {
"loglevel": "3"
},
"apply_handler": {
"uci": [
{
"file": [
"mapcontroller"
],
"external_handler": "/etc/wifidmd/bbf_config_reload.sh"
}
]
}
}
}

View File

@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dectmngr
PKG_RELEASE:=3
PKG_VERSION:=3.7.10
PKG_VERSION:=3.7.13
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=1f851980a6ba616df54f79930225f8bcd563b711
PKG_SOURCE_VERSION:=5c2720563b3ed889e9d4de6fdb9b0f6a9d584094
PKG_MIRROR_HASH:=skip
endif
@@ -20,7 +20,7 @@ export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dhcpmngr
PKG_VERSION:=1.0.10
PKG_VERSION:=1.1.6
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
PKG_SOURCE_VERSION:=e238e47fa13153c5b1890056b0d09c65879de8c5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=74d96cd70119e4ea08767d68b45b4922162d0328
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -11,11 +11,12 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=dmcli
PKG_LICENSE:=PROPRIETARY GENEXIS
PKG_VERSION:=1.9.4
PKG_VERSION:=1.9.6
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/dmcli.git
PKG_SOURCE_VERSION:=2139e81d0faca09fe1832c503297ef75ea76d6eb
PKG_SOURCE_VERSION:=f03188eff6c2cab59e4c8f18a435c940ff5043f5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=dnsmngr
PKG_VERSION:=1.0.20
PKG_VERSION:=1.0.21
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
PKG_SOURCE_VERSION:=448d278734a824f9d4ad1e7a55acd16c222d4c7e
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=ef3714cc7555f763dfab626add8f90d7bc0a33b5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -15,7 +15,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
PKG_SOURCE_VERSION:=8fb4093b4d26b3cb06603e110d424005e33cf5d6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
PKG_MIRROR_HASH:=skip
endif

View File

@@ -14,7 +14,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ebtables-extensions.git
PKG_SOURCE_VERSION:=7357622d806833d93d317164dc6673fbf5fd1629
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ethmngr
PKG_VERSION:=3.0.9
PKG_VERSION:=3.1.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
PKG_SOURCE_VERSION:=0bcfd98d64b5bd8d3162944e2abd5740f9bf4b92
PKG_SOURCE_VERSION:=0283fb5cb74a7baca46c4360da680757c57c86ac
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif

View File

@@ -16,7 +16,7 @@ PKG_SOURCE_VERSION:=98af6019a4a1b478a6fa35f74528cb3cd404ae40
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://git.launchpad.net/fatrace
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_RELEASE)-$(PKG_SOURCE_VERSION).tar.zst
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -10,20 +10,15 @@ PKG_NAME:=fdtextract
PKG_RELEASE:=1
PKG_VERSION:=1.0
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/fdtextract.git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/fdtextract.git
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=e3cefda3b26c9aea3021b20725ce7b31b33eebc4
PKG_SOURCE_VERSION:=7917dbcb29724476cd46164eec29848df1e5fb67
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=GPLv2
PKG_LICENSE_FILES:=LICENSE
RSTRIP:=true
export BUILD_DIR
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_BUILD_PARALLEL:=1
include $(INCLUDE_DIR)/package.mk
@@ -40,9 +35,7 @@ endef
define Package/$(PKG_NAME)/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/fdtextract $(1)/usr/sbin/
$(STRIP) $(1)/usr/sbin/fdtextract
endef
$(eval $(call BuildPackage,$(PKG_NAME)))

View File

@@ -8,11 +8,5 @@ config FIREWALLMNGR_PORT_TRIGGER
help
Set this option to include support for PortTrigger object.
config FIREWALLMNGR_NAT_INTERFACE_SETTING
bool "Include Device.NAT.InterfaceSetting"
default y
help
Set this option to include support for NAT InterfaceSetting object.
endmenu
endif

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=firewallmngr
PKG_VERSION:=1.0.9.5
PKG_VERSION:=1.0.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/firewallmngr.git
PKG_SOURCE_VERSION:=02dc90c48d996148b68d02632bac13a28d75cf25
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=30319c67fb4db285a2bcd272b1c10bc040eecf19
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif
@@ -52,10 +52,6 @@ ifeq ($(CONFIG_FIREWALLMNGR_PORT_TRIGGER),y)
TARGET_CFLAGS += -DINCLUDE_PORT_TRIGGER
endif
ifeq ($(CONFIG_FIREWALLMNGR_NAT_INTERFACE_SETTING),y)
TARGET_CFLAGS += -DINCLUDE_NAT_IF_SETTING
endif
define Package/firewallmngr/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_DIR) $(1)/etc/uci-defaults

View File

@@ -13,7 +13,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit.git
PKG_SOURCE_VERSION=v$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -15,7 +15,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/gateway-info.git
PKG_SOURCE_VERSION:=dd15893a8291e556a8c49ff9e143c763db0379b5
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -110,7 +110,7 @@ configure_send_op125() {
if [ "${uci}" = "network" ]; then
new_send_opt="$sendopt $opt125"
[ -n "${sendopt}" ] && new_send_opt="$sendopt $opt125" || new_send_opt="$opt125"
uci -q set network."${intf}".sendopts="$new_send_opt"
else
new_send_opt="$sendopt$opt125"
@@ -228,7 +228,7 @@ enable_dhcp_option125() {
if [ "${proto}" = "dhcp" ]; then
if [ ${req125_present} -eq 0 ]; then
newreqopts="$reqopts 125"
[ -n "${reqopts}" ] && newreqopts="$reqopts 125" || newreqopts="125"
uci -q set network."${wan}".reqopts="$newreqopts"
fi

View File

@@ -40,22 +40,22 @@ get_vivsoi() {
#hex-string 2 character=1 Byte
# length in hex string will be twice of actual Byte length
[ "$len" -gt "8" ] || return
[ "${len}" -gt 8 ] || return
data="${opt125}"
rem_len="${len}"
while [ $rem_len -gt 0 ]; do
while [ "${rem_len}" -gt 0 ]; do
ent_id=${data:0:8}
ent_id=$(printf "%d\n" "0x$ent_id")
if [ $ent_id -ne 3561 ]; then
if [ "${ent_id}" -ne 3561 ]; then
len_val=${data:8:2}
data_len=$(printf "%d\n" "0x$len_val")
# add 4 byte for ent_id and 1 byte for len
data_len=$(( data_len * 2 + 10 ))
# move ahead data to next enterprise id
data=${data:"${data_len}":"${rem_len}"}
rem_len=$(( rem_len - $data_len ))
rem_len=$(( rem_len - data_len ))
continue
fi
@@ -66,7 +66,7 @@ get_vivsoi() {
data_len=$(( data_len * 2 + 10 ))
opt_len=$(printf "%d\n" "0x$len_val")
[ $opt_len -eq 0 ] && return
[ "${opt_len}" -eq 0 ] && return
# populate the option data of enterprise id
sub_data_len=$(( opt_len * 2))
@@ -74,7 +74,7 @@ get_vivsoi() {
sub_data=${data:10:"${sub_data_len}"}
# parsing of suboption of option 125
while [ $sub_data_len -gt 0 ]; do
while [ "${sub_data_len}" -gt 0 ]; do
# get the suboption id
sub_opt_id=${sub_data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
@@ -85,20 +85,20 @@ get_vivsoi() {
sub_opt_len=$(( sub_opt_len * 2 ))
# get the value of sub option starting 4 means starting after length
sub_opt_val=${sub_data:4:${sub_opt_len}}
sub_opt_val=${sub_data:4:"${sub_opt_len}"}
# assign the value found in sub option
case "${sub_opt_id}" in
"4")
OUI=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
OUI=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
"5")
SERIAL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
SERIAL=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
"6")
CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
CLASS=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
GW_DISCOVERED=1
;;
esac
@@ -110,7 +110,7 @@ get_vivsoi() {
sub_data_len=$((sub_data_len - sub_opt_end))
# fetch next sub option hex string
sub_data=${sub_data:${sub_opt_end}:${sub_data_len}}
sub_data=${sub_data:"${sub_opt_end}":"${sub_data_len}"}
done
# move ahead data to next enterprise id
@@ -131,15 +131,13 @@ send_host_query() {
sleep 5
json_load "$(ubus call umdns browse)"
json_select discovered_services
if [ "${?}" -ne 0 ]; then
if ! json_select discovered_services; then
json_cleanup
loop=$(( loop - 1 ))
continue
fi
json_select _usp-agt-mqtt._tcp
if [ "${?}" -ne 0 ]; then
if ! json_select _usp-agt-mqtt._tcp; then
json_cleanup
loop=$(( loop - 1 ))
continue
@@ -156,7 +154,7 @@ send_host_query() {
json_get_keys keys
for key in $keys; do
json_select $key
json_select "${key}"
json_get_var _host host ""
if [ -z "${_host}" ] || [[ "${sent_host}" =~ " ${_host}" ]]; then
@@ -166,9 +164,10 @@ send_host_query() {
sent_host="${sent_host} ${_host}"
cmd="ubus call umdns query '{\"question\":\"$_host\",\"interface\":\"$intf\"}'"
eval $cmd
sh -c "${cmd}"
resp=0
json_select ..
sleep 2 # umdns query sometime takes time to resolve so adding some sleep
done
json_cleanup
@@ -185,32 +184,29 @@ get_usp_agent_id() {
fi
json_load "$(ubus call umdns browse)"
json_select discovered_services
if [ "${?}" -ne 0 ]; then
if ! json_select discovered_services; then
json_cleanup
echo ${ID}
echo "${ID}"
return 0
fi
json_select _usp-agt-mqtt._tcp
if [ "${?}" -ne 0 ]; then
if ! json_select _usp-agt-mqtt._tcp; then
json_cleanup
echo ${ID}
echo "${ID}"
return 0
fi
json_get_keys keys
for key in $keys; do
json_select $key
json_select $family
if [ "${?}" -ne 0 ]; then
json_select "${key}"
if ! json_select "${family}"; then
json_select ..
continue
fi
json_get_keys ips
for ip in $ips; do
json_get_var ip_val $ip
json_get_var ip_val "${ip}"
if [ "${ip_val}" != "${dhcp_ip}" ]; then
continue
fi
@@ -219,8 +215,8 @@ get_usp_agent_id() {
json_select txt
json_get_keys txts
for _txt in $txts; do
json_get_var text_val $_txt
if [[ "${text_val:0:3}" == "ID=" ]]; then
json_get_var text_val "${_txt}"
if [[ "${text_val:0:3}" = "ID=" ]]; then
ID="${text_val:3}"
break
fi
@@ -238,16 +234,16 @@ get_usp_agent_id() {
done
json_cleanup
echo ${ID}
echo "${ID}"
}
get_mac_address() {
ip="${1}"
device="${2}"
mac="$(cat /proc/net/arp | grep $ip | awk '{print $4}')"
mac=$(grep "${ip}" /proc/net/arp | awk '{print $4}')
if [ -z "${mac}" ]; then
arp_resp="$(arping -b -f -c 5 -I $device $ip | grep 'Unicast reply from' | awk '{print $5}')"
arp_resp=$(arping -b -f -c 5 -I "${device}" "${ip}" | grep 'Unicast reply from' | awk '{print $5}')
if [ -n "${arp_resp}" ]; then
mac=${arp_resp:1:-1}
fi
@@ -260,7 +256,7 @@ send_unknown_gw_event() {
mac="${1}"
cmd="ubus -t 5 send gateway-info.gateway.unknown '{\"hwaddr\":\"$mac\"}'"
eval $cmd
sh -c "${cmd}"
}
send_cwmp_gw_event() {
@@ -269,14 +265,14 @@ send_cwmp_gw_event() {
serial="${3}"
cmd="ubus -t 5 send gateway-info.gateway.cwmp '{\"oui\":\"$oui\",\"class\":\"$class\",\"serial\":\"$serial\"}'"
eval $cmd
sh -c "${cmd}"
}
send_usp_gw_event() {
endpoint="${1}"
cmd="ubus -t 5 send gateway-info.gateway.usp '{\"endpoint\":\"$endpoint\"}'"
eval $cmd
sh -c "${cmd}"
}
config_load gateway
@@ -287,13 +283,13 @@ if [ "${enable}" -eq 0 ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ "${1}" == "deconfig" ]; then
if [ "${wan_intf}" = "${INTERFACE}" ]; then
if [ "${1}" = "deconfig" ]; then
rm -rf /var/state/gwinfo
return 0
fi
json_load "$(ifstatus ${INTERFACE})"
json_load "$(ifstatus "${INTERFACE}")"
json_get_var dev_name device ""
json_select data
json_get_var dhcp_ip dhcpserver ""
@@ -303,7 +299,7 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
return 0
fi
MAC="$(get_mac_address $dhcp_ip $dev_name)"
MAC=$(get_mac_address "${dhcp_ip}" "${dev_name}")
mkdir -p /var/state
touch /var/state/gwinfo
@@ -326,8 +322,8 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
return 0
fi
len=$(printf "$opt125"|wc -c)
get_vivsoi "$opt125" "$len"
len=$(echo -n "${opt125}" | wc -c)
get_vivsoi "${opt125}" "${len}"
if [ "${GW_DISCOVERED}" -eq 0 ]; then
send_unknown_gw_event "${MAC}"
@@ -341,19 +337,18 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
uci -q -c /var/state commit gwinfo
# Check for USP parameters
ubus -t 15 wait_for umdns
if [ "${?}" -ne 0 ]; then
if ! ubus -t 15 wait_for umdns; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0
fi
resp=$(send_host_query $dev_name)
resp=$(send_host_query "${dev_name}")
if [ "${resp}" -ne 0 ]; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0
fi
ID="$(get_usp_agent_id $dhcp_ip)"
ID=$(get_usp_agent_id "${dhcp_ip}")
if [ -z "${ID}" ]; then
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
return 0

View File

@@ -5,12 +5,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=hostmngr
PKG_VERSION:=1.3.6
PKG_VERSION:=1.4.3
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=624fee52af9cce08c6c69a5f7dd2191691d61aa8
PKG_SOURCE_VERSION:=667866b8149d3df83a05536319eac02aee0b6d75
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/hostmngr.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -8,14 +8,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=icwmp
PKG_VERSION:=9.9.9.8
PKG_VERSION:=9.10.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
PKG_SOURCE_VERSION:=cef78dc528690386caac5a7ff6c1afca6dd3d315
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=fc34f19ec5ab691b3d815a0d1d917903d310db75
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -31,7 +31,6 @@ config cpe 'cpe'
option bind_retries '5'
option userid '' #$OUI-$SER
option passwd ''
option port '7547'
option provisioning_code ''
option amd_version '5'
# compression possible configs: InstanceNumber, InstanceAlias

View File

@@ -133,9 +133,56 @@ add_firewall_rule() {
fi
}
remove_port_protection() {
local enabled chain rule rule_num
config_get enabled "${1}" "${2}"
if [ "${enabled}" -eq 1 ]; then
config_get zonename "$1" name
[ -n "$zonename" ] || return 0
chain='prerouting_'$zonename'_rule'
while rule=$(iptables -w -t nat -nL "$chain" --line-numbers | grep -m 1 -w CWMP_Port_protection); do
rule_num=${rule%%[$' \t']*}
iptables -w -t nat -D "$chain" "$rule_num"
done
fi
}
cleanup_port_protection() {
config_load firewall
config_foreach remove_port_protection zone masq
}
install_port_protection() {
local PORT="${3}"
local enabled zonename chain
config_get enabled "${1}" "${2}"
if [ "${enabled}" -eq 1 ]; then
config_get zonename "${1}" name
[ -n "$zonename" ] || return 0
chain='prerouting_'$zonename'_rule'
iptables -w -t nat -I "$chain" -p tcp --dport "$PORT" -j ACCEPT -m comment --comment=CWMP_Port_protection
iptables -w -t nat -I "$chain" -p udp --dport "$PORT" -j ACCEPT -m comment --comment=CWMP_Port_protection
fi
}
add_port_protection() {
config_load firewall
config_foreach install_port_protection zone masq "${1}"
}
configure_connection_req_rules() {
app="${1}"
cleanup_port_protection
wan="$(uci -q get cwmp.cpe.default_wan_interface)"
wan="${wan:-wan}"
@@ -175,8 +222,11 @@ configure_connection_req_rules() {
fi
fi
port=$(uci -q get cwmp.cpe.port)
port="${port:-7547}"
port=$(uci -q -c /var/state get icwmp.cpe.port)
if [ -z "${port}" ]; then
log "cwmp cpe port not configured"
exit 0
fi
ipaddr=$(uci -q get cwmp.cpe.allowed_cr_ip)
if [ -n "${ipaddr}" ]; then
@@ -197,6 +247,8 @@ configure_connection_req_rules() {
# Close the ACS port at Lan side
close_downstream_acs_port "${lan}" "${port}"
fi
add_port_protection "${port}"
}
load_zone_names

View File

@@ -5,7 +5,6 @@ uci -q batch <<-EOT
set firewall.cwmp=include
set firewall.cwmp.path=/etc/icwmpd/firewall.cwmp
set firewall.cwmp.reload=1
commit firewall
EOT
exit 0

View File

@@ -16,12 +16,12 @@ get_opt43() {
local opt43="$1"
local len="$2"
[ "$len" -gt "2" ] || return
[ "${len}" -gt 2 ] || return
first_byte=${opt43:0:2}
first_byte=$(printf "%d\n" "0x$first_byte")
if [ $len -ge 4 ] && [ $first_byte -ge 1 ] && [ $first_byte -le 4 ]; then
if [ "${len}" -ge 4 ] && [ "${first_byte}" -ge 1 ] && [ "${first_byte}" -le 4 ]; then
# it is in encapsulated form
# opt43 encapsulated vendor-specific option has data in below format
# Code Len Data item Code Len Data item Code
@@ -35,7 +35,7 @@ get_opt43() {
data="${opt43}"
rem_len="${len}"
# parsing of suboption of option 43
while [ $rem_len -gt 0 ]; do
while [ "${rem_len}" -gt 0 ]; do
# get the suboption id
sub_opt_id=${data:0:2}
sub_opt_id=$(printf "%d\n" "0x$sub_opt_id")
@@ -50,13 +50,13 @@ get_opt43() {
# assign the value found in sub option
case "${sub_opt_id}" in
"1") DHCP_ACS_URL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"1") DHCP_ACS_URL=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"2") DHCP_PROV_CODE=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"2") DHCP_PROV_CODE=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"3") MIN_WAIT_INVL=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"3") MIN_WAIT_INVL=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
"4") INVL_MULTIPLIER=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
"4") INVL_MULTIPLIER=$(echo -n "${sub_opt_val}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
;;
esac
@@ -70,13 +70,14 @@ get_opt43() {
rem_len=$((rem_len - sub_opt_end))
done
else
DHCP_ACS_URL=$(echo -n $opt43 | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
DHCP_ACS_URL=$(echo -n "${opt43}" | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
fi
}
config_load cwmp
config_get wan_intf cpe default_wan_interface "wan"
config_get dhcp_discovery acs dhcp_discovery "0"
config_get_bool insecure_enable acs insecure_enable "0"
config_get dhcp_url acs dhcp_url ""
config_get min_wait_intvl acs dhcp_retry_min_wait_interval "0"
config_get intvl_multi acs dhcp_retry_interval_multiplier "0"
@@ -92,9 +93,9 @@ if [ "$discovery_enable" = "0" ]; then
return 0
fi
if [ "${wan_intf}" == "${INTERFACE}" ]; then
if [ "${wan_intf}" = "${INTERFACE}" ]; then
if [ -n "$opt43" ]; then
len=$(printf "$opt43"|wc -c)
len=$(echo -n "$opt43"|wc -c)
get_opt43 "$opt43" "$len"
fi
@@ -102,6 +103,17 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
return 0
fi
if [ "${insecure_enable}" -eq "0" ]; then
case $DHCP_ACS_URL in
https://*)
log "ACS url $DHCP_ACS_URL has https"
;;
*)
return 0
;;
esac
fi
sec=$(uci -q get cwmp.acs)
if [ -z "${sec}" ]; then

View File

@@ -6,12 +6,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=ieee1905
PKG_VERSION:=8.7.40
PKG_VERSION:=8.7.44
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=06e45ad44433b98b0630dab59d943fade7c24269
PKG_SOURCE_VERSION:=29ba8f04dc6bd7e77683352c0c71988f51fbadf8
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/ieee1905.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
@@ -116,7 +116,7 @@ MAKE_PATH:=src
define Package/ieee1905/install
$(CP) ./files/* $(1)/
$(CP) ./files/etc $(1)/
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/lib/ieee1905
$(INSTALL_DIR) $(1)/usr/sbin

View File

@@ -0,0 +1,23 @@
{
"Device.IEEE1905.AL.": {
"type": "object",
"protocols": [
"cwmp",
"usp"
],
"access": false,
"array": false,
"{BBF_VENDOR_PREFIX}LocalOnlyMode": {
"type": "boolean",
"read": true,
"write": true,
"protocols": [
"cwmp",
"usp"
],
"description": "Enable or disable interfaces from ieee1905.",
"datatype": "boolean"
}
}
}

View File

@@ -83,7 +83,7 @@ start_service() {
validate_ieee1905_config || return 1;
procd_open_instance
procd_set_param command "/usr/sbin/ieee1905d" "-ddddd" "-o" "/tmp/ieee1905.log"
procd_set_param command "/usr/sbin/ieee1905d" "-o" "/tmp/ieee1905.log" "-f"
procd_set_param respawn
procd_set_param limits core="unlimited"
# procd_set_param env IEEE1905_LOG_CMDU=1

View File

@@ -13,7 +13,7 @@ PKG_INSTALL:=1
PKG_SOURCE_PROTO=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/imonitor.git
PKG_SOURCE_VERSION:=4beb1d5d6925507f1850a84c0b83aaf12a082f7f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=${PKG_NAME}-${PKG_VERSION}
PKG_INSTALL:=1

View File

@@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
PKG_RELEASE:=$(COMMITCOUNT)
PKG_LICENSE:=PROPRIETARY
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=25e32ac5a860aec6e53e3449565b71595073e014
PKG_SOURCE_VERSION:=5ad41ca8eb5de887487feb7148b5dce44943218c
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/iopsys-analytics.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip

View File

@@ -14,7 +14,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=ac1beae4794f99533b28db7d0e6e80f4c268a3e8
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ipt-trigger.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -17,7 +17,7 @@ PKG_NAME:=libpicoevent-bcm
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk

View File

@@ -17,7 +17,7 @@ PKG_NAME:=libpicoevent
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
include $(INCLUDE_DIR)/package.mk

View File

@@ -5,13 +5,13 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=libqos
PKG_VERSION:=7.2.109
PKG_VERSION:=7.2.111
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libqos.git
PKG_SOURCE_VERSION:=4948d372c3d7e43a0ba9aee517dbb83b94bba3dc
PKG_SOURCE_VERSION:=2e4c6a9c27e0f4f68dfe7a5c930afefd8dc7119a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
@@ -65,7 +65,7 @@ define Package/libqos
SUBMENU:=IOPSYS HAL libs
MENU:=1
TITLE:= QoS library (libqos)
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp
DEPENDS+=+libnl +libnl-route +libeasy +TARGET_brcmbca:bcm963xx-bsp +TARGET_airoha:libuci
endef
define Package/libqos/config

View File

@@ -6,7 +6,7 @@ PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/apietila/libtrace.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.zst
PKG_SOURCE_VERSION:=e4b4c5cce35a52da152776a00532aa0b80879c5b
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=libvoice-airoha
PKG_RELEASE:=1
PKG_VERSION:=1.1.7
PKG_VERSION:=1.1.8
PKG_LICENSE:=PROPRIETARY
PKG_LICENSE_FILES:=LICENSE
@@ -17,8 +17,8 @@ LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=3a30086a68a3409f0396acb01380f91daabf7a2f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=9763c574ec69e2aa492db4f1296d4bcd53776fba
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -25,6 +25,5 @@ db commit
# configure the PCM for DECT/DCX81
[ -f "/proc/device-tree/aliases/dcx81-uart" ] && {
uci set dect.global.pcm_fsync='SHORT_LF'
uci set dect.global.pcm_slot_start='8'
uci set dect.global.dect_channel_start='3'
}

View File

@@ -18,7 +18,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=baf5ebfb45404714bbfcc3068080f93265934d8a
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -18,7 +18,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/$(PKG_NAME).git
PKG_SOURCE_VERSION:=0b2bef862fb5aea0b285e339459f46779224e2d0
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,27 +1,32 @@
#
# Copyright (C) 2020-2023 Iopsys
# Copyright (C) 2019-2024 Iopsys
# Copyright (C) 2025 Genexis Sweden AB
#
include $(TOPDIR)/rules.mk
PKG_NAME:=libwifi
PKG_VERSION:=7.13.10
PKG_VERSION:=7.22.11
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_VERSION:=5e8d828c01ed7ab2feba9028b603dde9708cb656
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
PKG_SOURCE_VERSION:=6572047d613d4dc88ed83a80fb4ae0798ab71078
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/libwifi.git
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
PKG_MIRROR_HASH:=skip
endif
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_LICENSE:=LGPL-2.1-only
PKG_LICENSE_FILES:=LICENSE
PKG_LICENSE_FILES:=
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@genexis.eu>
MAKE_VERBOSE := 1
include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/kernel.mk
include $(INCLUDE_DIR)/cmake.mk
ifeq ($(CONFIG_TARGET_brcmbca),y)
TARGET_PLATFORM=BROADCOM
@@ -42,10 +47,20 @@ else ifeq ($(CONFIG_TARGET_armvirt),y)
else ifeq ($(CONFIG_TARGET_airoha),y)
TARGET_PLATFORM=ECONET
TARGET_WIFI_TYPE=MEDIATEK
TARGET_CFLAGS +=-DIOPSYS_ECONET
TARGET_CFLAGS +=-DIOPSYS_ECONET -I$(LINUX_DIR)/include/uapi/linux/mtk_nl80211_inc
ifeq ($(CONFIG_TARGET_airoha_an7581),y)
TARGET_CFLAGS +=-DCONFIG_MTK
endif
else ifeq ($(CONFIG_TARGET_mediatek),y)
TARGET_PLATFORM=MEDIATEK
TARGET_WIFI_TYPE=MAC80211
ifeq ($(CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_cx750),y)
TARGET_WIFI_TYPE=MEDIATEK
TARGET_CFLAGS +=-DCONFIG_MTK -I$(LINUX_DIR)/include/uapi/linux/mtk_nl80211_inc
else ifeq ($(CONFIG_TARGET_DEVICE_mediatek_filogic_DEVICE_mediatek_mt7987a-spim-nand-an8801sb),y)
TARGET_WIFI_TYPE=MEDIATEK
TARGET_CFLAGS +=-DCONFIG_MTK -I$(LINUX_DIR)/include/uapi/linux/mtk_nl80211_inc
endif
else ifeq ($(CONFIG_TARGET_ipq95xx),y)
TARGET_PLATFORM=IPQ95XX
TARGET_WIFI_TYPE=QUALCOMM
@@ -67,7 +82,7 @@ endif
PKG_BUILD_DEPENDS:=PACKAGE_kmod-mt7915e_en7523:mt76_en7523
ifneq ($(CONFIG_PACKAGE_libwifi),)
TARGET_CFLAGS +=-DHAS_WIFI
CMAKE_OPTIONS +=-DHAS_WIFI=ON
endif
ifeq ($(CONFIG_LIBWIFI_USE_CTRL_IFACE),y)
@@ -78,18 +93,8 @@ ifeq ($(CONFIG_LIBWIFI_SKIP_PROBES),y)
TARGET_CFLAGS +=-DLIBWIFI_BRCM_SKIP_PROBES
endif
TARGET_CFLAGS += \
-I$(STAGING_DIR)/usr/include \
-I$(STAGING_DIR)/usr/include/openssl \
-I$(STAGING_DIR)/usr/include/libnl3
MAKE_FLAGS += \
CFLAGS="$(TARGET_CFLAGS) -Wall -I./" \
LDFLAGS="$(TARGET_LDFLAGS)" \
FPIC="$(FPIC)" \
PLATFORM="$(TARGET_PLATFORM)" \
WIFI_TYPE="$(TARGET_WIFI_TYPE)" \
subdirs="$(subdirs)"
CMAKE_OPTIONS += -DPLATFORM=$(TARGET_PLATFORM) -DWIFI_TYPE=$(TARGET_WIFI_TYPE)
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
@@ -97,43 +102,39 @@ define Build/Prepare
endef
endif
define Package/libwifi-common
SECTION:=libs
CATEGORY:=Libraries
TITLE:=libwifi
SUBMENU:=IOPSYS HAL libs
DEPENDS:=+libopenssl
MENU:=1
define Package/libwifiutils
SECTION:=libs
CATEGORY:=Libraries
TITLE:= WiFi utility library (libwifiutils.so)
DEPENDS+=+libnl +libnl-route +libeasy +libopenssl
endef
define Package/libwifiutils/description
Library provides WiFi utility functions
endef
define Package/libwifi
SECTION:=libs
CATEGORY:=Libraries
TITLE:= WiFi HAL library (libwifi-7.so.m)
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcm963xx-bsp
endef
define Package/libwifi/description
Library provides WiFi HAL APIs and WiFi common utility functions
endef
define Package/libwifiutils
$(call Package/libwifi-common)
TITLE:= WiFi utility library (libwifiutils.so)
DEPENDS+=+libnl +libnl-route +libeasy
Library provides WiFi HAL APIs
endef
define Build/InstallDev/libwifiutils
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/wifidefs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifiutils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifiutils*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libwifiutils/wifidefs.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifiutils/wifiutils.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifiutils/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifiutils/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifi
$(call Package/libwifi-common)
TITLE:= WiFi library (libwifi)
DEPENDS+=+libnl +libnl-route +libeasy +libwifiutils +TARGET_brcmbca:bcm963xx-bsp
$(CP) $(PKG_BUILD_DIR)/libwifiutils/libwifiutils*.so* $(1)/usr/lib/
endef
define Package/libwifi/config
@@ -154,13 +155,12 @@ define Package/libwifi/config
endif
endef
define Build/InstallDev/libwifi
$(INSTALL_DIR) $(1)/usr/include
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/wifiops.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi-7*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifiops.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/wifi.h $(1)/usr/include/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef
@@ -173,7 +173,7 @@ endef
define Package/libwifi/install
$(INSTALL_DIR) $(1)/usr/lib
$(CP) $(PKG_BUILD_DIR)/libwifi-7*.so* $(1)/usr/lib/
$(CP) $(PKG_BUILD_DIR)/libwifi/libwifi-7*.so* $(1)/usr/lib/
endef
$(eval $(call BuildPackage,libwifiutils))

View File

@@ -12,7 +12,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
PKG_SOURCE_VERSION:=62441fdfe14a39bff8fff7c62307bd7b54d7240f
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,6 +1,6 @@
#!/bin/sh /etc/rc.common
START=12
START=09
USE_PROCD=1

View File

@@ -63,7 +63,7 @@ create_service_section() {
append_conf " flush 1"
append_conf " daemon off"
append_conf " log_level info"
append_conf " coro_stack_size 24576"
append_conf " coro_stack_size 1048576"
append_conf " parsers_file /etc/fluent-bit/parsers.conf"
append_conf " hot_reload on"
append_conf ""

View File

@@ -13,7 +13,7 @@ PKG_SOURCE_VERSION:=d0fb770eacd6691b98df138b60f5116e02f71a9b
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/loop-detector
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)

View File

@@ -63,8 +63,12 @@ config AGENT_CHECK_PARTIAL_WIFI_RELOAD
bool "Option that allow SSID/PSK simple reload"
default y
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let dynbhd through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
config DYNBH
bool "Enable map-agent dynamic Ethernet backhaul management"
default n
config DYNBH_DYNAMICALLY_PERSIST_CONTROLLER
bool "Let map-agent through AP-Autoconfiguration Search and DHCP Discovery determine the controller or agent role"
config AGENT_UNASSOC_STA_CONT_MONITOR
bool "Enable continuos monitoring of unassociated clients"

View File

@@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-agent
PKG_VERSION:=6.3.7.17
PKG_VERSION:=6.5.0.10
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=7f71fafbec49fa4b25d1e8d07cfc1fee5b4bbab0
PKG_SOURCE_VERSION:=1a9763bd4e520975e6951f77e85f369487cf1318
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
PKG_LICENSE:=BSD-3-Clause
@@ -38,14 +38,6 @@ ifeq ($(CONFIG_AGENT_USE_LIBDPP),y)
TARGET_CFLAGS += -DUSE_LIBDPP
endif
define Package/dynbhd
SECTION:=utils
CATEGORY:=Utilities
TITLE:=Dynamic Backhaul Daemon
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
+ieee1905-map-plugin +map-agent
endef
ifeq ($(CONFIG_AGENT_ZEROTOUCH_DPP),y)
TARGET_CFLAGS += -DZEROTOUCH_DPP
endif
@@ -54,10 +46,6 @@ define Package/map-agent/description
This package provides EasyMesh R6 compliant Wi-Fi Multi-AP Agent.
endef
define Package/dynbhd/description
Dyanmic LAN/WAN port detection and loop avoidance.
endef
define Package/map-agent/config
source "$(SOURCE)/Config.in"
endef
@@ -115,7 +103,11 @@ ifeq ($(CONFIG_AGENT_CHECK_PARTIAL_WIFI_RELOAD),y)
TARGET_CFLAGS += -DCHECK_PARTIAL_WIFI_RELOAD
endif
ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
ifeq ($(CONFIG_DYNBH),y)
TARGET_CFLAGS += -DDYNBH
endif
ifeq ($(CONFIG_DYNBH_DYNAMICALLY_PERSIST_CONTROLLER),y)
TARGET_CFLAGS += -DPERSIST_CONTROLLER
endif
@@ -128,6 +120,10 @@ MAKE_PATH:=src
define Package/map-agent/install
$(INSTALL_DIR) $(1)/etc
$(CP) ./files/* $(1)/
ifeq ($(CONFIG_DYNBH),y)
$(RM) $(1)/etc/hotplug.d/ethernet/map-dynamic-backhaul
$(RM) $(1)/etc/hotplug.d/ethernet/map-topology-discovery
endif
$(INSTALL_DIR) $(1)/usr/lib
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi
@@ -135,15 +131,6 @@ define Package/map-agent/install
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapagent $(1)/usr/sbin/
endef
define Package/dynbhd/install
$(INSTALL_DIR) $(1)/etc
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_DIR) $(1)/lib/wifi/dynbhd
$(INSTALL_DIR) $(1)/etc/hotplug.d/ethernet
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dynbh/dynbhd $(1)/usr/sbin/dynbhd
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dynbh/api $(1)/lib/wifi/dynbhd/api
# $(INSTALL_BIN) $(PKG_BUILD_DIR)/src/dynbh/map-dynamic-backhaul $(1)/etc/hotplug.d/ethernet/map-dynamic-backhaul
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
@@ -152,4 +139,3 @@ endef
endif
$(eval $(call BuildPackage,map-agent))
$(eval $(call BuildPackage,dynbhd))

View File

@@ -17,7 +17,7 @@ config dynamic_backhaul
option missing_bh_reconfig_timer '1800'
config controller_select
option id 'auto'
option mode 'auto'
option probe_int '20'
option retry_int '9'
option autostart '1'

View File

@@ -27,11 +27,6 @@ done
al_brnet="${al_bridge:3}"
[ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ] || exit 0
############## Dynamic Backhaul Daemon ##############
if [ -n "$(which dynbhd)" ]; then
exit 0
fi
########################################################
################ Dedicated ETH WAN Port ################
wanport="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
@@ -95,7 +90,8 @@ if [ "$LINK" = "up" ]; then
config_foreach remove_from_bridge bsta
config_foreach update_bstas bsta down
/lib/wifi/multiap set_uplink "eth" "$PORT"
hwaddr="$(ifconfig $PORT | grep -i hwaddr | awk '{print $5}' | awk '{print tolower($0)}')"
/lib/wifi/multiap set_uplink "eth" "$PORT" "$hwaddr"
else
/lib/wifi/multiap unset_uplink "eth"
#rm -f "$map_bh_file"

View File

@@ -7,20 +7,6 @@ USE_PROCD=1
IS_CFG_VALID=1
MAP_DEV="map_dev"
MAP_IF="map"
start_dynbhd_service() {
rm -f /var/run/multiap/multiap.backhaul
procd_open_instance
procd_set_param command "/usr/sbin/dynbhd"
procd_set_param respawn
# procd_set_param stdout 1
# procd_set_param stderr 1
procd_close_instance
}
validate_agent_section() {
uci_validate_section mapagent agent "agent" \
'enabled:bool:true' \
@@ -51,7 +37,7 @@ validate_cs_section() {
uci_validate_section mapagent $section "${section}" \
'local:bool:false' \
'id:string' \
'mode:string' \
'probe_int:range(0,1000):20' \
'retry_int:range(0,255):3' \
'autostart:bool:false'
@@ -179,17 +165,6 @@ create_dir() {
}
start_service() {
if [ -f /usr/sbin/dynbhd ]; then
# Start dynbhd only if the device is operating in extender/repeater mode
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
if [ "${al_bridge:0:3}" = "br-" ]; then
al_brnet="${al_bridge:3}"
if [ "$(uci -q get network.${al_brnet}.proto)" == "dhcp" ]; then
start_dynbhd_service
fi
fi
fi
config_load "mapagent"
validate_agent_config || return 1;

View File

@@ -1,53 +0,0 @@
#!/bin/sh
. /lib/functions.sh
cfg=mapagent
config_load $cfg
if uci -q get $cfg.agent.partial_wifi_reload >/dev/null; then
uci -q set $cfg.agent.partial_wifi_reload='0'
fi
if uci -q get $cfg.agent.chan_ch_relay_mcast >/dev/null; then
uci -q set $cfg.agent.chan_ch_relay_mcast='0'
fi
rename_dpp_uri() {
local section="$1"
local type device ifname band
local ch_list=""
config_get type "$section" type
config_get device "$section" device
config_get ifname "$section" ifname
config_get band "$section" band
config_get chirp_interval "$section" chirp_interval
append_chan() {
local val="$1"
local chan_num="${val#*/}"
ch_list="$ch_list $chan_num"
}
config_list_foreach "$section" chan append_chan
new_section=$(uci add "$cfg" dpp_chirp)
[ -n "$type" ] && uci set "$cfg.$new_section.type=$type"
[ -n "$device" ] && uci set "$cfg.$new_section.device=$device"
[ -n "$ifname" ] && uci set "$cfg.$new_section.ifname=$ifname"
[ -n "$band" ] && uci set "$cfg.$new_section.band=$band"
if [ -n "$chirp_interval" ]; then
uci set "${cfg}.${new_section}.chirp_interval=$chirp_interval"
fi
for ch in $ch_list; do
uci add_list "$cfg.$new_section.channel=$ch"
done
uci delete "$cfg.$section"
}
uci -q delete "$cfg.@dpp_controller[0]"
config_foreach rename_dpp_uri dpp_uri
exit 0

View File

@@ -0,0 +1,15 @@
#!/bin/sh
. /lib/functions.sh
adapt_cntlr_sel() {
local section=$1
id=$(uci -q get mapagent.@controller_select[0].id)
uci -q del mapagent.@controller_select[0].id
# re-apply any custom value
[ -z "${id}" ] || uci -q set mapagent.@controller_select[0].mode="${id}"
}
adapt_cntlr_sel

View File

@@ -10,6 +10,11 @@ network_mode="$(fw_printenv -n netmode)" # default is layer3
multiap_mode="$(fw_printenv -n multiap_mode)" # default is full
disable_mlo="$(fw_printenv -n disable_mlo)"
is_logan() {
[ -d /sys/module/mt_wifi ] && return 0
return 1
}
is_airoha() {
[ -f /proc/device-tree/compatible ] || return
strings /proc/device-tree/compatible | grep -qE '^(econet,|airoha,)'; return
@@ -64,45 +69,45 @@ generate_multiap_config() {
device="$dev"
ifprefix_radio=""
if is_airoha; then
if is_logan; then
uci set mapagent.agent.mld_ap_prefix="bss"
uci set mapagent.agent.mld_sta_prefix="sta"
ifname_sta=""
case "$band" in
2g)
ifprefix="ra%"
ifname="ra0"
ifname_bh="ra1"
ifname_sta="apcli0"
;;
5g)
ifprefix="rai%"
ifname="rai0"
ifname_bh="rai1"
ifname_sta="apclii0"
;;
6g)
ifprefix="rax%"
ifname="rax0"
ifname_bh="rax1"
ifname_sta="apclix0"
;;
esac
ifprefix_radio="${ifprefix}"
if [ "${network_mode}" == "extender" ]; then
ifname="${ifname_sta}"
fi
[ "$disable_mlo" == "1" ] || {
uci set wireless.$dev.mlo="1"
uci set wireless.$dev.mlo_capable="1"
}
elif is_airoha; then
if [ -d "/sys/module/mt76" ]; then
ifprefix="wlan%_%"
ifname="wlan${devidx}_0"
ifname_bh="wlan${devidx}_1"
else
uci set mapagent.agent.mld_prefix="bss"
ifname_sta=""
case "$band" in
2g)
ifprefix="ra%"
ifname="ra0"
ifname_bh="ra1"
ifname_sta="apcli0"
;;
5g)
ifprefix="rai%"
ifname="rai0"
ifname_bh="rai1"
ifname_sta="apclii0"
;;
6g)
ifprefix="rax%"
ifname="rax0"
ifname_bh="rax1"
ifname_sta="apclix0"
;;
esac
ifprefix_radio="${ifprefix}"
if [ "${network_mode}" == "extender" ]; then
ifname="${ifname_sta}"
fi
[ "$disable_mlo" == "1" ] || {
uci set wireless.$dev.mlo="1"
uci set wireless.$dev.mlo_capable="1"
}
fi
uci set wireless.$dev.channels="$channels"
uci commit wireless
elif is_broadcom; then

View File

@@ -6,9 +6,9 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-controller
PKG_VERSION:=6.4.4.13
PKG_VERSION:=6.4.5.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE_VERSION:=bd0fb2b63830e19038d9495517c03fdc3900cdfa
PKG_SOURCE_VERSION:=f335cf5bfdf700843173fcdd5d61d1900cc0aa8a
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
LOCAL_DEV=0

View File

@@ -4,11 +4,10 @@ config controller 'controller'
option registrar '2 5 6'
option debug '2'
option bcn_metrics_max_num '10'
option initial_channel_scan '0'
option enable_ts '0'
option primary_vid '1'
option primary_pcp '0'
option stale_sta_timeout '30d'
option stale_sta_timeout '20d'
option de_collect_interval '60'
list plugin 'zerotouch'

View File

@@ -20,7 +20,6 @@ validate_controller_section() {
'registrar:string' \
'debug:range(0,16)' \
'bcn_metrics_max_num:range(1,256)' \
'initial_channel_scan:bool:true' \
'resend_num:uinteger:0' \
'allow_bgdfs:range(0,2629744)' \
'stale_sta_timeout:string' \

View File

@@ -1,31 +0,0 @@
#!/bin/sh
. /lib/functions.sh
cfg=mapcontroller
config_load $cfg
uci -q get $cfg.controller.debug >/dev/null 2>&1 && \
uci set $cfg.controller.debug='2'
allow_bgdfs=$(uci -q get $cfg.controller.allow_bgdfs || echo "0")
channel_plan_val=$(uci -q get $cfg.controller.channel_plan || echo "0")
uci -q delete $cfg.controller.allow_bgdfs
uci -q delete $cfg.controller.channel_plan
uci -q get $cfg.controller.stale_sta_timeout >/dev/null 2>&1 || \
uci set $cfg.controller.stale_sta_timeout='30d'
if [ -f /usr/lib/mapcontroller/zerotouch.so ]; then
uci -q del_list $cfg.controller.plugin='zerotouch'
uci -q add_list $cfg.controller.plugin='zerotouch'
fi
if ! uci show $cfg 2>/dev/null | grep -q "=channel_plan"; then
section=$(uci add $cfg channel_plan)
uci set $cfg.$section.preclear_dfs="$allow_bgdfs"
uci set $cfg.$section.acs="$channel_plan_val"
fi
exit 0

View File

@@ -0,0 +1,66 @@
#!/bin/sh
. /lib/functions.sh
cfg="mapcontroller"
config_load "$cfg"
used_ids=""
collect_used_ids() {
local section="$1"
local id
id=$(uci -q get ${cfg}.${section}.id)
if [ -n "$id" ] && printf "%s" "$id" | grep -qE '^[0-9]+$'; then
used_ids="$used_ids $id"
fi
}
# Find first available ID from 0 to INT32_MAX
find_first_available_id() {
local max_int=2147483647
local expected=0
local id
# Convert list to sorted unique list
sorted_ids=$(printf "%s\n" $used_ids | sort -n | uniq)
for id in $sorted_ids; do
if [ "$id" -eq "$expected" ]; then
expected=$((expected + 1))
elif [ "$id" -gt "$expected" ]; then
# Found a gap -> return the gap
echo "$expected"
return
fi
done
# If no gaps, next available is `expected`
if [ "$expected" -le "$max_int" ]; then
echo "$expected"
else
echo -1
fi
}
# Assign ID if missing
add_qos_rule_id() {
local section="$1"
local id
id=$(uci -q get ${cfg}.${section}.id)
if [ -z "$id" ]; then
new_id=$(find_first_available_id)
[ "$new_id" -ge 0 ] || return # No available ID
uci -q set ${cfg}.${section}.id="$new_id"
used_ids="$used_ids $new_id"
fi
}
# Step 1: Collect all existing IDs
config_foreach collect_used_ids qos_rule
# Step 2: Assign IDs to rules missing them
config_foreach add_qos_rule_id qos_rule

View File

@@ -14,5 +14,3 @@ for sec in $sections; do
uci rename $cfg.$s=$sec
done
uci commit $cfg

View File

@@ -21,21 +21,9 @@ adapt_sta_steering() {
uci -q del $cfg.@sta_steering[0].use_usta_metrics
uci -q del $cfg.@sta_steering[0].bandsteer
uci -q del $cfg.@sta_steering[0].diffsnr
if [ -f /usr/lib/mapcontroller/rcpi.so ]; then
uci -q del_list $cfg.@sta_steering[0].plugins="rcpi"
uci -q add_list $cfg.@sta_steering[0].plugins="rcpi"
fi
if [ -f /usr/lib/mapcontroller/rate.so ]; then
uci -q del_list $cfg.@sta_steering[0].plugins="rate"
uci -q add_list $cfg.@sta_steering[0].plugins="rate"
fi
if [ -f /usr/lib/mapcontroller/bsteer.so ]; then
uci -q del_list $cfg.@sta_steering[0].plugins="bsteer"
uci -q add_list $cfg.@sta_steering[0].plugins="bsteer"
fi
uci del_list $cfg.@sta_steering[0].plugins="rcpi"
uci add_list $cfg.@sta_steering[0].plugins="rcpi"
uci -q set $cfg.@sta_steering[0].plugins_enabled="1"
uci -q set $cfg.@sta_steering[0].plugins_policy="any"

View File

@@ -5,7 +5,7 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=map-plugins
PKG_VERSION:=1.2.6
PKG_VERSION:=1.2.7
LOCAL_DEV=0
ifneq ($(LOCAL_DEV),1)
@@ -59,7 +59,8 @@ define Package/map-plugins
endef
define Package/map-plugins/description
Provides extra Multi-AP services viz. steering, channel-planning, self-organizing network etc.
Provides extra Multi-AP services viz. steering, channel-planning,
self-organizing network, zero-touch onboarding etc.
endef
define Package/map-plugins/install
@@ -70,5 +71,11 @@ define Build/Compile
$(foreach p,$(plugins),$(call Build/Compile/map-plugins-$(p), $(1)))
endef
ifeq ($(LOCAL_DEV),1)
define Build/Prepare
rsync -r --exclude=.* ~/git/map-plugins/ $(PKG_BUILD_DIR)/
endef
endif
$(eval $(call BuildPackage,map-plugins))
$(eval $(foreach p,$(ppkg),$(call BuildPackage,$(p))))

View File

@@ -14,7 +14,7 @@ ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/mcastmngr.git
PKG_SOURCE_VERSION:=17d73b8f1947823a0d32ed589a240a2642904fe1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -5,14 +5,14 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=netmngr
PKG_VERSION:=1.1.8
PKG_VERSION:=1.2.4
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/netmngr.git
PKG_SOURCE_VERSION:=6310f32b80f8abeccbf99ad55ce88792b19342d6
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE_VERSION:=8240c6089cdd44f268db135920800b8fc1d65ca9
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

View File

@@ -1,109 +0,0 @@
# Creating Custom Netmodes in IOWRT
This guide provides developers with detailed instructions on how to create and manage custom network modes (netmodes) in IOWRT. The `netmode` script allows for flexible network configuration, and developers can define their own modes by structuring the necessary files and scripts within the `/etc/netmodes/` directory.
## Table of Contents
1. [Overview of Netmodes](#overview-of-netmodes)
2. [Directory Structure](#directory-structure)
3. [Creating a Custom Netmode](#creating-a-custom-netmode)
- [Step 1: Pre-Execution Scripts](#step-1-pre-execution-scripts)
- [Step 2: UCI Configuration Files](#step-2-uci-configuration-files)
- [Step 3: Custom Execution Scripts](#step-3-custom-execution-scripts)
- [Step 4: Post-Execution Scripts](#step-4-post-execution-scripts)
4. [Enabling and Switching Netmodes](#enabling-and-switching-netmodes)
## Overview of Netmodes
Netmodes in IOWRT provide a way to switch between different network configurations based on the needs of the environment. Developers can create custom netmodes by organizing scripts and configuration files in specific directories under `/etc/netmodes/<NETMODE_NAME>`.
## Directory Structure
A custom netmode is defined within the `/etc/netmodes/<NETMODE_NAME>` directory, which should contain the following subdirectories:
- **/lib/netmode/pre/**: Generic scripts executed before the netmode-specific configurations are applied.
- **/etc/netmodes/<NETMODE_NAME>/uci/**: Contains UCI configuration files that will be copied to `/etc/config/` during the application of the netmode.
- **/etc/netmodes/<NETMODE_NAME>/scripts/**: Custom scripts specific to the netmode that are executed after the UCI configurations are applied.
- **/lib/netmode/post/**: Generic scripts executed after the netmode-specific configurations are completed.
## Creating a Custom Netmode
To create a new netmode, follow these steps:
### Step 1: Pre-Execution Scripts
Scripts located in `/lib/netmode/pre/` are executed before any mode-specific actions. These are typically used for preparing the system or cleaning up configurations from the previous netmode.
- **Create Pre-Execution Scripts**:
- Place your generic pre-execution scripts in `/lib/netmode/pre/`.
- Example script (`/lib/netmode/pre/cleanup.sh`):
```bash
#!/bin/sh
echo "Cleaning up old network configurations..."
# Add commands here
```
### Step 2: UCI Configuration Files
The UCI configuration files stored in `/etc/netmodes/<NETMODE_NAME>/uci/` will be copied to `/etc/config/`, effectively applying the desired network configuration.
- **Place UCI Config Files**:
- Create UCI configuration files under `/etc/netmodes/<NETMODE_NAME>/uci/`.
- Example (`/etc/netmodes/bridge/uci/network`):
````bash
config device 'br_lan'
option name 'br-lan'
option type 'bridge'
option multicast_to_unicast '0'
option bridge_empty '1'
list ports 'eth1'
list ports 'eth3'
list ports 'eth4'
config interface 'lan'
option proto 'dhcp'
option device 'br-lan'
option force_link '1'
option reqopts '43 125'
````
### Step 3: Custom Execution Scripts
After the UCI files are applied, any scripts in `/etc/netmodes/<NETMODE_NAME>/scripts/` are executed. These can be used to perform additional configuration tasks that are specific to the netmode.
- **Create Custom Scripts**:
- Add scripts to `/etc/netmodes/<NETMODE_NAME>/scripts/`.
- Example (`/etc/netmodes/bridge/scripts/setup_bridge.sh`):
```bash
#!/bin/sh
echo "Setting up bridge mode..."
# Additional configuration commands here
```
### Step 4: Post-Execution Scripts
Finally, the generic scripts in `/lib/netmode/post/` are executed. These scripts typically finalize the setup or perform any necessary cleanups.
- **Create Post-Execution Scripts**:
- Place scripts in `/lib/netmode/post/`.
- Example script (`/lib/netmode/post/restart_services.sh`):
```bash
#!/bin/sh
echo "Restarting network services..."
# Add commands here
```
## Enabling and Switching Netmodes
The netmode mechanism can be enabled or disabled via the UCI configuration, and you can switch between netmodes using UCI commands.
- **Enable Netmode**:
```bash
uci set netmode.global.enabled=1
uci commit netmode
```
- **Switch Netmode**:
```bash
uci set netmode.global.mode='<NETMODE_NAME>'
uci commit netmode
```

View File

@@ -0,0 +1,901 @@
# Advanced Mode - Complete Configuration Guide
## Table of Contents
1. [Overview](#overview)
2. [Interface Types](#interface-types)
3. [Configuration Examples](#configuration-examples)
4. [Use Case Scenarios](#use-case-scenarios)
5. [TR-069/USP Configuration](#tr-069usp-configuration)
6. [Troubleshooting](#troubleshooting)
---
## Overview
The **advanced** mode is a unified, flexible network configuration mode for OpenWrt/iopsys routers. It provides a single, powerful interface for configuring:
- **Bridge interfaces** with VLAN/QinQ support (traditional VLAN devices)
- **Bridge VLAN filtering** (modern kernel bridge features - recommended)
- **Routed interfaces** with VLAN/MACVLAN support
- **Standalone interfaces** (direct VLAN without bridge)
- **Mixed scenarios** (combine bridges and routed interfaces)
### Key Features
- ✅ Unified configuration syntax
- ✅ Multiple interface types in one configuration
- ✅ VLAN (802.1Q) and QinQ (802.1ad) support
- ✅ Modern bridge VLAN filtering for better performance
- ✅ MACVLAN support for multi-service routing
- ✅ Per-interface port assignment
- ✅ Flexible protocol configuration (DHCP, none, static)
- ✅ UCI device name resolution (LAN1 → eth1)
- ✅ Automatic reconfiguration on parameter changes
### Configuration Parameters
| Parameter | Description | Example |
|-----------|-------------|---------|
| `interface_names` | Comma-separated interface names | `wan,iptv,mgmt` |
| `interface_types` | Comma-separated interface types | `bridge:transparent,brvlan:wan-tagged:1499,route:vlan:100,direct:200` |
| `ports` | Comma-separated port assignments | `ALL,LAN1-LAN2-WAN,WAN` |
| `macaddrs` | Comma-separated MAC addresses (optional) | `BaseMACAddress,BaseMACAddressP1,AA:BB:CC:DD:EE:FF` |
### How It Works
When you change any configuration parameter and restart netmode:
1. The system detects the configuration change automatically
2. Old network configuration is cleaned up (interfaces, bridges, VLANs)
3. System configuration is preserved (loopback, physical devices)
4. New configuration is applied based on your parameters
5. No manual intervention needed!
---
## Interface Types
### Bridge Types (Traditional VLAN Devices)
Bridge types create L2 bridge interfaces using traditional VLAN devices (eth0.100, etc.).
| Type | Syntax | Description |
|------|--------|-------------|
| **Transparent** | `bridge:transparent` | No VLAN tagging on any port |
| **Tagged** | `bridge:tagged:VID` | All ports tagged with same VLAN ID |
| **WAN-Tagged** | `bridge:wan-tagged:VID` | Only WAN port tagged, LAN ports untagged |
| **Transparent QinQ** | `bridge:transparent-qinq:SVID` | LAN untagged, WAN single S-tag (802.1ad) |
| **Transparent QinQ (Double)** | `bridge:transparent-qinq:CVID:SVID` | LAN untagged, WAN double-tagged (C+S) |
| **Tagged QinQ** | `bridge:tagged-qinq:CVID:SVID` | LAN C-tagged, WAN double-tagged (C+S) |
| **QinQ (All ports)** | `bridge:qinq:CVID:SVID` | All ports double-tagged |
### Bridge VLAN Filtering Types (Modern Approach)
Bridge VLAN filtering uses kernel bridge VLAN filtering instead of creating VLAN devices. **Recommended for new deployments.**
| Type | Syntax | Description |
|------|--------|-------------|
| **Tagged** | `brvlan:tagged:VID` | All ports tagged with VLAN ID (uses bridge-vlan) |
| **WAN-Tagged** | `brvlan:wan-tagged:VID` | WAN tagged, LAN untagged (uses bridge-vlan) |
| **Mixed** | `brvlan:mixed:VID` | Custom tagged/untagged configuration |
**See [BRIDGE_VLAN_FILTERING.md](BRIDGE_VLAN_FILTERING.md) for detailed documentation.**
### Routed Types
Routed types create L3 routed interfaces (with NAT/firewall).
| Type | Syntax | Description |
|------|--------|-------------|
| **VLAN Routing** | `route:vlan:VID` | Routed interface on VLAN |
| **MACVLAN Routing** | `route:macvlan:MAC` | MACVLAN device with custom MAC (supports macros) |
| **VLAN + MAC Routing** | `route:vlan:VID:MAC` | Routed interface on VLAN with custom MAC |
| **Transparent Routing** | `route:transparent` | Routed interface on base device (no VLAN) |
### Standalone Types
Standalone types create VLAN interfaces without bridges or routing (proto=none by default).
| Type | Syntax | Description |
|------|--------|-------------|
| **Direct VLAN** | `direct:VID` | Standalone VLAN interface, proto=none |
### Device Reference Types
Device reference types allow multiple interfaces to share the same underlying device.
| Type | Syntax | Description |
|------|--------|-------------|
| **Device Reference** | `device-ref:INTERFACE` | References the device from another interface |
**Use Case**: Create separate IPv4 and IPv6 interfaces (wan and wan6) that share the same bridge or VLAN device.
**Example**:
```bash
# wan creates bridge on VLAN 2501 with DHCP
# wan6 shares the same br-wan device with DHCPv6
interface_names='wan,wan6'
interface_types='bridge:tagged:2501,device-ref:wan-dhcpv6'
ports='WAN,WAN'
```
**Result**:
- `wan`: Creates `br-wan` bridge device on VLAN 2501, proto=dhcp
- `wan6`: Uses same `br-wan` device, proto=dhcpv6
**Note**: The referenced interface must be defined before the device-ref interface in the interface_names list.
### Modifiers
Modifiers can be appended to any interface type:
| Modifier | Effect | Example |
|----------|--------|---------|
| `-pppoe` | Set proto=pppoe (PPPoE authentication) | `route:vlan:101-pppoe` |
| `-dhcpv6` | Set proto=dhcpv6 (DHCPv6 client) | `bridge:tagged:2501-dhcpv6` |
| `-dhcp` | Set proto=dhcp (DHCP client - explicit) | `bridge:transparent-dhcp` |
| `-static` | Set proto=static (static IP) | `bridge:transparent-static` |
| `-none`, `-n` | Set proto=none (no IP configuration) | `bridge:tagged:100-none` or `bridge:tagged:100-n` |
| `-iptv` | Signify that this is an iptv interface (affects firewall and mcast) | `route:vlan:200-iptv` |
| `-inet` | Signify that this is an internet interface (affects firewall) | `route:vlan:200-inet` |
| `-mgmt` | Signify that this is a management interface (affects firewall) | `route:vlan:200-mgmt` |
| `-disabled`, `-d` | Create but mark as disabled | `route:vlan:200-disabled` or `route:vlan:200-d` |
#### Notes
- The `-none` and `-n` modifiers are equivalent, as are `-disabled` and `-d`.
- If no protocol modifier is specified, interfaces default to `proto=dhcp`.
- Protocols and disabled can be clubbed together, and disabled should be in the last, for example: `transparent-qinq:2-n-d` will set proto as none and disable the interface, similarly other protocols can be used.
- iptv, inet and mgmt modifier can only be used with route interfaces, and they can be clubbed with disabled modifier, but disable should be in the last.
#### Static IP Auto-Configuration
When using the `-static` modifier with an interface named `lan`, the system automatically configures:
**Network Configuration**:
- IP Address: 192.168.1.1
- Netmask: 255.255.255.0
- IPv6 Prefix: /60
**DHCP Server Configuration**:
- Start: 192.168.1.100
- Limit: 150 addresses (100-250)
- Lease time: 1 hour
- DHCPv4: server
- DHCPv6: server
- Router Advertisement: server
- SLAAC: enabled
- RA flags: managed-config, other-config
**Example**:
```bash
interface_names='lan,wan'
interface_types='bridge:transparent-static,bridge:tagged:2501'
ports='ALL_LAN,WAN'
```
For non-LAN interfaces with `-static`, only `proto=static` is set without additional configuration.
**Note**: Direct interfaces default to `proto=none`, so `-n` is implicit.
### MAC Address Assignment
You can assign custom MAC addresses to interfaces using the `macaddrs` parameter. This is useful when ISPs require specific MAC addresses per service or for multi-service configurations.
**Supported Formats:**
| Format | Description | Example |
|--------|-------------|---------|
| **Explicit MAC** | Direct MAC address assignment | `AA:BB:CC:DD:EE:FF` |
| **BaseMACAddress** | Use base MAC from `fw_printenv -n ethaddr` | `BaseMACAddress` |
| **BaseMACAddressP1** | Base MAC + 1 | `BaseMACAddressP1` |
| **BaseMACAddressPN** | Base MAC + N (any number) | `BaseMACAddressP5` |
**Example:**
```bash
# If base MAC is 94:3F:0C:D5:76:00
uci set netmode.@supported_args[3].value='BaseMACAddress,BaseMACAddressP1,AA:BB:CC:DD:EE:FF'
# Results in:
# Interface 1: 94:3F:0C:D5:76:00
# Interface 2: 94:3F:0C:D5:76:01
# Interface 3: AA:BB:CC:DD:EE:FF
```
**Note**: MAC addresses are assigned to interfaces in order. If you have 3 interfaces but only specify 2 MAC addresses, the 3rd interface will use the system default.
---
## Configuration Examples
### Example 1: Simple Transparent Bridge
**Scenario**: All ports bridged together, no VLANs
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan' # interface_names
uci set netmode.@supported_args[13].value='bridge:transparent' # interface_types
uci set netmode.@supported_args[14].value='ALL' # ports
uci commit netmode
service netmode restart
```
**Result**: Creates `br-wan` bridge with all LAN+WAN ports, proto=dhcp
---
### Example 2: LAN-Only Bridge with Routed WAN
**Scenario**: Bridge all LAN ports together, WAN as separate routed interface
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='lan,wan'
uci set netmode.@supported_args[13].value='bridge:transparent,route:transparent'
uci set netmode.@supported_args[14].value='ALL_LAN,WAN'
uci commit netmode
service netmode restart
```
**Result**: Creates `br-lan` bridge with all LAN ports only, WAN routed separately
---
### Example 3: VLAN-Tagged Bridge (Managed Network)
**Scenario**: All ports tagged with VLAN 100
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='mgmt'
uci set netmode.@supported_args[13].value='bridge:tagged:100'
uci set netmode.@supported_args[14].value='ALL'
uci commit netmode
service netmode restart
```
**Result**: Creates `br-mgmt` with all ports tagged as `.100`
---
### Example 4: Multiple Service Bridges (VLAN Segregation)
**Scenario**: Separate bridges for Internet (VLAN 100), IPTV (VLAN 200), Management (VLAN 300)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='inet,iptv,mgmt'
uci set netmode.@supported_args[13].value='bridge:tagged:100-n,bridge:tagged:200-n,bridge:tagged:300'
uci set netmode.@supported_args[14].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN,WAN'
uci commit netmode
service netmode restart
```
**Result**:
- `br-inet`: LAN1.100 + LAN2.100 + WAN.100, proto=none
- `br-iptv`: LAN3.200 + LAN4.200 + WAN.200, proto=none
- `br-mgmt`: WAN.300, proto=dhcp
---
### Example 5: QinQ Configuration (Wholesale Provider)
**Scenario**: Customer A on C-tag 10 S-tag 100, Customer B on C-tag 20 S-tag 100
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='customer_a,customer_b'
uci set netmode.@supported_args[13].value='bridge:qinq:10:100-n,bridge:qinq:20:100-n'
uci set netmode.@supported_args[14].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode
service netmode restart
```
**Result**:
- `br-customer_a`: All ports double-tagged (100.10)
- `br-customer_b`: All ports double-tagged (100.20)
---
### Example 6: Routed Multi-Service with Custom MAC Addresses
**Scenario**: ISP requires different MAC addresses for Internet and IPTV services
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='mgmt_wan,wan,iptv_wan,lan'
uci set netmode.@supported_args[13].value='route:macvlan:BaseMACAddressP2-mgmt,route:macvlan:BaseMACAddressP3-inet,route:macvlan:BaseMACAddressP4-iptv,bridge:transparent-static'
uci set netmode.@supported_args[14].value='WAN,WAN,WAN,ALL_LAN'
uci commit netmode
service netmode restart
```
**Result**:
- `mgmt_wan`: Routed interface on WAN with base MAC + 2(58:00:32:C0:0E:42)
- `wan`: Routed interface on WAN with base MAC + 3 (58:00:32:C0:0E:43)
- `iptv_wan`: Routed interface on WAN with base MAC + 4 (58:00:32:C0:0E:44)
- `lan`: bridged interface on ALL LAN ports with base MAC (58:00:32:C0:0E:40)
---
### Example 7: Routed Multi-Service (VLAN-based)
**Scenario**: Internet on VLAN 100, IPTV on VLAN 200, Management on VLAN 300, all routed
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='mgmt_wan,wan,iptv_wan,lan'
uci set netmode.@supported_args[13].value='route:vlan:300-mgmt,route:vlan:100-inet,route:vlan:200-iptv,bridge:transparent-static'
uci set netmode.@supported_args[14].value='WAN,WAN,WAN,ALL_LAN'
uci commit netmode
service netmode restart
```
**Result**:
- `wan`: Routed on WAN.100, proto=dhcp
- `iptv`: Routed on WAN.200, proto=dhcp
- `mgmt`: Routed on WAN.300, proto=dhcp
---
### Example 8: Routed Multi-Service (MACVLAN with Macros)
**Scenario**: Internet and IPTV using MACVLAN devices with MAC address macros
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv'
uci set netmode.@supported_args[13].value='route:transparent,route:macvlan:BaseMACAddressP1'
uci set netmode.@supported_args[14].value='WAN,WAN'
uci commit netmode
service netmode restart
```
**Result**:
- `wan`: Routed on WAN with default MAC (94:3F:0C:D5:76:00)
- `iptv`: MACVLAN device on WAN with base MAC + 1 (94:3F:0C:D5:76:01)
**Alternative with explicit MAC:**
```bash
uci set netmode.@supported_args[13].value='route:transparent,route:macvlan:AA:BB:CC:DD:EE:FF'
```
---
### Example 9: Routed Multi-Service (VLAN + MACVLAN)
**Scenario**: Internet on VLAN 100, IPTV on VLAN 200 with custom MAC
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv'
uci set netmode.@supported_args[13].value='route:vlan:100,route:vlan:200:AA:BB:CC:DD:EE:FF'
uci set netmode.@supported_args[14].value='WAN,WAN'
uci commit netmode
service netmode restart
```
**Result**:
- `wan`: Routed on WAN.100 (default MAC), proto=dhcp
- `iptv`: Routed on WAN.200 with custom MAC, proto=dhcp
---
### Example 10: Standalone VLAN Interface (Direct)
**Scenario**: WAN as standalone VLAN 2501 interface (no bridge, no routing)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan'
uci set netmode.@supported_args[13].value='direct:2501'
uci set netmode.@supported_args[14].value='WAN'
uci commit netmode
service netmode restart
```
**Result**: Creates WAN.2501 interface, proto=none (no DHCP)
---
### Example 11: Mixed Bridge and Routed Interfaces
**Scenario**: IPTV bridged on VLAN 200, Internet routed on VLAN 100
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv'
uci set netmode.@supported_args[13].value='route:vlan:100,bridge:tagged:200-n'
uci set netmode.@supported_args[14].value='WAN,LAN1-LAN2-WAN'
uci commit netmode
service netmode restart
```
**Result**:
- `wan`: Routed on WAN.100, proto=dhcp (firewall enabled)
- `br-iptv`: Bridge on LAN1.200 + LAN2.200 + WAN.200, proto=none
---
## Use Case Scenarios
### Scenario 1: ISP Triple-Play Service (Routed)
**Requirement**: Internet on VLAN 100, IPTV on VLAN 200, VoIP on VLAN 300, all routed
**Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv,voip'
uci set netmode.@supported_args[13].value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.@supported_args[14].value='WAN,WAN,WAN'
uci commit netmode
service netmode restart
```
**Network Topology**:
```
WAN (ae_wan)
├── wan (VLAN 100) - Internet - Routed
├── iptv (VLAN 200) - IPTV - Routed
└── voip (VLAN 300) - VoIP - Routed
```
---
### Scenario 2: ISP Triple-Play with MACVLAN
**Requirement**: Internet normal MAC, IPTV with custom MAC, VoIP with custom MAC
**Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv,voip'
uci set netmode.@supported_args[13].value='route:transparent,route:macvlan:AA:BB:CC:DD:EE:01,route:macvlan:AA:BB:CC:DD:EE:02'
uci set netmode.@supported_args[14].value='WAN,WAN,WAN'
uci commit netmode
service netmode restart
```
---
### Scenario 3: Enterprise VLAN Segregation (Bridged)
**Requirement**: Guest WiFi on VLAN 100, Corporate on VLAN 200, Management on VLAN 300, all bridged
**Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='guest,corporate,mgmt'
uci set netmode.@supported_args[13].value='bridge:tagged:100-n,bridge:tagged:200-n,bridge:tagged:300'
uci set netmode.@supported_args[14].value='LAN1-WAN,LAN2-LAN3-WAN,WAN'
uci commit netmode
service netmode restart
```
**Network Topology**:
```
LAN1.100 ──┬── WAN.100 ──[ br-guest ] (proto=none)
LAN2.200 ──┬── WAN.200 ──[ br-corporate ] (proto=none)
LAN3.200 ──┘
WAN.300 ────[ br-mgmt ] (proto=dhcp)
```
---
### Scenario 4: Wholesale QinQ Provider
**Requirement**: Multiple customers on single fiber, S-tag 100, different C-tags
**Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='cust_a,cust_b,cust_c'
uci set netmode.@supported_args[13].value='bridge:qinq:10:100-n,bridge:qinq:20:100-n,bridge:qinq:30:100-n'
uci set netmode.@supported_args[14].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN,LAN5-LAN6-WAN'
uci commit netmode
service netmode restart
```
---
### Scenario 5: Hybrid Bridge + Routed
**Requirement**: Internet routed, IPTV bridged to STBs
**Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv'
uci set netmode.@supported_args[13].value='route:vlan:100,bridge:tagged:200-n'
uci set netmode.@supported_args[14].value='WAN,LAN1-LAN2-LAN3-WAN'
uci commit netmode
service netmode restart
```
**Network Topology**:
```
WAN.100 ─── [ wan - routed ] (NAT, firewall enabled)
LAN1.200 ──┐
LAN2.200 ──┼─ WAN.200 ──[ br-iptv ] (transparent bridge, proto=none)
LAN3.200 ──┘
```
---
## Port List Specifications
### Port List Syntax
- **`ALL`**: All LAN ports + WAN port + EXT port (resolved from UCI or board.json)
- **`ALL_LAN`**: All LAN ports only (no WAN, no EXT) - useful for LAN-only bridges
- **`LAN`**: Single LAN port (for devices with one LAN port)
- **`WAN`**: Only WAN port
- **`EXT`**: Only EXT port
- **`LAN-WAN`**: Single LAN port and WAN
- **`LAN1-LAN2-WAN`**: LAN1, LAN2, and WAN
- **`LAN1-LAN3-EXT`**: LAN1, LAN3, and EXT
- **`WAN-EXT`**: WAN and EXT ports
**Note**: For devices with a single LAN port, use `LAN`. For devices with multiple LAN ports, use `LAN1-8`. The `ALL` and `ALL_LAN` macros automatically detect which configuration is present.
#### Individual untagged port
- Suppose we have a bridge:tagged type interface, so all the ports are going to be tagged in this case. To mark any of the ports untagged individually, ":u" modifier can be used with the port, for example, to make LAN3 untagged (transparent) here: "LAN2-LAN3:u-LAN4-WAN".
### Device Name Resolution
Port macros (LAN, LAN1-LAN8, WAN, EXT) are automatically resolved to actual device names:
- `LAN``uci get network.LAN.name` → e.g., `eth1` (single LAN port devices)
- `LAN1``uci get network.LAN1.name` → e.g., `eth1` (multi-port devices)
- `WAN``uci get network.WAN.name` → e.g., `ae_wan`
- `EXT``uci get network.EXT.name` → e.g., `eth5`
If UCI device section doesn't exist, the system falls back to board.json.
---
## TR-069/USP Configuration
### TR-181 Data Model Mapping
The advanced mode uses three arguments in TR-181:
1. **SupportedArguments.1** = `interface_names`
2. **SupportedArguments.2** = `interface_types`
3. **SupportedArguments.3** = `ports`
### Example 1: Transparent Bridge via TR-069
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>bridge:transparent</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>ALL</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
### Example 2: Routed Multi-Service via TR-069
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan,iptv,mgmt</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>route:vlan:100,route:vlan:200,route:vlan:300</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>WAN,WAN,WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
### Example 3: QinQ Bridge via TR-069
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>customer_a,customer_b</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>bridge:qinq:10:100-n,bridge:qinq:20:100-n</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-LAN2-WAN,LAN3-LAN4-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
---
## Troubleshooting
### Issue: VLANs Not Working
**Diagnosis**:
```bash
# Check VLAN devices created
uci show network | grep 8021q
# Check interface status
ip link show
ip addr show
# Verify VLAN traffic
tcpdump -i eth4 -e -n vlan
```
**Solution**:
```bash
# Ensure kernel module loaded
modprobe 8021q
lsmod | grep 8021
# Check switch configuration (if applicable)
swconfig dev switch0 show
```
---
### Issue: QinQ Not Working
**Diagnosis**:
```bash
# Check for 8021ad devices
uci show network | grep 8021ad
# Verify kernel support
modprobe 8021q
lsmod | grep 8021
```
**Solution**:
```bash
# Install QinQ support
opkg install kmod-8021q
# Verify S-tag ethertype (0x88a8)
tcpdump -i eth4 -e -n -xx vlan
```
---
### Issue: MACVLAN Interface Not Getting IP
**Diagnosis**:
```bash
# Check MACVLAN device
ip link show | grep macvlan
# Check MAC address
ip link show <interface>_macvlan | grep ether
# Test DHCP
udhcpc -i <interface>_macvlan -n
```
**Solution**:
```bash
# Verify passthru mode
uci show network | grep -A5 macvlan
# Ensure MAC is unique
# Some ISPs require specific MAC format
```
---
### Issue: Mixed Bridge/Route Not Working
**Diagnosis**:
```bash
# Check firewall status
uci show firewall.globals.enabled
# Verify interfaces
ip addr show
# Check routing table
ip route show
```
**Solution**:
Firewall is always enabled. For debugging:
```bash
# Temporarily disable firewall
uci set firewall.globals.enabled='0'
uci commit firewall
/etc/init.d/firewall restart
```
---
### Issue: Port Not Added to Bridge
**Diagnosis**:
```bash
# Check UCI device resolution
uci get network.LAN1.name
# Check bridge ports
brctl show
# Check UCI bridge configuration
uci show network | grep -A10 "type='bridge'"
```
**Solution**:
```bash
# Verify device sections exist
uci show network | grep "device="
# Check board.json for defaults
cat /etc/board.json | grep -A20 network
```
---
## Verification Commands
### Check Configuration
```bash
# View current mode
cat /etc/netmodes/.last_mode
# View netmode configuration
uci show netmode
# View network configuration
uci show network
# View environment variables (during mode switch)
logread | grep "Interface names:"
```
### Check Interface Status
```bash
# All interfaces
ip addr show
# Bridges
brctl show
bridge link show
# VLAN devices
ip -d link show type vlan
# MACVLAN devices
ip -d link show type macvlan
```
### Check Connectivity
```bash
# DHCP on interface
udhcpc -i wan -n
# Ping gateway
ping -c 3 $(ip route | grep default | awk '{print $3}')
# DNS resolution
nslookup google.com
# VLAN traffic capture
tcpdump -i eth4 -e -n vlan
```
### Check Logs
```bash
# Netmode logs
logread | grep netmode-advanced
# Network logs
logread | grep network
# Live monitoring
logread -f | grep -E "(netmode|network)"
```
---
## Migration from Old Modes
### From `bridged` Mode
**Old Configuration**:
```bash
uci set netmode.global.mode='bridged'
uci set netmode.@supported_args[0].value='wan'
uci set netmode.@supported_args[1].value='transparent'
uci set netmode.@supported_args[2].value='ALL'
```
**New Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan'
uci set netmode.@supported_args[13].value='bridge:transparent'
uci set netmode.@supported_args[14].value='ALL'
```
**Change**: Add `bridge:` prefix to interface type.
---
### From `routed-multi-service` Mode
**Old Configuration**:
```bash
uci set netmode.global.mode='routed-multi-service'
uci set netmode.@supported_args[0].value='100' # inet_vlanid
uci set netmode.@supported_args[2].value='200' # iptv_vlanid
uci set netmode.@supported_args[4].value='300' # mgmt_vlanid
```
**New Configuration**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[12].value='wan,iptv,mgmt'
uci set netmode.@supported_args[13].value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.@supported_args[14].value='WAN,WAN,WAN'
```
**Change**: Explicit interface names and unified syntax.
---
## Best Practices
1. **VLAN Planning**: Document all VLAN IDs before deployment
2. **Port Assignment**: Create clear mapping of ports to services
3. **Testing**: Test on lab environment before production
4. **Monitoring**: Use `tcpdump` to verify VLAN tags
5. **Firewall**: Be aware that routed interfaces enable firewall
6. **Naming**: Use descriptive interface names (iptv, mgmt, voip)
7. **Documentation**: Keep ISP-specific requirements documented
8. **Backup**: Always backup configuration before major changes
---
**Document Version**: 1.0
**Package Version**: 1.1.11+
**Last Updated**: 2024-12-12
**Mode Status**: Production Ready

View File

@@ -0,0 +1,567 @@
# Advanced Mode - Implementation Summary
## Overview
The **advanced** mode is a unified network configuration mode that consolidates and extends the functionality of the previous `bridged` and `routed-multi-service` modes into a single, flexible interface.
## Design Rationale
### Problems with Old Approach
1. **Mode Fragmentation**: Separate modes for bridged and routed scenarios
2. **Limited Flexibility**: Couldn't mix bridges and routed interfaces
3. **Confusing Naming**: "bridged" mode actually supported standalone interfaces too
4. **Parameter Proliferation**: routed-multi-service had 6+ parameters for just 3 services
5. **No Scalability**: Adding new services required new parameters
### New Unified Approach
The advanced mode uses a **declarative, array-based configuration**:
```
interface_names: wan, iptv, mgmt
interface_types: route:vlan:100, bridge:tagged:200, direct:300
ports: WAN, LAN1-LAN2-WAN, WAN
```
**Benefits**:
- ✅ Single mode for all scenarios
- ✅ Scalable (add N interfaces without new parameters)
- ✅ Flexible (mix bridge/route/standalone)
- ✅ Intuitive syntax
- ✅ Self-documenting configuration
## Architecture
### File Structure
```
netmode/
├── files/
│ ├── etc/netmodes/advanced/
│ │ └── scripts/
│ │ └── 10-advanced # Main mode script
│ ├── lib/netmode/
│ │ └── advanced_helper.sh # Helper library
│ └── etc/netmodes/supported_modes.json
└── docs/
├── ADVANCED_MODE_GUIDE.md # Complete guide
└── ADVANCED_MODE_QUICK_REFERENCE.md
```
### Components
#### 1. advanced_helper.sh
**Purpose**: Core library for interface creation
**Key Functions**:
- `parse_interface_type()` - Parse interface type specifications
- `create_bridge()` - Create bridge interfaces with VLAN/QinQ
- `create_routed_interface()` - Create routed interfaces with VLAN/MACVLAN
- `create_standalone_interface()` - Create direct VLAN interfaces
- `parse_port_list()` - Resolve port macros to device names
- `resolve_device_name()` - Resolve LAN1/WAN to actual device names
- `cleanup_interfaces()` - Clean up all interfaces before applying new config
#### 2. 10-advanced Script
**Purpose**: Main mode script
**Flow**:
1. Parse environment variables (NETMODE_*)
2. Split comma-separated values
3. Loop through each interface
4. Parse interface type
5. Call appropriate creation function (bridge/route/direct)
6. Configure multicast, DHCP, firewall
7. Update service dependencies
#### 3. supported_modes.json
**Purpose**: Mode definition for UCI import
**Configuration**:
```json
{
"name": "advanced",
"description": "Advanced Mode - Unified configuration...",
"supported_args": [
{
"name": "interface_names",
"description": "Interface names (comma-separated...)",
"type": "string"
},
...
]
}
```
## Interface Type Syntax
### Design Philosophy
**Format**: `MODE:SUBTYPE[:PARAMS][:MODIFIERS]`
Examples:
- `bridge:transparent` - Mode=bridge, Subtype=transparent
- `bridge:tagged:100` - Mode=bridge, Subtype=tagged, Param=VID
- `route:vlan:100:AA:BB:CC:DD:EE:FF` - Mode=route, Subtype=vlan, Params=VID+MAC
- `direct:2501-n` - Mode=direct, Param=VID, Modifier=proto_none
### Parsing Logic
The `parse_interface_type()` function:
1. **Extract modifiers** (-n, -d)
2. **Parse mode prefix** (bridge:/route:/direct:)
3. **Parse subtype** (transparent/tagged/vlan/macvlan)
4. **Parse parameters** (VID, SVID, MAC address)
5. **Export to environment variables** for caller
## UCI Device Resolution
### Problem
Port macros (LAN1, LAN2, WAN) are logical names that need to be mapped to actual hardware interfaces.
### Solution
```bash
resolve_device_name() {
local device_id="$1"
local resolved_name=""
# Try UCI device section
resolved_name="$(uci -q get network.${device_id}.name)"
# Fallback to input
if [ -z "$resolved_name" ]; then
resolved_name="$device_id"
fi
echo "$resolved_name"
}
```
**Example**:
```
LAN1 → uci get network.LAN1.name → eth1
WAN → uci get network.WAN.name → ae_wan
```
### Port List Resolution
The `parse_port_list()` function:
1. **Check for "ALL"** → Resolve all LAN1-8 + WAN
2. **Parse dash-separated** → LAN1-LAN2-WAN → resolve each
3. **Return space-separated** → "eth1 eth2 ae_wan"
## VLAN Device Creation
### 802.1Q (C-tag)
```bash
create_vlan_device "eth0" "100" "8021q"
```
Creates:
```
config device 'eth0__100'
option type '8021q'
option enabled '1'
option vid '100'
option ifname 'eth0'
option name 'eth0.100'
```
### 802.1ad (S-tag)
```bash
create_vlan_device "eth0" "300" "8021ad"
```
Creates:
```
config device 'eth0__300'
option type '8021ad'
option enabled '1'
option vid '300'
option ifname 'eth0'
option name 'eth0.300'
```
### QinQ (Double Tagging)
For `bridge:qinq:100:300`:
```bash
# Create S-tag first
svlan=$(create_vlan_device "eth0" "300" "8021ad") # eth0.300
# Create C-tag on top of S-tag
cvlan=$(create_vlan_device "$svlan" "100" "8021q") # eth0.300.100
```
Result: `eth0.300.100` (S-tag 300, C-tag 100)
## MACVLAN Device Creation
For `route:macvlan:AA:BB:CC:DD:EE:FF`:
```bash
create_macvlan_device "ae_wan" "AA:BB:CC:DD:EE:FF" "iptv"
```
Creates:
```
config device 'iptv_macvlan'
option type 'macvlan'
option enabled '1'
option ifname 'ae_wan'
option name 'iptv_macvlan'
option macaddr 'AA:BB:CC:DD:EE:FF'
option mode 'passthru'
```
## Bridge Creation
### Transparent Bridge
For `bridge:transparent` with `ports='ALL'`:
```bash
create_bridge "wan" "bridge:transparent" "ALL"
```
Creates:
```
config interface 'wan'
option proto 'dhcp'
option device 'br-wan'
config device 'br_wan'
option name 'br-wan'
option type 'bridge'
option bridge_empty '1'
list ports 'eth1'
list ports 'eth2'
list ports 'ae_wan'
```
### VLAN-Tagged Bridge
For `bridge:tagged:100` with `ports='ALL'`:
Creates VLAN devices on all ports first, then adds to bridge:
```
config device 'br_mgmt'
option name 'br-mgmt'
option type 'bridge'
list ports 'eth1.100'
list ports 'eth2.100'
list ports 'ae_wan.100'
```
## Routed Interface Creation
For `route:vlan:100`:
```bash
create_routed_interface "wan" "vlan" "100" "" "dhcp" "ae_wan" "0"
```
Creates:
```
config device 'ae_wan__100'
option type '8021q'
option vid '100'
option ifname 'ae_wan'
option name 'ae_wan.100'
config interface 'wan'
option proto 'dhcp'
option device 'ae_wan.100'
```
## Firewall Logic
The advanced mode has **intelligent firewall handling**:
```bash
configure_firewall() {
local has_routed=0
# Check if ANY interface is routed
for if_type in $interface_types; do
if echo "$if_type" | grep -q "^route:"; then
has_routed=1
break
fi
done
if [ "$has_routed" = "1" ]; then
uci set firewall.globals.enabled="1" # Enable for routed
else
uci set firewall.globals.enabled="0" # Disable for bridge-only
fi
}
```
**Logic**:
- If **any** interface is routed → Enable firewall
- If **all** interfaces are bridges → Disable firewall
## Environment Variable Flow
### Input (UCI → Environment)
```bash
# In netmode init script
export NETMODE_interface_names="wan,iptv,mgmt"
export NETMODE_interface_types="route:vlan:100,route:vlan:200,route:vlan:300"
export NETMODE_ports="WAN,WAN,WAN"
```
### Parsing (Script)
```bash
# In 10-advanced script
local interface_names="${NETMODE_interface_names:-wan}"
local interface_types="${NETMODE_interface_types:-bridge:transparent}"
local ports="${NETMODE_ports:-ALL}"
# Split by comma
IFS=','
for name in $interface_names; do
names_arr="$names_arr $name"
done
```
### Output (UCI Network Config)
```
config interface 'wan'
option proto 'dhcp'
option device 'ae_wan.100'
config interface 'iptv'
option proto 'dhcp'
option device 'ae_wan.200'
...
```
## Cleanup Strategy
Before applying new configuration, all existing interfaces are cleaned up:
```bash
cleanup_interfaces() {
# Delete VLAN devices (8021q and 8021ad)
for vlandev_sec in $(uci show network | grep -E "\.type='(8021q|8021ad)'" ...); do
uci delete "$vlandev_sec"
done
# Delete MACVLAN devices
for macvlandev_sec in $(uci show network | grep "\.type='macvlan'" ...); do
uci delete "$macvlandev_sec"
done
# Delete bridge devices
for brdev_sec in $(uci show network | grep "\.type='bridge'" ...); do
uci delete "$brdev_sec"
done
# Delete standard interfaces
uci delete network.lan
uci delete network.wan
uci delete network.wan6
}
```
This ensures a clean slate for the new configuration.
## Migration Path
### From bridged Mode
**Before**:
```bash
mode='bridged'
interface_names='wan,lan100'
interface_types='transparent,tagged:100'
ports='ALL,LAN1-LAN2'
```
**After**:
```bash
mode='advanced'
interface_names='wan,lan100'
interface_types='bridge:transparent,bridge:tagged:100'
ports='ALL,LAN1-LAN2'
```
**Change**: Add `bridge:` prefix to types.
### From routed-multi-service Mode
**Before**:
```bash
mode='routed-multi-service'
inet_vlanid='100'
iptv_vlanid='200'
mgmt_vlanid='300'
```
**After**:
```bash
mode='advanced'
interface_names='wan,iptv,mgmt'
interface_types='route:vlan:100,route:vlan:200,route:vlan:300'
ports='WAN,WAN,WAN'
```
**Change**: Explicit interface names and unified syntax.
## Testing Approach
### Unit Testing
Test individual helper functions:
```bash
# Test device resolution
resolve_device_name "LAN1" # Should return eth1
# Test port parsing
parse_port_list "LAN1-LAN2-WAN" # Should return "eth1 eth2 ae_wan"
# Test type parsing
parse_interface_type "bridge:qinq:100:300-n"
# Should set: mode=bridge, vlan_type=qinq, cvid=100, svid=300, proto=none
```
### Integration Testing
Test complete scenarios:
```bash
# Test transparent bridge
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan'
uci set netmode.@supported_args[1].value='bridge:transparent'
uci set netmode.@supported_args[2].value='ALL'
uci commit netmode
service netmode restart
# Verify
brctl show | grep br-wan
```
### Validation
```bash
# Check UCI output
uci show network
# Check actual interfaces
ip addr show
brctl show
ip -d link show type vlan
# Check logs
logread | grep netmode-advanced
```
## Performance Considerations
### Comma Splitting Optimization
The script uses efficient IFS-based splitting:
```bash
local OLD_IFS="$IFS"
IFS=','
for name in $interface_names; do
names_arr="$names_arr $name"
done
IFS="$OLD_IFS"
```
This is faster than using `cut` or `awk` in loops.
### UCI Batching
All UCI commands are batched, with a single `uci commit` at the end:
```bash
# Multiple uci set commands
uci set ...
uci set ...
uci set ...
# Single commit
uci commit network
```
### Logging
Logging is selective - info level for major steps, debug for details:
```bash
_log "Creating interface $idx/$total_interfaces" # Info
logger -s -p user.debug -t "$_log_prefix" "Adding port: $port" # Debug
```
## Security Considerations
### Input Validation
- VLANs IDs: 1-4094
- MAC addresses: Validated format
- Port names: Resolved through UCI (trusted source)
### Privilege Separation
- Script runs as root (required for network config)
- No user input directly executed
- Environment variables sanitized through UCI
## Future Enhancements
Possible future additions:
1. **Static IP support**: `route:vlan:100:static:192.168.1.1`
2. **Port roles**: `ports='LAN1(tagged),LAN2(untagged)'`
3. **Bridge STP**: `bridge:transparent:stp`
4. **IPv6 specific**: `route:vlan:100:ipv6`
5. **Validation**: Pre-flight checks for VLAN conflicts
## Backward Compatibility
**Status**: ⚠️ Breaking change by design
The old `bridged` and `routed-multi-service` modes are **replaced** by advanced mode. This is acceptable because:
1. This is the **first deployment** of advanced features
2. No existing production deployments use old syntax
3. Cleaner architecture without legacy baggage
4. Documentation focuses on new syntax only
## Summary
The advanced mode represents a significant architectural improvement:
-**Unified**: One mode for all scenarios
-**Scalable**: Array-based configuration
-**Flexible**: Mix bridges, routed, standalone
-**Intuitive**: Self-documenting syntax
-**Powerful**: VLAN, QinQ, MACVLAN support
-**Clean**: No backward compatibility burden
---
**Implementation Version**: 1.0
**Date**: 2024-12-12
**Status**: Production Ready

View File

@@ -0,0 +1,313 @@
# Advanced Mode - Quick Reference
## Interface Type Syntax
### Bridge Types (Traditional VLAN Devices)
```
bridge:transparent # No VLANs
bridge:tagged:VID # All ports tagged
bridge:wan-tagged:VID # Only WAN tagged
bridge:transparent-qinq:SVID # LAN untagged, WAN S-tag
bridge:transparent-qinq:C:S # LAN untagged, WAN C+S tags
bridge:tagged-qinq:C:S # LAN C-tag, WAN C+S tags
bridge:qinq:C:S # All ports C+S tags
```
### Bridge VLAN Filtering (Modern - Recommended)
```
brvlan:tagged:VID # All ports tagged (bridge-vlan)
brvlan:wan-tagged:VID # WAN tagged, LAN untagged (bridge-vlan)
brvlan:mixed:VID # Custom tagging (bridge-vlan)
```
### Routed Types
```
route:transparent # No VLAN, default MAC
route:vlan:VID # VLAN routing
route:macvlan:MAC # MACVLAN device (supports BaseMACAddress macros)
route:vlan:VID:MAC # VLAN + custom MAC
```
### Standalone Types
```
direct:VID # Standalone VLAN (proto=none)
```
### Device Reference Types
```
device-ref:INTERFACE # Reference device from another interface
# Allows multiple interfaces to share the same device
# Example: wan6 sharing wan's device
```
### Modifiers
```
-pppoe # proto=pppoe (PPPoE authentication)
-dhcpv6 # proto=dhcpv6 (DHCPv6 client)
-dhcp # proto=dhcp (DHCP client - explicit, default if no suffix)
-static # proto=static (static IP configuration)
-none, -n # proto=none (no IP configuration)
-disabled, -d # disabled=1 (interface disabled)
```
**Default Protocol**: If no protocol modifier is specified, the interface defaults to `-dhcp`.
**Note**: When using `-static` with interface name `lan`, the system automatically configures:
- IP: 192.168.1.1/24
- IPv6 prefix delegation: /60
- DHCP server: 192.168.1.100-250, 1h lease
- DHCPv6 and RA server enabled
### MAC Address Macros
```
BaseMACAddress # Base MAC from fw_printenv -n ethaddr
BaseMACAddressP1 # Base MAC + 1
BaseMACAddressP2 # Base MAC + 2
BaseMACAddressPN # Base MAC + N
AA:BB:CC:DD:EE:FF # Explicit MAC address
```
---
## Common Configurations
### 1. Transparent Bridge
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan'
uci set netmode.@supported_args[1].value='bridge:transparent'
uci set netmode.@supported_args[2].value='ALL'
uci commit netmode && service netmode restart
```
### 2. Router Mode (LAN + WAN)
```bash
# LAN bridge with static IP + DHCP server, WAN bridge with DHCP client
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='lan,wan'
uci set netmode.@supported_args[1].value='bridge:transparent-static,bridge:tagged:2501'
uci set netmode.@supported_args[2].value='ALL_LAN,WAN'
uci commit netmode && service netmode restart
```
### 3. VLAN-Tagged Bridge
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='mgmt'
uci set netmode.@supported_args[1].value='bridge:tagged:100'
uci set netmode.@supported_args[2].value='ALL'
uci commit netmode && service netmode restart
```
### 4. Multiple Service Bridges
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='inet,iptv,mgmt'
uci set netmode.@supported_args[1].value='bridge:tagged:100-n,bridge:tagged:200-n,bridge:tagged:300'
uci set netmode.@supported_args[2].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN,WAN'
uci commit netmode && service netmode restart
```
### 5. QinQ Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='customer_a,customer_b'
uci set netmode.@supported_args[1].value='bridge:qinq:10:100-n,bridge:qinq:20:100-n'
uci set netmode.@supported_args[2].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
### 6. Routed Multi-Service (VLAN)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan,iptv,mgmt'
uci set netmode.@supported_args[1].value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.@supported_args[2].value='WAN,WAN,WAN'
uci commit netmode && service netmode restart
```
### 7. Routed Multi-Service with Custom MAC Addresses
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan,iptv'
uci set netmode.@supported_args[1].value='route:transparent,route:transparent'
uci set netmode.@supported_args[2].value='WAN,WAN'
uci set netmode.@supported_args[3].value='BaseMACAddress,BaseMACAddressP1'
uci commit netmode && service netmode restart
```
### 8. IPv4 + IPv6 on Same Device (Device Reference)
```bash
# wan uses DHCP, wan6 uses DHCPv6 on the same bridge device
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan,wan6'
uci set netmode.@supported_args[1].value='bridge:tagged:2501,device-ref:wan-dhcpv6'
uci set netmode.@supported_args[2].value='WAN,WAN'
uci commit netmode && service netmode restart
```
### 9. Direct VLAN Interface
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan'
uci set netmode.@supported_args[1].value='direct:2501'
uci set netmode.@supported_args[2].value='WAN'
uci commit netmode && service netmode restart
```
### 10. Hybrid (Routed + Bridged)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan,iptv'
uci set netmode.mode_4_supprted_args_2.value='route:vlan:100,bridge:tagged:200-n'
uci set netmode.mode_4_supprted_args_3.value='WAN,LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
### 11. Bridge VLAN Filtering (WAN Tagged)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1499'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN'
uci commit netmode && service netmode restart
```
### 12. Multiple Services with Bridge VLAN Filtering
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet,tv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1499,brvlan:wan-tagged:1510-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
---
## Port List Syntax
| Syntax | Description |
|--------|-------------|
| `ALL` | All LAN + WAN + EXT ports (from UCI/board.json) |
| `ALL_LAN` | All LAN ports only (no WAN, no EXT) |
| `LAN` | Single LAN port (for devices with one LAN port) |
| `WAN` | WAN port only |
| `EXT` | EXT port only |
| `LAN-WAN` | Single LAN port and WAN |
| `LAN1-LAN2-WAN` | LAN1, LAN2, and WAN |
| `LAN1-LAN3-EXT` | LAN1, LAN3, and EXT |
| `WAN-EXT` | WAN and EXT ports |
**Note**: `LAN` is used for devices with a single LAN port, while `LAN1-8` are used for devices with multiple numbered LAN ports. The system automatically detects which is present in UCI.
---
## Verification Commands
```bash
# Check current mode
cat /etc/netmodes/.last_mode
# View configuration
uci show netmode
# View network interfaces
ip addr show
# View bridges
brctl show
# View VLAN devices
ip -d link show type vlan
# View MACVLAN devices
ip -d link show type macvlan
# View logs
logread | grep netmode-advanced
# Test DHCP
udhcpc -i wan -n
# Capture VLAN traffic
tcpdump -i eth4 -e -n vlan
```
---
## Troubleshooting
### Force mode reapply
```bash
rm /etc/netmodes/.last_mode
service netmode restart
```
### Check for errors
```bash
logread | grep -E "(error|ERROR|failed|FAILED)"
```
### Verify UCI syntax
```bash
uci show netmode
uci show network
```
### Reset to DHCP mode
```bash
uci set netmode.global.mode='routed-dhcp'
uci commit netmode
service netmode restart
```
---
## TR-181 Argument Mapping
```
Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value = interface_names
Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value = interface_types
Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value = ports
Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.4.Value = macaddrs
```
---
## Examples by Use Case
### ISP Triple-Play (VLAN-based with MAC Addresses)
```bash
# Internet VLAN 100, IPTV VLAN 200, VoIP VLAN 300 with different MACs
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan,iptv,voip'
uci set netmode.@supported_args[1].value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.@supported_args[2].value='WAN,WAN,WAN'
uci set netmode.@supported_args[3].value='BaseMACAddress,BaseMACAddressP1,BaseMACAddressP2'
uci commit netmode && service netmode restart
```
### Enterprise Guest + Corporate Networks
```bash
# Guest VLAN 100, Corporate VLAN 200, Management VLAN 300
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='guest,corporate,mgmt'
uci set netmode.@supported_args[1].value='bridge:tagged:100-n,bridge:tagged:200-n,bridge:tagged:300'
uci set netmode.@supported_args[2].value='LAN1-WAN,LAN2-LAN3-WAN,WAN'
uci commit netmode && service netmode restart
```
### Wholesale QinQ Provider
```bash
# Multiple customers with different C-tags, same S-tag
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='cust_a,cust_b,cust_c'
uci set netmode.@supported_args[1].value='bridge:qinq:10:100-n,bridge:qinq:20:100-n,bridge:qinq:30:100-n'
uci set netmode.@supported_args[2].value='LAN1-LAN2-WAN,LAN3-LAN4-WAN,LAN5-LAN6-WAN'
uci commit netmode && service netmode restart
```
---
**Version**: 1.0
**Last Updated**: 2024-12-12

View File

@@ -0,0 +1,333 @@
# Bridge VLAN Filtering Mode
## Overview
The advanced netmode now supports **bridge VLAN filtering**, a modern approach to VLAN configuration that uses the kernel's bridge VLAN filtering feature instead of creating separate VLAN devices.
### Benefits
- **Better Performance**: No need to create multiple VLAN devices
- **Cleaner Configuration**: Single bridge with VLAN filtering instead of multiple VLAN interfaces
- **Hardware Offloading**: Better support for hardware VLAN acceleration
- **Simplified Management**: All VLANs configured in one place
## Syntax
Use the `brvlan:` prefix instead of `bridge:` to enable bridge VLAN filtering:
| Traditional Mode | Bridge VLAN Filtering Mode |
|------------------|---------------------------|
| `bridge:tagged:100` | `brvlan:tagged:100` |
| `bridge:wan-tagged:100` | `brvlan:wan-tagged:100` |
| N/A | `brvlan:mixed:100` |
## Interface Types
### `brvlan:tagged:VID`
All ports are tagged with the specified VLAN ID.
**Example**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='brvlan:tagged:1499'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
**Resulting Configuration**:
```
config interface 'internet'
option device 'br-internet.1499'
option proto 'dhcp'
config device br_internet
option name 'br-internet'
option type 'bridge'
option vlan_filtering '1'
list ports 'ae_wan'
list ports 'eth0'
list ports 'eth1'
config bridge-vlan brvlan_1499_internet
option device 'br-internet'
option vlan '1499'
list ports 'ae_wan:t'
list ports 'eth0:t'
list ports 'eth1:t'
```
---
### `brvlan:wan-tagged:VID`
WAN port is tagged, LAN ports are untagged.
**Example**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='iptv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1510-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN'
uci commit netmode && service netmode restart
```
**Resulting Configuration**:
```
config interface 'iptv'
option device 'br-iptv.1510'
option proto 'none'
config device br_iptv
option name 'br-iptv'
option type 'bridge'
option vlan_filtering '1'
list ports 'ae_wan'
list ports 'eth0'
list ports 'eth1'
config bridge-vlan brvlan_1510_iptv
option device 'br-iptv'
option vlan '1510'
list ports 'ae_wan:t'
list ports 'eth0:u'
list ports 'eth1:u'
```
---
### `brvlan:mixed:VID` or `brvlan:mixed:VID:TAGGED_PORTS`
Custom tagged/untagged configuration with flexible port-specific tagging.
**Syntax**:
- `brvlan:mixed:VID` - Default behavior: WAN tagged, LAN untagged
- `brvlan:mixed:VID:TAGGED_PORTS` - Specify which ports are tagged (e.g., `LAN1-WAN`)
**Example 1: Default (WAN Tagged)**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='service'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:100'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN'
uci commit netmode && service netmode restart
```
**Result**: WAN tagged, LAN1 and LAN2 untagged
**Example 2: Custom Tagging (LAN1 and WAN Tagged)**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='corporate'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:200:LAN1-WAN'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
**Resulting Configuration**:
```
config bridge-vlan brvlan_200_corporate
option device 'br-corporate'
option vlan '200'
list ports 'eth0:t' # LAN1 tagged
list ports 'eth1:u' # LAN2 untagged
list ports 'eth2:u' # LAN3 untagged
list ports 'ae_wan:t' # WAN tagged
```
**See [BRVLAN_MIXED_MODE_EXAMPLES.md](BRVLAN_MIXED_MODE_EXAMPLES.md) for comprehensive examples.**
---
## Comparison: Traditional vs Bridge VLAN Filtering
### Traditional VLAN Device Approach (`bridge:tagged:100`)
Creates separate VLAN devices for each port:
```
config device eth0_100
option type '8021q'
option vid '100'
option ifname 'eth0'
option name 'eth0.100'
config device wan_100
option type '8021q'
option vid '100'
option ifname 'ae_wan'
option name 'ae_wan.100'
config device br_internet
option type 'bridge'
list ports 'eth0.100'
list ports 'ae_wan.100'
```
### Bridge VLAN Filtering Approach (`brvlan:tagged:100`)
Single bridge with VLAN filtering:
```
config device br_internet
option type 'bridge'
option vlan_filtering '1'
list ports 'eth0'
list ports 'ae_wan'
config bridge-vlan brvlan_100_internet
option device 'br-internet'
option vlan '100'
list ports 'eth0:t'
list ports 'ae_wan:t'
```
---
## Use Cases
### ISP Internet Service (VLAN 1499, WAN Tagged)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1499'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN'
uci commit netmode && service netmode restart
```
### IPTV Service (VLAN 1510, WAN Tagged, No DHCP)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='tv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1510-n'
uci set netmode.mode_4_supprted_args_3.value='LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
### Multiple Services (Internet + IPTV)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet,tv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1499,brvlan:wan-tagged:1510-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
### Corporate Network (All Ports Tagged)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='corporate'
uci set netmode.mode_4_supprted_args_2.value='brvlan:tagged:100'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
---
## Modifiers
Bridge VLAN filtering modes support the same modifiers as traditional bridge modes:
| Modifier | Effect | Example |
|----------|--------|---------|
| `-n` | Set proto=none (no DHCP client) | `brvlan:tagged:100-n` |
| `-d` | Create but mark as disabled | `brvlan:wan-tagged:200-d` |
---
## Verification
### Check Bridge VLAN Configuration
```bash
# View bridge device
uci show network | grep "vlan_filtering"
# View bridge-vlan sections
uci show network | grep "bridge-vlan"
# View interface status
ip addr show
# View bridge VLAN table
bridge vlan show
```
### Example Output
```bash
root@router:~# bridge vlan show
port vlan-id
ae_wan 1499 Tagged
eth0 1499 Untagged
eth1 1499 Untagged
br-internet 1499
```
---
## Limitations
1. **No QinQ Support**: Bridge VLAN filtering does not currently support 802.1ad (QinQ) double tagging
2. **Single VLAN per Interface**: Each bridge-vlan section defines one VLAN
3. **Kernel Support Required**: Requires kernel with bridge VLAN filtering support
---
## Migration from Traditional Bridge
### Before (Traditional VLAN Devices)
```bash
uci set netmode.mode_4_supprted_args_2.value='bridge:wan-tagged:100'
```
### After (Bridge VLAN Filtering)
```bash
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:100'
```
Simply change the prefix from `bridge:` to `brvlan:`.
---
## Troubleshooting
### Check if VLAN Filtering is Enabled
```bash
cat /sys/class/net/br-internet/bridge/vlan_filtering
# Should output: 1
```
### View Bridge VLAN Table
```bash
bridge vlan show dev br-internet
```
### Check Kernel Support
```bash
# Check if bridge module supports vlan_filtering
cat /sys/module/bridge/parameters/vlan_filtering
```
### Enable Debug Logging
```bash
# Monitor netmode logs
logread -f | grep netmode-advanced
```
---
**Version**: 1.0
**Last Updated**: 2025-12-12
**Feature Status**: Production Ready

View File

@@ -0,0 +1,318 @@
# Bridge VLAN Filtering - Mixed Mode Examples
## Overview
The `brvlan:mixed` mode provides flexible control over which ports are tagged vs untagged in a bridge VLAN configuration. This is useful for complex scenarios where different ports need different VLAN tagging behavior.
## Syntax
### Basic Mixed Mode (Default Behavior)
```
brvlan:mixed:VID
```
**Behavior**: WAN tagged, LAN ports untagged (same as `brvlan:wan-tagged:VID`)
### Custom Mixed Mode (Specify Tagged Ports)
```
brvlan:mixed:VID:TAGGED_PORTS
```
**Behavior**: Ports listed in `TAGGED_PORTS` are tagged, all others are untagged
**TAGGED_PORTS Format**: Same as port list specification (`LAN1-LAN2-WAN`, `WAN`, etc.)
---
## Examples
### Example 1: Basic Mixed Mode (WAN Tagged by Default)
**Scenario**: Internet service where WAN needs VLAN 100, LAN ports untagged
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:100'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN'
uci commit netmode && service netmode restart
```
**Result**:
```
config interface 'internet'
option device 'br-internet.100'
option proto 'dhcp'
config device br_internet
option name 'br-internet'
option type 'bridge'
option vlan_filtering '1'
list ports 'eth0' # LAN1
list ports 'eth1' # LAN2
list ports 'ae_wan' # WAN
config bridge-vlan brvlan_100_internet
option device 'br-internet'
option vlan '100'
list ports 'eth0:u' # LAN1 untagged
list ports 'eth1:u' # LAN2 untagged
list ports 'ae_wan:t' # WAN tagged
```
---
### Example 2: Only Specific LAN Ports Tagged
**Scenario**: Enterprise network where LAN1 and WAN are tagged, LAN2 and LAN3 are untagged
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='corporate'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:200:LAN1-WAN'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
**Result**:
```
config interface 'corporate'
option device 'br-corporate.200'
option proto 'dhcp'
config device br_corporate
option name 'br-corporate'
option type 'bridge'
option vlan_filtering '1'
list ports 'eth0' # LAN1
list ports 'eth1' # LAN2
list ports 'eth2' # LAN3
list ports 'ae_wan' # WAN
config bridge-vlan brvlan_200_corporate
option device 'br-corporate'
option vlan '200'
list ports 'eth0:t' # LAN1 tagged (specified)
list ports 'eth1:u' # LAN2 untagged
list ports 'eth2:u' # LAN3 untagged
list ports 'ae_wan:t' # WAN tagged (specified)
```
---
### Example 3: All LAN Ports Tagged, WAN Untagged
**Scenario**: Reverse scenario where LAN ports carry VLAN tags but WAN doesn't
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='service'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:300:LAN1-LAN2-LAN3'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
**Result**:
```
config bridge-vlan brvlan_300_service
option device 'br-service'
option vlan '300'
list ports 'eth0:t' # LAN1 tagged
list ports 'eth1:t' # LAN2 tagged
list ports 'eth2:t' # LAN3 tagged
list ports 'ae_wan:u' # WAN untagged
```
---
### Example 4: Only WAN Tagged (Explicit)
**Scenario**: Same as `wan-tagged` but using mixed mode explicitly
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='iptv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:1510:WAN-n'
uci set netmode.mode_4_supprted_args_3.value='LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
**Result**:
```
config interface 'iptv'
option device 'br-iptv.1510'
option proto 'none'
config bridge-vlan brvlan_1510_iptv
option device 'br-iptv'
option vlan '1510'
list ports 'eth2:u' # LAN3 untagged
list ports 'eth3:u' # LAN4 untagged
list ports 'ae_wan:t' # WAN tagged
```
---
### Example 5: Multi-Service with Different Tagging
**Scenario**: Internet with LAN1+WAN tagged, IPTV with only WAN tagged
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet,tv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:1499:LAN1-WAN,brvlan:mixed:1510:WAN-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
**Result**:
**Internet Service (VLAN 1499)**:
```
config bridge-vlan brvlan_1499_internet
option device 'br-internet'
option vlan '1499'
list ports 'eth0:t' # LAN1 tagged
list ports 'eth1:u' # LAN2 untagged
list ports 'ae_wan:t' # WAN tagged
```
**TV Service (VLAN 1510)**:
```
config bridge-vlan brvlan_1510_tv
option device 'br-tv'
option vlan '1510'
list ports 'eth2:u' # LAN3 untagged
list ports 'eth3:u' # LAN4 untagged
list ports 'ae_wan:t' # WAN tagged
```
---
### Example 6: Trunk Port Configuration
**Scenario**: LAN1 as trunk port (tagged), others as access ports (untagged)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='vlan100'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:100:LAN1'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-LAN3-LAN4'
uci commit netmode && service netmode restart
```
**Result**:
```
config bridge-vlan brvlan_100_vlan100
option device 'br-vlan100'
option vlan '100'
list ports 'eth0:t' # LAN1 tagged (trunk port)
list ports 'eth1:u' # LAN2 untagged (access port)
list ports 'eth2:u' # LAN3 untagged (access port)
list ports 'eth3:u' # LAN4 untagged (access port)
```
---
## Comparison: Mixed Mode vs Other Modes
| Mode | Syntax | Tagged Ports | Untagged Ports |
|------|--------|--------------|----------------|
| **tagged** | `brvlan:tagged:100` | ALL | None |
| **wan-tagged** | `brvlan:wan-tagged:100` | WAN only | All LAN |
| **mixed (default)** | `brvlan:mixed:100` | WAN only | All LAN |
| **mixed (custom)** | `brvlan:mixed:100:LAN1-WAN` | LAN1, WAN | All others |
---
## Use Cases
### Use Case 1: DMZ Configuration
- **LAN1**: Tagged (DMZ network with VLAN tag)
- **LAN2-4**: Untagged (local network)
- **WAN**: Tagged (ISP requirement)
```bash
brvlan:mixed:100:LAN1-WAN
```
### Use Case 2: Guest Network
- **LAN1-2**: Tagged (guest WiFi APs that handle VLANs)
- **LAN3-4**: Untagged (local devices)
- **WAN**: Untagged (local ISP connection)
```bash
brvlan:mixed:50:LAN1-LAN2
```
### Use Case 3: Managed Switch Uplink
- **LAN1**: Tagged (uplink to managed switch)
- **LAN2-4**: Untagged (end user devices)
- **WAN**: Tagged (ISP VLAN)
```bash
brvlan:mixed:200:LAN1-WAN
```
---
## Port Specification Reference
When specifying tagged ports in mixed mode:
| Specification | Resolves To | Example |
|---------------|-------------|---------|
| `WAN` | WAN device | `ae_wan` |
| `LAN1` | LAN1 device from UCI | `eth0` |
| `LAN1-LAN2` | LAN1 and LAN2 | `eth0`, `eth1` |
| `LAN1-WAN` | LAN1 and WAN | `eth0`, `ae_wan` |
| `ALL` | Not supported in tagged ports spec | Use `brvlan:tagged` instead |
---
## Troubleshooting
### Verify Port Tagging
```bash
# View bridge VLAN table
bridge vlan show
# Expected output shows :t (tagged) or :u (untagged)
port vlan-id
eth0 100 Tagged
eth1 100 Untagged
ae_wan 100 Tagged
```
### Check Configuration
```bash
# View bridge-vlan sections
uci show network | grep bridge-vlan -A5
# Look for ports list with :t or :u suffixes
```
### Common Mistakes
1. **Wrong Syntax**: Must use colon between VID and port spec
-`brvlan:mixed:100-LAN1-WAN`
-`brvlan:mixed:100:LAN1-WAN`
2. **Using ALL**: Don't use ALL in tagged ports
-`brvlan:mixed:100:ALL`
- ✅ Use `brvlan:tagged:100` instead
3. **Duplicate Ports**: Port appears in both bridge port list and tagged spec
- Ensure the port list in arg 3 includes all ports you reference in arg 2
---
## Advanced: Multiple VLANs on Same Bridge
While this guide focuses on single VLAN per bridge, you can create multiple bridge-vlan sections manually after netmode configuration for trunk scenarios. However, this is beyond the scope of netmode automation.
---
**Document Version**: 1.0
**Last Updated**: 2025-12-12
**Feature**: Bridge VLAN Filtering Mixed Mode

View File

@@ -0,0 +1,739 @@
# Advanced Mode - Configuration Scenarios
Complete examples for common use cases with both UCI and TR-181 configuration methods.
---
## Scenario 1: Simple Home Router (Transparent Bridge)
**Use Case**: All ports bridged together for simple home network
**Network Topology**:
```
All LAN ports + WAN → br-wan (no VLANs)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan'
uci set netmode.mode_4_supprted_args_2.value='bridge:transparent'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>bridge:transparent</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>ALL</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Single bridge interface `br-wan`
- All ports untagged
- DHCP client enabled
---
## Scenario 2: Traditional LAN Bridge with Routed WAN
**Use Case**: Classic router setup with LAN bridge and separate routed WAN
**Network Topology**:
```
All LAN ports → br-lan (bridge)
WAN port → wan (routed interface)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='lan,wan'
uci set netmode.mode_4_supprted_args_2.value='bridge:transparent,route:transparent'
uci set netmode.mode_4_supprted_args_3.value='ALL_LAN,WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>lan,wan</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>bridge:transparent,route:transparent</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>ALL_LAN,WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Bridge interface `br-lan` with all LAN ports only
- Routed interface `wan` on WAN port
- Traditional router topology
---
## Scenario 3: ISP Internet Service (Single VLAN)
**Use Case**: ISP requires VLAN 100 on WAN port for internet access
**Network Topology**:
```
WAN.100 (tagged) + LAN1-4 (untagged) → br-internet.100
```
### UCI Configuration (Bridge VLAN Filtering - Recommended)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:100'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
### UCI Configuration (Traditional VLAN Devices)
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet'
uci set netmode.mode_4_supprted_args_2.value='bridge:wan-tagged:100'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>internet</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:wan-tagged:100</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>ALL</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- WAN port tagged with VLAN 100
- LAN ports untagged
- DHCP client enabled
---
## Scenario 4: ISP Dual Service (Internet + IPTV)
**Use Case**: ISP provides Internet on VLAN 1499 and IPTV on VLAN 1510
**Network Topology**:
```
Internet: WAN.1499 (tagged) + LAN1-2 (untagged) → br-internet.1499
IPTV: WAN.1510 (tagged) + LAN3-4 (untagged) → br-tv.1510
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet,tv'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:1499,brvlan:wan-tagged:1510-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>internet,tv</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:wan-tagged:1499,brvlan:wan-tagged:1510-n</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-LAN2-WAN,LAN3-LAN4-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Internet bridge on VLAN 1499 with LAN1-2
- IPTV bridge on VLAN 1510 with LAN3-4 (proto=none, no DHCP)
- Both services use WAN port with respective VLANs
---
## Scenario 5: ISP Triple-Play (Internet + IPTV + VoIP)
**Use Case**: Full triple-play service with Internet, IPTV, and VoIP
**Network Topology**:
```
Internet: WAN.100 (tagged) + LAN1-2 (untagged) → br-internet.100
IPTV: WAN.200 (tagged) + LAN3 (untagged) → br-tv.200
VoIP: WAN.300 (tagged) + LAN4 (untagged) → br-voip.300
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='internet,tv,voip'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:100,brvlan:wan-tagged:200-n,brvlan:wan-tagged:300-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-WAN,LAN4-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>internet,tv,voip</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:wan-tagged:100,brvlan:wan-tagged:200-n,brvlan:wan-tagged:300-n</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-LAN2-WAN,LAN3-WAN,LAN4-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Internet on VLAN 100 with DHCP (LAN1-2)
- IPTV on VLAN 200 without DHCP (LAN3)
- VoIP on VLAN 300 without DHCP (LAN4)
---
## Scenario 6: Routed Multi-Service (Internet + IPTV + Management)
**Use Case**: Multiple routed services on different VLANs with NAT/firewall
**Network Topology**:
```
WAN.100 → wan (routed, DHCP, firewall)
WAN.200 → iptv (routed, DHCP, firewall)
WAN.300 → mgmt (routed, DHCP, firewall)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan,iptv,mgmt'
uci set netmode.mode_4_supprted_args_2.value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.mode_4_supprted_args_3.value='WAN,WAN,WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan,iptv,mgmt</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>route:vlan:100,route:vlan:200,route:vlan:300</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>WAN,WAN,WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Three separate routed interfaces
- Each with own firewall zone
- All with DHCP clients enabled
---
## Scenario 7: Hybrid Setup (Routed Internet + Bridged IPTV)
**Use Case**: Internet needs routing/NAT, but IPTV needs transparent bridge to STBs
**Network Topology**:
```
WAN.100 → wan (routed, firewall)
WAN.200 + LAN1-3 → br-iptv.200 (bridged, transparent)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan,iptv'
uci set netmode.mode_4_supprted_args_2.value='route:vlan:100,brvlan:wan-tagged:200-n'
uci set netmode.mode_4_supprted_args_3.value='WAN,LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan,iptv</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>route:vlan:100,brvlan:wan-tagged:200-n</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>WAN,LAN1-LAN2-LAN3-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- WAN interface routed with firewall
- IPTV bridged transparently to LAN ports
- Firewall enabled (because of routed interface)
---
## Scenario 8: Corporate Network with Trunk Port
**Use Case**: LAN1 is trunk port to managed switch, other ports are access ports
**Network Topology**:
```
VLAN 200: LAN1 (tagged) + WAN (tagged) + LAN2-3 (untagged) → br-corporate.200
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='corporate'
uci set netmode.mode_4_supprted_args_2.value='brvlan:mixed:200:LAN1-WAN'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-LAN3-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>corporate</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:mixed:200:LAN1-WAN</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-LAN2-LAN3-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- LAN1 and WAN tagged (trunk ports)
- LAN2-3 untagged (access ports)
- All on VLAN 200
---
## Scenario 9: Enterprise Multi-VLAN (Separate Networks)
**Use Case**: Separate networks for guest, corporate, and management
**Network Topology**:
```
Guest: WAN.100 (tagged) + LAN1 (untagged) → br-guest.100
Corporate: WAN.200 (tagged) + LAN2-3 (untagged) → br-corporate.200
Management: WAN.300 (tagged) + LAN4 (untagged) → br-mgmt.300
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='guest,corporate,mgmt'
uci set netmode.mode_4_supprted_args_2.value='brvlan:wan-tagged:100-n,brvlan:wan-tagged:200-n,brvlan:wan-tagged:300'
uci set netmode.mode_4_supprted_args_3.value='LAN1-WAN,LAN2-LAN3-WAN,LAN4-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>guest,corporate,mgmt</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:wan-tagged:100-n,brvlan:wan-tagged:200-n,brvlan:wan-tagged:300</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-WAN,LAN2-LAN3-WAN,LAN4-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Guest network on VLAN 100 (no DHCP)
- Corporate network on VLAN 200 (no DHCP)
- Management network on VLAN 300 (DHCP enabled)
---
## Scenario 10: Wholesale QinQ Provider
**Use Case**: Service provider supporting multiple customers with QinQ (802.1ad)
**Network Topology**:
```
Customer A: All ports double-tagged (S-tag 100, C-tag 10)
Customer B: All ports double-tagged (S-tag 100, C-tag 20)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='customer_a,customer_b'
uci set netmode.mode_4_supprted_args_2.value='bridge:qinq:10:100-n,bridge:qinq:20:100-n'
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2-WAN,LAN3-LAN4-WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>customer_a,customer_b</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>bridge:qinq:10:100-n,bridge:qinq:20:100-n</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>LAN1-LAN2-WAN,LAN3-LAN4-WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- Customer A bridge with C-tag 10, S-tag 100
- Customer B bridge with C-tag 20, S-tag 100
- Both without DHCP (proto=none)
**Note**: QinQ requires traditional `bridge:` mode, not available with `brvlan:` mode.
---
## Scenario 11: MACVLAN Multi-Service (Different MAC Addresses)
**Use Case**: ISP requires different MAC addresses for Internet and IPTV services
**Network Topology**:
```
WAN (default MAC) → wan (routed)
WAN (custom MAC) → iptv (routed)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan,iptv'
uci set netmode.mode_4_supprted_args_2.value='route:transparent,route:macvlan:AA:BB:CC:DD:EE:FF'
uci set netmode.mode_4_supprted_args_3.value='WAN,WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan,iptv</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>route:transparent,route:macvlan:AA:BB:CC:DD:EE:FF</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>WAN,WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- WAN interface with default MAC
- IPTV interface with custom MAC (AA:BB:CC:DD:EE:FF)
- Both routed with firewall
---
## Scenario 12: Standalone VLAN Interface
**Use Case**: WAN as standalone VLAN interface (no bridge, no routing, for custom protocols)
**Network Topology**:
```
WAN.2501 → wan (standalone, proto=none)
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='wan'
uci set netmode.mode_4_supprted_args_2.value='direct:2501'
uci set netmode.mode_4_supprted_args_3.value='WAN'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>wan</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>direct:2501</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>WAN</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- WAN.2501 VLAN device created
- No bridge, no routing layer
- proto=none (manual configuration needed)
---
## Scenario 13: All Ports Tagged (Managed Network)
**Use Case**: All ports need VLAN tags for managed switch environment
**Network Topology**:
```
VLAN 100: All ports tagged → br-mgmt.100
```
### UCI Configuration
```bash
uci set netmode.global.mode='advanced'
uci set netmode.mode_4_supprted_args_1.value='mgmt'
uci set netmode.mode_4_supprted_args_2.value='brvlan:tagged:100'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
```
### TR-181 Configuration
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>advanced</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.1.Value</Name>
<Value>mgmt</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.2.Value</Name>
<Value>brvlan:tagged:100</Value>
</ParameterValueStruct>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.SupportedModes.4.SupportedArguments.3.Value</Name>
<Value>ALL</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
**Result**:
- All ports (LAN + WAN) tagged with VLAN 100
- Single bridge with VLAN filtering
- DHCP client enabled
---
## Quick Reference: Configuration Cheat Sheet
### Interface Types
| Type | Syntax | When to Use |
|------|--------|-------------|
| Transparent Bridge | `bridge:transparent` | Simple home network, no VLANs |
| Bridge VLAN Filtering (Tagged) | `brvlan:tagged:VID` | All ports need VLAN tags, modern approach |
| Bridge VLAN Filtering (WAN Tagged) | `brvlan:wan-tagged:VID` | ISP VLAN on WAN, LAN untagged (recommended) |
| Bridge VLAN Filtering (Mixed) | `brvlan:mixed:VID:PORTS` | Custom trunk/access port setup |
| Traditional Tagged Bridge | `bridge:tagged:VID` | Legacy systems, all ports tagged |
| Traditional WAN Tagged | `bridge:wan-tagged:VID` | Legacy ISP VLAN setup |
| QinQ Bridge | `bridge:qinq:CVID:SVID` | Wholesale provider, double tagging |
| Routed VLAN | `route:vlan:VID` | Need routing/NAT per service |
| Routed MACVLAN | `route:macvlan:MAC` | Different MAC per service |
| Direct VLAN | `direct:VID` | Standalone VLAN for custom protocols |
### Modifiers
| Modifier | Effect | Example |
|----------|--------|---------|
| `-n` | Disable DHCP client (proto=none) | `brvlan:wan-tagged:100-n` |
| `-d` | Disable interface | `route:vlan:200-d` |
### Port Specifications
| Syntax | Meaning |
|--------|---------|
| `ALL` | All LAN + WAN ports |
| `WAN` | WAN port only |
| `LAN1-LAN2-WAN` | LAN1, LAN2, and WAN |
| `LAN1-LAN3` | LAN1 and LAN3 only |
### MAC Address Macros
| Macro | Description | Example Result |
|-------|-------------|----------------|
| `BaseMACAddress` | Base MAC from `fw_printenv -n ethaddr` | `94:3F:0C:D5:76:00` |
| `BaseMACAddressP1` | Base MAC + 1 | `94:3F:0C:D5:76:01` |
| `BaseMACAddressP2` | Base MAC + 2 | `94:3F:0C:D5:76:02` |
| `BaseMACAddressPN` | Base MAC + N | `BaseMACAddressP5``94:3F:0C:D5:76:05` |
| Explicit MAC | Direct assignment | `AA:BB:CC:DD:EE:FF` |
---
**Document Version**: 1.0
**Last Updated**: 2025-12-12

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

422
netmode/docs/README.md Normal file
View File

@@ -0,0 +1,422 @@
# Netmode - Network Mode Switching for OpenWrt/iopsys
**Version**: 1.1.11
**License**: GPL-2.0-only
**Maintainer**: iopsys
## Overview
Netmode is a network configuration management package for OpenWrt/iopsys-based routers that enables seamless switching between different WAN connection types. It provides a unified interface for managing network modes including DHCP, PPPoE, Static IP, and Bridge configurations.
### Key Features
- **Simple Mode Switching**: Change WAN connection type with a single command
- **Multiple Mode Support**: DHCP, PPPoE, Static IP, and Bridged mode
- **Automatic Configuration**: Handles network, firewall, DHCP, and multicast settings
- **TR-069/USP Integration**: Remote management via BBF data model
- **Extensible Architecture**: Easy to add custom network modes
- **Safe Transitions**: Proper cleanup and validation during mode switches
## Quick Start
### Installation
```bash
# Install via opkg
opkg update
opkg install netmode
# Or build from source
make package/feeds/iopsys/netmode/compile
```
### Basic Usage
```bash
# Check current mode
cat /etc/netmodes/.last_mode
# Switch to DHCP mode
uci set netmode.global.mode='routed-dhcp'
uci commit netmode
service netmode restart
# Switch to PPPoE mode
uci set netmode.global.mode='routed-pppoe'
uci set netmode.@supported_args[2].value='username@isp.com'
uci set netmode.@supported_args[3].value='password'
uci commit netmode
service netmode restart
```
## Supported Modes
| Mode | Description | Use Case |
|------|-------------|----------|
| **routed-dhcp** | Router with DHCP WAN | Cable/Fiber internet with automatic IP |
| **routed-pppoe** | Router with PPPoE WAN | DSL internet with authentication |
| **routed-static** | Router with Static IP WAN | Business connections with fixed IP |
| **advanced** ⭐ | **Unified Advanced Mode** | Bridges, routed interfaces, VLAN, QinQ, MACVLAN - all in one |
### Advanced Mode (v1.1.11+) - Recommended
The **advanced** mode is a unified, powerful configuration mode that replaces both `bridged` and `routed-multi-service` modes. It supports:
**Bridge interfaces** with VLAN/QinQ support (traditional VLAN devices)
**Bridge VLAN filtering** (modern kernel bridge VLAN filtering - **recommended**)
**Routed interfaces** with VLAN/MACVLAN support
**Standalone VLAN interfaces** (direct, no bridge)
**Mixed scenarios** (combine bridges and routed interfaces)
**Flexible configuration** with single, intuitive syntax
**MAC address assignment** with macros (BaseMACAddress, BaseMACAddressPNN)
**Comprehensive validation** with helpful error messages
**Quick Example - Triple-Play Service**:
```bash
uci set netmode.global.mode='advanced'
uci set netmode.@supported_args[0].value='wan,iptv,mgmt'
uci set netmode.@supported_args[1].value='route:vlan:100,route:vlan:200,route:vlan:300'
uci set netmode.@supported_args[2].value='WAN,WAN,WAN'
uci commit netmode && service netmode restart
```
See **[ADVANCED_MODE_GUIDE.md](ADVANCED_MODE_GUIDE.md)** for complete documentation.
## Documentation
Comprehensive documentation is available in the following guides:
### For Users
- **[ADVANCED_MODE_GUIDE.md](ADVANCED_MODE_GUIDE.md)** ⭐ - **Complete advanced mode guide** (RECOMMENDED)
- All interface types (bridge, routed, standalone)
- VLAN, QinQ, MACVLAN configurations
- Bridge VLAN filtering (modern approach)
- Real-world use case scenarios
- TR-069/USP examples
- Troubleshooting
- **[BRIDGE_VLAN_FILTERING.md](BRIDGE_VLAN_FILTERING.md)** 🆕 - **Bridge VLAN filtering guide**
- Modern bridge VLAN filtering feature
- Syntax and configuration examples
- Performance benefits
- Migration from traditional VLAN devices
- **[ADVANCED_MODE_QUICK_REFERENCE.md](ADVANCED_MODE_QUICK_REFERENCE.md)** - Quick reference for advanced mode
- **[CONFIGURATION_SCENARIOS.md](CONFIGURATION_SCENARIOS.md)** - Real-world configuration examples with UCI and TR-181
- **[VALIDATION_AND_ERROR_HANDLING.md](VALIDATION_AND_ERROR_HANDLING.md)** 🆕 - **Validation and error handling guide**
- Input validation rules
- Error messages and troubleshooting
- Common validation errors
- Testing validation
- **[USER_GUIDE.md](USER_GUIDE.md)** - User guide for basic modes (DHCP, PPPoE, Static)
- Getting started
- Mode descriptions
- Common use cases
- FAQ
### For Developers
- **[DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md)** - Developer documentation
- Development environment setup
- Code organization
- API reference
- Testing framework
- Contributing guidelines
### For Implementers
- **[IMPLEMENTATION_GUIDE.md](IMPLEMENTATION_GUIDE.md)** - Implementation details
- Architecture overview
- Creating custom modes
- Environment variables
- Hook system
- Data model integration
## Architecture
```
┌─────────────────────────────────────────┐
│ Netmode System │
├─────────────────────────────────────────┤
│ UCI Config → Init Service → Mode Scripts│
│ ↓ ↓ ↓ │
│ Environment Pre-hooks UCI Copy │
│ Variables ↓ ↓ │
│ ↓ Mode Scripts Post-hooks │
│ └──────────┴────────────┘ │
│ Network Reconfiguration │
└─────────────────────────────────────────┘
```
### Components
- **Init Service** (`/etc/init.d/netmode`): Orchestrates mode switching
- **Mode Scripts** (`/etc/netmodes/<mode>/scripts/`): Mode-specific configuration
- **UCI Config** (`/etc/config/netmode`): Mode definitions and parameters
- **Data Model** (`datamodel.json`): BBF TR-181 integration
- **Hooks** (`/lib/netmode/{pre,post}/`): Pre/post mode switch scripts
## Configuration Examples
### DHCP with VLAN
```bash
uci set netmode.global.mode='routed-dhcp'
uci set netmode.@supported_args[0].value='100' # VLAN ID
uci commit netmode
service netmode restart
```
### PPPoE with Custom DNS
```bash
uci set netmode.global.mode='routed-pppoe'
uci set netmode.@supported_args[2].value='user@isp.com'
uci set netmode.@supported_args[3].value='password123'
uci set netmode.@supported_args[6].value='8.8.8.8,8.8.4.4'
uci commit netmode
service netmode restart
```
### Static IP Business Connection
```bash
uci set netmode.global.mode='routed-static'
uci set netmode.@supported_args[6].value='203.0.113.10'
uci set netmode.@supported_args[7].value='255.255.255.0'
uci set netmode.@supported_args[8].value='203.0.113.1'
uci commit netmode
service netmode restart
```
## Creating Custom Modes
Custom network modes can be added by following these steps:
1. **Create mode directory structure**:
```bash
mkdir -p /etc/netmodes/my-mode/scripts
```
2. **Define mode in supported_modes.json**:
```json
{
"name": "my-mode",
"description": "My Custom Mode",
"supported_args": [...]
}
```
3. **Create mode script**:
```bash
cat > /etc/netmodes/my-mode/scripts/10-my-mode << 'EOF'
#!/bin/sh
# Configuration logic here
EOF
chmod +x /etc/netmodes/my-mode/scripts/10-my-mode
```
4. **Import to UCI and test**:
```bash
sh /etc/uci-defaults/40_netmode_populated_supported_modes
uci set netmode.global.mode='my-mode'
service netmode restart
```
See [IMPLEMENTATION_GUIDE.md](IMPLEMENTATION_GUIDE.md#creating-a-new-network-mode) for detailed instructions.
## TR-069/USP Integration
Netmode exposes a BBF TR-181 data model for remote management:
**Data Model Path**: `Device.X_IOWRT_EU_NetMode.`
```
Device.X_IOWRT_EU_NetMode.
├── Enable (boolean, r/w)
├── Mode (string, r/w)
├── SupportedModesNumberOfEntries (unsignedInt, r)
└── SupportedModes.{i}.
├── Name (string, r)
├── Description (string, r)
└── SupportedArguments.{i}.
├── Name (string, r)
├── Type (string, r)
├── Required (boolean, r)
└── Value (string, r/w)
```
Example TR-069 operation:
```xml
<SetParameterValues>
<ParameterList>
<ParameterValueStruct>
<Name>Device.X_IOWRT_EU_NetMode.Mode</Name>
<Value>routed-dhcp</Value>
</ParameterValueStruct>
</ParameterList>
</SetParameterValues>
```
## System Requirements
- **Platform**: OpenWrt/iopsys
- **Dependencies**:
- `dm-service` (BBF data model service)
- `uci`
- `procd`
- `libubox` (jshn)
- **Recommended**:
- `logread` for monitoring
- `firewall`, `odhcpd`, `mcast` for full functionality
## File Structure
```
netmode/
├── Makefile # Package build definition
├── README.md # This file
├── IMPLEMENTATION_GUIDE.md # Implementation guide
├── DEVELOPER_GUIDE.md # Developer documentation
├── USER_GUIDE.md # User documentation
├── bbfdm_service.json # BBF service registration
└── files/
├── etc/
│ ├── config/netmode # UCI configuration
│ ├── init.d/netmode # Init script (START=11)
│ ├── uci-defaults/ # First-boot scripts
│ └── netmodes/
│ ├── supported_modes.json # Mode definitions
│ ├── routed-dhcp/scripts/
│ ├── routed-pppoe/scripts/
│ ├── routed-static/scripts/
│ └── bridged/scripts/
└── lib/
├── netmode/
│ ├── pre/ # Pre-switch hooks
│ └── post/ # Post-switch hooks
└── upgrade/keep.d/netmode # Sysupgrade preservation
```
## Troubleshooting
### Mode Not Switching
```bash
# Check if enabled
uci get netmode.global.enabled
# Check logs
logread | grep netmode
# Force mode change
rm /etc/netmodes/.last_mode
service netmode restart
```
### No Internet After Switch
```bash
# Verify mode applied
cat /etc/netmodes/.last_mode
# Check WAN status
ifconfig wan
ip route
# Restart network
/etc/init.d/network restart
```
### PPPoE Authentication Failed
```bash
# Check credentials
uci show network.wan | grep -E "username|password"
# Check logs
logread | grep ppp
# Verify VLAN if required
uci get network.wan.device
```
See [USER_GUIDE.md](USER_GUIDE.md#troubleshooting) for comprehensive troubleshooting.
## Development
### Building
```bash
# Clone repository
cd feeds/iopsys/netmode
# Build package
make package/feeds/iopsys/netmode/compile V=s
# Install on device
scp bin/packages/*/iopsys/netmode_*.ipk root@192.168.1.1:/tmp/
ssh root@192.168.1.1 "opkg install /tmp/netmode_*.ipk"
```
### Testing
```bash
# Run mode switch test
./test-mode-switch.sh routed-dhcp
# Monitor logs
logread -f | grep netmode
# Verify configuration
uci show network
cat /etc/netmodes/.last_mode
```
### Contributing
Contributions are welcome! Please follow these steps:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Test thoroughly on target hardware
5. Update documentation
6. Submit a pull request
See [DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md#contributing-guidelines) for detailed guidelines.
## License
This project is licensed under the GNU General Public License v2.0 only.
See `/LICENSE` for more information.
## Support
- **Documentation**: See guides in this repository
- **Issues**: Contact iopsys development team
- **Community**: OpenWrt and iopsys forums
## Changelog
### Version 1.1.11
- Current stable release
- Support for DHCP, PPPoE, Static IP, and Bridge modes
- BBF TR-181 data model integration
- Comprehensive documentation
## Acknowledgments
- OpenWrt project for the underlying platform
- iopsys for development and maintenance
- Contributors and testers
## Related Projects
- [OpenWrt](https://openwrt.org/) - Linux operating system for embedded devices
- [iopsys](https://www.iopsys.eu/) - Broadband device management
- [BBF](https://www.broadband-forum.org/) - Broadband Forum standards
---
**For detailed information, please refer to the specific guides:**
- Users: [USER_GUIDE.md](USER_GUIDE.md)
- Developers: [DEVELOPER_GUIDE.md](DEVELOPER_GUIDE.md)
- Implementers: [IMPLEMENTATION_GUIDE.md](IMPLEMENTATION_GUIDE.md)

887
netmode/docs/USER_GUIDE.md Normal file
View File

@@ -0,0 +1,887 @@
# Netmode User Guide
## Table of Contents
1. [Introduction](#introduction)
2. [Getting Started](#getting-started)
3. [Available Network Modes](#available-network-modes)
4. [Configuration Methods](#configuration-methods)
5. [Common Use Cases](#common-use-cases)
6. [Troubleshooting](#troubleshooting)
7. [FAQ](#faq)
8. [Glossary](#glossary)
---
## Introduction
### What is Netmode?
Netmode is a network configuration management system for iopsys-based routers that allows you to easily switch between different WAN (Wide Area Network) connection types without manual configuration.
### Why Use Netmode?
- **Simplicity**: Switch network modes with a single command
- **Flexibility**: Support for multiple WAN connection types
- **Consistency**: Ensures proper configuration of all related network services
- **Remote Management**: Can be controlled via TR-069/USP protocols
- **Safety**: Automatically handles complex network reconfigurations
### Supported Connection Types
- **DHCP**: Automatic IP configuration (most common for cable/fiber connections)
- **PPPoE**: Username/password authentication (common for DSL connections)
- **Static IP**: Manual IP configuration (business connections)
- **Bridged Mode**: Bridge/modem mode (disable routing)
---
## Getting Started
### Checking if Netmode is Installed
```bash
# Check if netmode package is installed
opkg list-installed | grep netmode
# Check netmode service status
service netmode status
```
Expected output:
```
netmode - 1.1.11-1 - Network Modes and Utils
```
### Checking Current Mode
```bash
# View current configuration
uci show netmode.global
# Check active mode
cat /etc/netmodes/.last_mode
```
Example output:
```
netmode.global=netmode
netmode.global.enabled='1'
netmode.global.mode='routed-dhcp'
```
### Viewing Available Modes
```bash
# List all supported modes
uci show netmode | grep "supported_modes.*name"
```
Example output:
```
netmode.@supported_modes[0].name='routed-dhcp'
netmode.@supported_modes[1].name='routed-pppoe'
netmode.@supported_modes[2].name='routed-static'
netmode.@supported_modes[3].name='bridged'
```
---
## Available Network Modes
### 1. Routed DHCP Mode
**Mode Name**: `routed-dhcp`
**When to Use**:
- Cable internet connection
- Fiber internet connection
- Any ISP that automatically provides IP configuration
**Features**:
- Automatic IP address assignment
- Built-in router (NAT)
- Firewall enabled
- DHCP server for local devices
- IPv4 and IPv6 support
**Configuration Parameters**:
- `vlanid` (optional): VLAN ID if required by ISP
- `dns_servers` (optional): Custom DNS servers (comma-separated)
**Example Configuration**:
```bash
# Basic DHCP mode
uci set netmode.global.mode='routed-dhcp'
uci commit netmode
service netmode restart
# DHCP with VLAN ID 100
uci set netmode.global.mode='routed-dhcp'
# Find VLAN argument and set value
uci set netmode.@supported_args[0].value='100'
uci commit netmode
service netmode restart
```
---
### 2. Routed PPPoE Mode
**Mode Name**: `routed-pppoe`
**When to Use**:
- DSL internet connection
- ISP requires username and password authentication
- Connection uses PPPoE protocol
**Features**:
- Username/password authentication
- Built-in router (NAT)
- Firewall enabled
- DHCP server for local devices
- Automatic MTU optimization
**Required Parameters**:
- `username`: PPPoE username (provided by ISP)
- `password`: PPPoE password (provided by ISP)
**Optional Parameters**:
- `vlanid`: VLAN ID if required by ISP
- `mtu`: Maximum transmission unit (default: 1492 for PPPoE)
- `dns_servers`: Custom DNS servers (comma-separated)
**Example Configuration**:
```bash
# Set mode
uci set netmode.global.mode='routed-pppoe'
# Set username (find correct argument index)
uci set netmode.@supported_args[2].value='myuser@isp.com'
# Set password
uci set netmode.@supported_args[3].value='mypassword'
# Optional: Set VLAN
uci set netmode.@supported_args[4].value='100'
# Optional: Set MTU
uci set netmode.@supported_args[5].value='1492'
# Apply configuration
uci commit netmode
service netmode restart
```
**Important Notes**:
- Device will reboot after configuration
- Keep ISP credentials safe
- Most DSL connections use VLAN ID 7 or 100 (check with ISP)
- MTU typically 1492 for PPPoE (auto-configured)
---
### 3. Routed Static IP Mode
**Mode Name**: `routed-static`
**When to Use**:
- Business internet connection with static IP
- ISP provided specific IP address, subnet mask, and gateway
- Fixed IP address required for services (web server, VPN, etc.)
**Features**:
- Manual IP configuration
- Built-in router (NAT)
- Firewall enabled
- DHCP server for local devices
- Fixed WAN IP address
**Required Parameters**:
- `ipaddr`: Static IP address (e.g., 93.21.0.104)
- `netmask`: Subnet mask (e.g., 255.255.255.0)
- `gateway`: Default gateway IP (e.g., 93.21.0.1)
**Optional Parameters**:
- `vlanid`: VLAN ID if required
- `dns_servers`: DNS servers (comma-separated, e.g., 8.8.8.8,8.8.4.4)
**Example Configuration**:
```bash
# Set mode
uci set netmode.global.mode='routed-static'
# Set IP address
uci set netmode.@supported_args[6].value='93.21.0.104'
# Set subnet mask
uci set netmode.@supported_args[7].value='255.255.255.0'
# Set gateway
uci set netmode.@supported_args[8].value='93.21.0.1'
# Optional: Set DNS servers
uci set netmode.@supported_args[9].value='8.8.8.8,8.8.4.4'
# Apply configuration
uci commit netmode
service netmode restart
```
**Important Notes**:
- Use exact IP settings provided by ISP
- Incorrect settings will result in no internet connectivity
- DNS servers are optional but recommended
- Device will reboot after configuration
---
### 4. Bridged Mode
**Mode Name**: `bridged`
**When to Use**:
- Using router as a bridge/modem only
- Another router handles routing and DHCP
- ISP requires bridge mode
- Cascading routers (not recommended, prefer this mode on upstream device)
- Advanced VLAN configurations (multiple bridges, QinQ)
**Features**:
- Supports multiple bridge configurations
- VLAN tagging and QinQ support
- Can create standalone VLAN interfaces (no bridge)
- No routing (NAT disabled)
- Firewall disabled
- DHCP server disabled
- Device acts as transparent bridge
**Configuration Parameters**:
- `interface_names` (optional): Comma-separated interface names (default: wan)
- `interface_types` (optional): Comma-separated types (transparent, tagged:VID, direct:VID, qinq:C:S, etc.)
- `ports` (optional): Comma-separated port lists (default: ALL)
**Basic Configuration**:
```bash
# Simple transparent bridge
uci set netmode.global.mode='bridged'
uci commit netmode
service netmode restart
```
**Advanced Configuration Examples**:
```bash
# Multiple VLANs as separate bridges
uci set netmode.global.mode='bridged'
uci set netmode.@supported_args[0].value='lan100,lan200' # interface_names
uci set netmode.@supported_args[1].value='tagged:100,tagged:200' # interface_types
uci set netmode.@supported_args[2].value='LAN1-LAN2,LAN3-LAN4' # ports
uci commit netmode
service netmode restart
# Standalone VLAN interface (no bridge)
uci set netmode.global.mode='bridged'
uci set netmode.@supported_args[0].value='wan'
uci set netmode.@supported_args[1].value='direct:2501' # Direct VLAN interface
uci set netmode.@supported_args[2].value='WAN'
uci commit netmode
service netmode restart
```
**Important Notes**:
- Device will obtain IP from upstream router/ISP
- Web interface may be inaccessible until device gets IP
- To access device: connect directly and check DHCP leases on upstream router
- Device will reboot after configuration
- Use this mode carefully - you may lose access to the device
- For advanced VLAN scenarios, see ADVANCED_BRIDGE_GUIDE.md
**Parameter Naming Note**:
As of version 1.1.11, parameters were renamed for clarity:
- `bridge_names``interface_names` (old name still works)
- `bridge_types``interface_types` (old name still works)
**Reverting from Bridge Mode**:
If you lose access, connect via serial console or perform factory reset.
---
## Configuration Methods
### Method 1: UCI Command Line (SSH/Console)
**Step-by-step procedure**:
```bash
# 1. Connect to device
ssh root@192.168.1.1
# 2. View current configuration
uci show netmode
# 3. Set desired mode
uci set netmode.global.mode='routed-dhcp'
# 4. Set any required parameters (example for PPPoE)
uci set netmode.@supported_args[2].value='username@isp.com'
uci set netmode.@supported_args[3].value='password123'
# 5. Save configuration
uci commit netmode
# 6. Apply changes
service netmode restart
# 7. Monitor logs (optional)
logread -f | grep netmode
```
### Method 2: TR-069/CWMP (Remote Management)
If your device is managed by an ACS (Auto Configuration Server):
**Get current mode**:
```xml
GetParameterValues
Device.X_IOWRT_EU_NetMode.Mode
```
**Set PPPoE mode**:
```xml
SetParameterValues
Device.X_IOWRT_EU_NetMode.Mode = "routed-pppoe"
Device.X_IOWRT_EU_NetMode.SupportedModes.2.SupportedArguments.1.Value = "username@isp.com"
Device.X_IOWRT_EU_NetMode.SupportedModes.2.SupportedArguments.2.Value = "password123"
```
**Trigger mode change**:
```bash
# On device (via TR-069 script)
service netmode restart
```
### Method 3: Web Interface (if available)
Some firmware may provide a web interface for netmode configuration.
Typical location: **Network → WAN → Connection Type**
---
## Common Use Cases
### Use Case 1: Switching from DHCP to PPPoE
**Scenario**: ISP changed from cable to DSL connection
```bash
# 1. Connect to router
ssh root@192.168.1.1
# 2. Find username and password argument indices
uci show netmode | grep -A3 "name='username'"
# Note the index numbers
# 3. Set mode and credentials
uci set netmode.global.mode='routed-pppoe'
uci set netmode.@supported_args[2].value='newuser@dsl-isp.com'
uci set netmode.@supported_args[3].value='newpassword'
# 4. If ISP requires VLAN (e.g., VLAN 7)
uci set netmode.@supported_args[4].value='7'
# 5. Apply
uci commit netmode
service netmode restart
# Device will reboot
```
### Use Case 2: Adding Custom DNS Servers
**Scenario**: Want to use Google DNS or Cloudflare DNS
```bash
# For DHCP mode
uci set netmode.global.mode='routed-dhcp'
# Find dns_servers argument index
uci show netmode | grep -B2 "name='dns_servers'"
# Set custom DNS (Google DNS example)
uci set netmode.@supported_args[1].value='8.8.8.8,8.8.4.4'
# Or Cloudflare DNS
uci set netmode.@supported_args[1].value='1.1.1.1,1.0.0.1'
# Apply
uci commit netmode
service netmode restart
```
### Use Case 3: Configuring VLAN for ISP
**Scenario**: ISP requires VLAN tagging (common for fiber)
```bash
# Identify your mode (example: DHCP)
uci set netmode.global.mode='routed-dhcp'
# Find VLAN argument
uci show netmode | grep -B2 "name='vlanid'"
# Set VLAN ID (ISP will provide this, commonly 100, 7, or other)
uci set netmode.@supported_args[0].value='100'
# Apply
uci commit netmode
service netmode restart
```
### Use Case 4: Setting Up Bridge Mode for Secondary Router
**Scenario**: Using dedicated router behind ISP modem
```bash
# Configure device as bridge
uci set netmode.global.mode='bridged'
uci commit netmode
service netmode restart
# After reboot, device will be in bridge mode
# Connect to it via the IP it receives from upstream
```
### Use Case 5: Business Static IP Setup
**Scenario**: ISP provided static IP configuration
**ISP Information**:
- IP Address: 203.0.113.10
- Subnet Mask: 255.255.255.248
- Gateway: 203.0.113.9
- DNS: 203.0.113.1, 203.0.113.2
```bash
# Set mode
uci set netmode.global.mode='routed-static'
# Configure IP settings (find argument indices first)
uci show netmode | grep -B2 "name='ipaddr'"
uci show netmode | grep -B2 "name='netmask'"
uci show netmode | grep -B2 "name='gateway'"
# Set values
uci set netmode.@supported_args[6].value='203.0.113.10'
uci set netmode.@supported_args[7].value='255.255.255.248'
uci set netmode.@supported_args[8].value='203.0.113.9'
uci set netmode.@supported_args[9].value='203.0.113.1,203.0.113.2'
# Apply
uci commit netmode
service netmode restart
```
---
## Troubleshooting
### Problem: No Internet After Mode Switch
**Symptoms**:
- Cannot access websites
- No WAN IP address
- Local network works but no internet
**Diagnosis**:
```bash
# Check WAN interface status
ifconfig wan
# Check if WAN has IP
ip addr show wan
# Check routing table
ip route
# Check DNS resolution
nslookup google.com
# Check mode applied correctly
cat /etc/netmodes/.last_mode
uci show netmode.global.mode
```
**Solutions**:
1. **For DHCP mode**:
```bash
# Restart network
/etc/init.d/network restart
# Release and renew DHCP
udhcpc -i wan -n
```
2. **For PPPoE mode**:
```bash
# Check credentials
uci show network.wan.username
uci show network.wan.password
# Check PPPoE connection
logread | grep pppd
# Restart PPPoE
ifdown wan
ifup wan
```
3. **For Static IP mode**:
```bash
# Verify settings
uci show network.wan
# Check if gateway is reachable
ping -c 3 $(uci get network.wan.gateway)
```
### Problem: Cannot Access Router After Mode Change
**Symptoms**:
- Cannot reach router web interface
- Cannot SSH to router
- Router appears offline
**Solutions**:
1. **Check router IP address**:
- Routed modes: Router should be at `192.168.1.1`
- Bridged mode: Router gets IP from upstream device
2. **For bridged mode**:
```bash
# Connect to upstream router
# Check DHCP leases for your device MAC address
# Or connect via serial console
```
3. **Factory reset** (last resort):
- Hold reset button for 10 seconds
- Device will reset to default configuration
### Problem: Mode Not Switching
**Symptoms**:
- `.last_mode` not updated
- Old configuration still active
- No changes after restart
**Diagnosis**:
```bash
# Check if netmode is enabled
uci get netmode.global.enabled
# Check logs
logread | grep netmode
# Check if mode exists
ls /etc/netmodes/*/scripts/
```
**Solutions**:
```bash
# Enable netmode if disabled
uci set netmode.global.enabled='1'
uci commit netmode
# Force mode change by removing last_mode
rm /etc/netmodes/.last_mode
service netmode restart
```
### Problem: PPPoE Authentication Failure
**Symptoms**:
- WAN interface shows "connecting" but never connects
- Logs show authentication errors
**Diagnosis**:
```bash
# Check PPPoE logs
logread | grep ppp
# Common errors:
# - "authentication failed"
# - "LCP timeout"
# - "CHAP authentication failed"
```
**Solutions**:
```bash
# Verify credentials (double-check with ISP)
uci show network.wan.username
uci show network.wan.password
# Some ISPs require VLAN tagging
uci set netmode.@supported_args[4].value='7' # or ISP-specific VLAN
uci commit netmode
service netmode restart
# Check if service name is required (rare)
uci set network.wan.service='ISP-SERVICE-NAME'
uci commit network
```
### Problem: Slow Internet After Mode Switch
**Symptoms**:
- Internet works but very slow
- High latency
**Solutions**:
1. **Check MTU settings** (especially for PPPoE):
```bash
# Set MTU for PPPoE
uci set netmode.@supported_args[5].value='1492'
uci commit netmode
service netmode restart
```
2. **Check for DNS issues**:
```bash
# Test DNS resolution speed
time nslookup google.com
# Use faster DNS
uci set netmode.@supported_args[X].value='1.1.1.1,1.0.0.1'
uci commit netmode
service netmode restart
```
3. **Check WAN speed**:
```bash
# Install iperf3 and test
opkg update
opkg install iperf3
```
---
## FAQ
### General Questions
**Q: Will I lose my configuration when switching modes?**
A: Netmode preserves most router settings (WiFi, firewall rules, etc.), but WAN-specific settings are reconfigured. Local network settings remain unchanged.
**Q: How long does a mode switch take?**
A: The mode switch itself takes a few seconds, but the device will reboot, which takes 1-2 minutes total.
**Q: Can I switch modes remotely?**
A: Yes, via SSH or TR-069/USP if configured. However, be careful with bridge mode as you may lose connectivity.
**Q: Do I need to reboot manually?**
A: No, the system automatically reboots after applying a new mode.
**Q: Can I schedule a mode switch?**
A: Yes, using cron:
```bash
# Switch to bridged mode at 2 AM
echo "0 2 * * * uci set netmode.global.mode='bridged' && uci commit && service netmode restart" | crontab -
```
### Mode-Specific Questions
**Q: Which mode should I use?**
A: Depends on your ISP:
- Cable/Fiber without login: **routed-dhcp**
- DSL with username/password: **routed-pppoe**
- Static IP business connection: **routed-static**
- Using as bridge only: **bridged**
**Q: Can I use PPPoE with VLAN?**
A: Yes, set both the mode and VLAN ID:
```bash
uci set netmode.global.mode='routed-pppoe'
uci set netmode.@supported_args[4].value='100'
```
**Q: What's the difference between routed and bridged mode?**
A:
- **Routed modes**: Router performs NAT, runs firewall, provides DHCP to local network
- **Bridged mode**: Router acts as transparent bridge, no NAT, no firewall, no DHCP
**Q: Can I customize the LAN IP in routed modes?**
A: Yes, but not through netmode. After mode switch, manually configure:
```bash
uci set network.lan.ipaddr='192.168.2.1'
uci commit network
/etc/init.d/network restart
```
### Technical Questions
**Q: Where are my credentials stored?**
A: In `/etc/config/netmode` (UCI configuration). They are cleared from memory after mode application for security.
**Q: Can I create custom modes?**
A: Yes, advanced users can create custom modes. See the IMPLEMENTATION_GUIDE.md and DEVELOPER_GUIDE.md.
**Q: Does netmode support IPv6?**
A: Yes, routed-dhcp and routed-pppoe modes support IPv6 (DHCPv6).
**Q: What happens to firewall rules?**
A: Firewall is enabled for routed modes and disabled for bridged mode. Custom rules are preserved.
**Q: Can I use multiple WAN connections?**
A: Netmode manages the primary WAN. For multi-WAN setups, configure secondary WANs manually after netmode configuration.
---
## Glossary
**Bridge Mode**: Operating mode where the router acts as a transparent network bridge without routing or NAT.
**DHCP (Dynamic Host Configuration Protocol)**: Automatic IP address assignment protocol.
**DMZ (Demilitarized Zone)**: Network segment that sits between internal network and external network.
**DNS (Domain Name System)**: Service that translates domain names to IP addresses.
**Gateway**: Router IP address that connects local network to the internet.
**ISP (Internet Service Provider)**: Company providing internet access.
**LAN (Local Area Network)**: Internal network (devices in your home/office).
**MTU (Maximum Transmission Unit)**: Largest packet size that can be transmitted. PPPoE typically uses 1492.
**NAT (Network Address Translation)**: Technology allowing multiple devices to share one public IP address.
**PPPoE (Point-to-Point Protocol over Ethernet)**: Authentication protocol commonly used for DSL connections.
**Static IP**: Fixed IP address that doesn't change (opposite of DHCP).
**Subnet Mask**: Defines the network portion of an IP address (e.g., 255.255.255.0).
**TR-069/CWMP**: Remote management protocol for network devices.
**UCI (Unified Configuration Interface)**: OpenWrt configuration system.
**USP (User Services Platform)**: Next-generation device management protocol.
**VLAN (Virtual LAN)**: Network segmentation using VLAN tags (802.1Q).
**WAN (Wide Area Network)**: External network connection (internet).
---
## Getting Help
### Log Collection
When reporting issues, collect these logs:
```bash
# System logs
logread > /tmp/system.log
# Network configuration
uci export network > /tmp/network.conf
uci export netmode > /tmp/netmode.conf
# Interface status
ifconfig > /tmp/interfaces.txt
ip route > /tmp/routes.txt
# Copy to external system
scp /tmp/*.{log,conf,txt} user@external-host:/path/
```
### Support Resources
- **Documentation**: Check IMPLEMENTATION_GUIDE.md and DEVELOPER_GUIDE.md
- **Community Forums**: OpenWrt and iopsys community forums
- **Issue Tracker**: Report bugs to iopsys development team
- **ISP Support**: Contact ISP for connection-specific parameters (VLAN, credentials, etc.)
### Before Contacting Support
Please have ready:
1. Current mode: `cat /etc/netmodes/.last_mode`
2. Netmode version: `opkg info netmode | grep Version`
3. Error logs: `logread | grep netmode`
4. Network configuration: `uci export netmode`
5. What you're trying to achieve
6. What you've already tried
---
## Quick Reference Card
### Common Commands
```bash
# View current mode
cat /etc/netmodes/.last_mode
# List available modes
uci show netmode | grep "supported_modes.*name"
# Switch to DHCP
uci set netmode.global.mode='routed-dhcp'
uci commit netmode && service netmode restart
# Switch to PPPoE
uci set netmode.global.mode='routed-pppoe'
uci set netmode.@supported_args[2].value='username'
uci set netmode.@supported_args[3].value='password'
uci commit netmode && service netmode restart
# Switch to Bridge
uci set netmode.global.mode='bridged'
uci commit netmode && service netmode restart
# View logs
logread | grep netmode
# Reset to last mode
rm /etc/netmodes/.last_mode
service netmode restart
```
### Emergency Recovery
```bash
# If locked out after bridge mode
# Connect via serial console and run:
uci set netmode.global.mode='routed-dhcp'
uci commit netmode
service netmode restart
# Factory reset (hold reset button 10 seconds)
# Or via console:
firstboot -y && reboot
```
---
**Document Version**: 1.0
**Package Version**: 1.1.11
**Last Updated**: 2024
**License**: GPL-2.0-only

View File

@@ -0,0 +1,294 @@
# Advanced Mode - Validation and Error Handling
## Overview
The advanced mode includes comprehensive input validation and error handling to ensure configuration correctness and provide helpful error messages when issues occur.
## Validation Functions
### 1. VLAN ID Validation
**Function**: `validate_vlan_id()`
**Validates**:
- VLAN ID is a number
- VLAN ID is in valid range (1-4094)
**Example Error**:
```
ERROR: VLAN ID in type 'bridge:tagged:5000' out of range (must be 1-4094): 5000
```
### 2. MAC Address Validation
**Function**: `validate_mac_address()`
**Validates**:
- MAC address format (XX:XX:XX:XX:XX:XX)
- MAC address macros (BaseMACAddress, BaseMACAddressPNN)
- Hexadecimal characters only
**Example Errors**:
```
ERROR: Invalid MAC address format: 'ZZ:BB:CC:DD:EE:FF' (expected XX:XX:XX:XX:XX:XX)
ERROR: Invalid MAC macro format: 'BaseMACAddressP' (expected BaseMACAddressPNN)
```
### 3. Interface Name Validation
**Function**: `validate_interface_name()`
**Validates**:
- Interface name is not empty
- Only alphanumeric characters and underscore allowed
- Reserved names not used (loopback, lo, globals)
**Example Errors**:
```
ERROR: Interface name 'wan-interface' invalid (only alphanumeric and underscore allowed)
ERROR: Interface name 'loopback' is reserved
```
### 4. Port Specification Validation
**Function**: `validate_port_spec()`
**Validates**:
- Port specification is not empty
- Valid port identifiers (LAN1-8, WAN, or interface names)
- Format is correct (dash-separated)
**Example Error**:
```
ERROR: Invalid port identifier in 'LAN1-LAN9-WAN': 'LAN9'
```
### 5. Interface Type Validation
**Function**: `validate_interface_type()`
**Validates**:
- Interface type syntax is correct
- VLAN IDs in types are valid
- MAC addresses in types are valid
- Type is recognized
**Example Errors**:
```
ERROR: Unknown interface type: 'bridge:unknown:100'
Valid types: bridge:transparent, bridge:tagged:VID, brvlan:wan-tagged:VID, route:vlan:VID, route:macvlan:MAC, direct:VID
ERROR: VLAN ID in type 'route:vlan:9999' out of range (must be 1-4094): 9999
```
## Configuration Validation
### Parameter Count Matching
The system validates that all configuration parameters have matching element counts:
```bash
# This is VALID (3 interfaces, 3 types, 3 port lists)
interface_names='wan,iptv,voip'
interface_types='route:vlan:100,route:vlan:200,route:vlan:300'
ports='WAN,WAN,WAN'
# This is INVALID (3 interfaces but only 2 types)
interface_names='wan,iptv,voip'
interface_types='route:vlan:100,route:vlan:200' # ERROR!
ports='WAN,WAN,WAN'
```
**Error Message**:
```
ERROR: Number of interface names (3) does not match number of interface types (2)
interface_names: wan,iptv,voip
interface_types: route:vlan:100,route:vlan:200
```
### MAC Address Count Warning
If MAC addresses are provided but don't match interface count, a warning is issued:
```
WARNING: Number of MAC addresses (2) does not match number of interfaces (3)
Some interfaces will use default MAC addresses
```
## Error Handling
### MAC Address Operations
#### Base MAC Not Found
```
WARNING: Base MAC address not found or invalid, using default
```
#### MAC Increment Overflow
```
WARNING: MAC address overflow after increment, wrapping around
```
#### Invalid Increment Value
```
ERROR: MAC increment must be a number: 'ABC'
```
### Port Resolution
#### WAN Port Not Found
```
ERROR: WAN port not found in board.json or UCI
```
### Validation Failure Behavior
When validation fails:
1. **Error is logged** to syslog with severity `user.err`
2. **Configuration is aborted** - no changes are applied
3. **Exit code 1** is returned
4. **Helpful error message** indicates what went wrong
## Debugging Validation Issues
### View Validation Logs
```bash
# Check recent netmode logs
logread | grep netmode-advanced
# Filter for errors only
logread | grep -E "netmode-advanced.*ERROR"
# Watch logs in real-time
logread -f | grep netmode-advanced
```
### Common Validation Errors
#### 1. Mismatched Parameter Counts
**Problem**:
```bash
uci set netmode.mode_4_supprted_args_1.value='wan,iptv'
uci set netmode.mode_4_supprted_args_2.value='bridge:transparent' # Only 1!
uci set netmode.mode_4_supprted_args_3.value='ALL,LAN1-LAN2-WAN'
```
**Solution**: Ensure all parameters have same number of comma-separated values:
```bash
uci set netmode.mode_4_supprted_args_2.value='bridge:transparent,brvlan:wan-tagged:100'
```
#### 2. Invalid VLAN ID
**Problem**:
```bash
uci set netmode.mode_4_supprted_args_2.value='bridge:tagged:5000' # > 4094
```
**Solution**: Use valid VLAN ID (1-4094):
```bash
uci set netmode.mode_4_supprted_args_2.value='bridge:tagged:100'
```
#### 3. Invalid MAC Address Format
**Problem**:
```bash
uci set netmode.mode_4_supprted_args_4.value='AA-BB-CC-DD-EE-FF' # Wrong separator
```
**Solution**: Use colon separator:
```bash
uci set netmode.mode_4_supprted_args_4.value='AA:BB:CC:DD:EE:FF'
```
#### 4. Invalid Interface Name
**Problem**:
```bash
uci set netmode.mode_4_supprted_args_1.value='wan-interface' # Dash not allowed
```
**Solution**: Use underscore instead:
```bash
uci set netmode.mode_4_supprted_args_1.value='wan_interface'
```
#### 5. Invalid Port Specification
**Problem**:
```bash
uci set netmode.mode_4_supprted_args_3.value='LAN1,LAN2' # Wrong separator
```
**Solution**: Use dash separator:
```bash
uci set netmode.mode_4_supprted_args_3.value='LAN1-LAN2'
```
## Testing Validation
### Test Invalid VLAN ID
```bash
uci set netmode.mode_4_supprted_args_1.value='test'
uci set netmode.mode_4_supprted_args_2.value='bridge:tagged:9999'
uci set netmode.mode_4_supprted_args_3.value='ALL'
uci commit netmode && service netmode restart
# Check logs
logread | tail -20 | grep netmode-advanced
# Should show: ERROR: VLAN ID in type 'bridge:tagged:9999' out of range (must be 1-4094): 9999
```
### Test Mismatched Counts
```bash
uci set netmode.mode_4_supprted_args_1.value='wan,iptv,voip'
uci set netmode.mode_4_supprted_args_2.value='route:vlan:100,route:vlan:200' # Only 2!
uci set netmode.mode_4_supprted_args_3.value='WAN,WAN,WAN'
uci commit netmode && service netmode restart
# Check logs
logread | tail -20 | grep netmode-advanced
# Should show: ERROR: Number of interface names (3) does not match number of interface types (2)
```
### Test Invalid MAC Address
```bash
uci set netmode.mode_4_supprted_args_4.value='INVALID-MAC'
uci commit netmode && service netmode restart
# Check logs
logread | tail -20 | grep netmode-advanced
# Should show: ERROR: Invalid MAC address format: 'INVALID-MAC' (expected XX:XX:XX:XX:XX:XX)
```
## Best Practices
1. **Always check logs** after configuration changes
2. **Test configurations** in a development environment first
3. **Use validation** to catch errors early
4. **Read error messages** - they indicate exactly what's wrong
5. **Keep backup** of working configuration
## Exit Codes
| Exit Code | Meaning |
|-----------|---------|
| 0 | Success - configuration applied |
| 1 | Failure - validation error or configuration error |
## Integration with Management Systems
When using TR-181 or other management systems:
1. **Check exit code** of netmode service
2. **Parse error logs** to provide user feedback
3. **Validate before applying** using the same validation rules
4. **Provide helpful error messages** to end users
---
**Document Version**: 1.0
**Last Updated**: 2025-12-13

View File

@@ -58,7 +58,7 @@
"name": "mode"
}
},
"linker_obj": "Device.{BBF_VENDOR_PREFIX}NetMode.SupportedModes.[Name==@key]."
"linker_obj": "Device.{BBF_VENDOR_PREFIX}NetMode.SupportedModes.*.Name"
}
]
},

View File

@@ -87,55 +87,84 @@ configure_env_vars() {
config_foreach _set_env_args supported_args
}
cleanup_arg_values() {
local dm_parent
config_get dm_parent ${1} dm_parent ""
if [ "${dm_parent}" = "${SUPP_MODES_SEC}" ]; then
uci -q set netmode.${1}.value=""
fi
}
cleanup_env_vars() {
for e in $(env); do
if echo ${e} |grep -q "^NETMODE_"; then
unset ${e}
fi
done
if [ -n "${SUPP_MODES_SEC}" ]; then
config_load "netmode"
config_foreach cleanup_arg_values supported_args
uci commit netmode
fi
}
start_service() {
[ -f /etc/config/netmode ] || return
config_load netmode
config_get_bool enabled global enabled '0'
[ $enabled -eq 0 ] && return
[ -d $MODEDIR ] || mkdir -p $MODEDIR
# Get the desired netmode from config
config_get mode global mode ""
# Check if netmode is set as boot environment parameter
[ -n "$mode" ] || mode="$(fw_printenv -n netmode 2>/dev/null)"
# Return if mode is not set
[ -n "$mode" ] || return
# Get the last saved mode
lastmode="$(cat $MODEDIR/.last_mode 2>/dev/null)"
# Return if desired mode is same as last saved mode
if [ "$mode" = "$lastmode" ]; then
_log "Not switching mode[${mode}], lastmode[${lastmode}]"
if [ ! -f /etc/config/netmode ]; then
_log "/etc/config/netmode not found, returning"
return
fi
_log "Switching to [${mode}] Mode"
config_load netmode
config_get_bool enabled global enabled '0'
# Configure env variables
if [ "$enabled" -eq 0 ]; then
_log "netmode service disabled, returning"
return
fi
[ -d $MODEDIR ] || mkdir -p $MODEDIR
# Get the desired netmode from config
config_get mode global mode ""
# Check if netmode is set as boot environment parameter
if [ -z "$mode" ]; then
_log "mode not set in UCI, checking bootenv"
mode="$(fw_printenv -n netmode 2>/dev/null)"
fi
# Return if mode is not set
if [ -z "$mode" ]; then
_log "mode still empty, returning"
return
fi
# Build configuration signature from UCI values directly
# This ensures parameter changes trigger reconfiguration
SUPP_MODES_SEC=""
config_foreach _get_modes_sec_name supported_modes "${mode}"
local config_signature="${mode}"
if [ -n "${SUPP_MODES_SEC}" ]; then
# Get all arguments for this mode, sorted by section name for consistency
for arg_sec in $(uci show netmode | grep "=supported_args" | cut -d'.' -f2 | cut -d'=' -f1 | sort); do
local dm_parent=$(uci -q get "netmode.${arg_sec}.dm_parent")
if [ "${dm_parent}" = "${SUPP_MODES_SEC}" ]; then
local arg_name=$(uci -q get "netmode.${arg_sec}.name")
local arg_value=$(uci -q get "netmode.${arg_sec}.value")
if [ -n "${arg_name}" -a -n "${arg_value}" ]; then
config_signature="${config_signature}:${arg_name}=${arg_value}"
fi
fi
done
else
_log "Could not find supported mode section"
fi
# Get the last saved configuration signature
local last_config_signature="$(cat $MODEDIR/.last_mode 2>/dev/null)"
# Return if configuration hasn't changed
if [ "${config_signature}" = "${last_config_signature}" ]; then
_log "Not reconfiguring, configuration unchanged"
return
fi
_log "Configuration changed, applying [${mode}] mode"
if [ -n "${last_config_signature}" ]; then
_log "Previous config: ${last_config_signature}"
fi
_log "Current config: ${config_signature}"
# Configure env variables (needed by mode scripts)
configure_env_vars ${mode}
# Execute netmode generic pre-mode-switch scripts
libnetmode_exec "pre"
@@ -150,19 +179,32 @@ start_service() {
libnetmode_exec
# Execute mode specific scripts
local script_exit_code=0
if [ -d $MODEDIR/$mode/scripts ]; then
for script in $(ls $MODEDIR/$mode/scripts/); do
_log "Executing [${mode}], script [${script}]"
sh $MODEDIR/$mode/scripts/$script
script_exit_code=$?
if [ $script_exit_code -ne 0 ]; then
_log "ERROR: Mode script [${script}] failed with exit code ${script_exit_code}"
break
fi
done
fi
# Save mode as last mode
echo "$mode" > $MODEDIR/.last_mode
_log "Switching to Mode [${mode}] done, last mode updated"
# Only save configuration if scripts succeeded
if [ $script_exit_code -eq 0 ]; then
# Save configuration signature as last mode
echo "$config_signature" > $MODEDIR/.last_mode
_log "Switching to Mode [${mode}] done, configuration saved"
# Execute netmode generic post-mode-switch scripts
libnetmode_exec "post"
else
_log "ERROR: Mode switch to [${mode}] FAILED - configuration NOT saved"
_log "The system will retry on next netmode restart"
fi
# Execute netmode generic post-mode-switch scripts
libnetmode_exec "post"
cleanup_env_vars "${mode}"
}

View File

@@ -0,0 +1,577 @@
#!/bin/sh
#
# Advanced Mode Script
# Unified configuration for bridges, routed interfaces, and standalone interfaces
# Replaces: bridged mode and routed-multi-service mode
#
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/netmode/advanced_helper.sh
[ -f /etc/device_info ] && source "/etc/device_info"
_log() {
logger -s -p user.info -t "netmode-advanced" "$*"
}
IPTV_IFACES=""
MGMT_IFACES=""
INET_IFACES=""
IPTV_DEVS=""
WAN_PORT=""
MACVLAN_PRESENT=0
BRIDGE_VLAN_PRESENT=0
#
# Main Interface Configuration
#
configure_interfaces() {
_log "Starting advanced interface configuration"
# Get configuration from environment variables
local interface_names="${NETMODE_interface_names:-wan}"
local interface_types="${NETMODE_interface_types:-bridge:transparent}"
local ports="${NETMODE_ports:-ALL}"
local mac_addrs="${NETMODE_macaddrs:-}"
_log "Interface names: $interface_names"
_log "Interface types: $interface_types"
_log "Ports: $ports"
_log "MAC addresses: $mac_addrs"
# Validate configuration before proceeding
_log "Validating configuration..."
# Count elements in each parameter
local name_count=$(echo "$interface_names" | tr ',' '\n' | wc -l)
local type_count=$(echo "$interface_types" | tr ',' '\n' | wc -l)
local port_count=$(echo "$ports" | tr ',' '\n' | wc -l)
local mac_count=0
[ -n "$mac_addrs" ] && mac_count=$(echo "$mac_addrs" | tr ',' '\n' | wc -l)
_log "Element counts: names=$name_count, types=$type_count, ports=$port_count, macs=$mac_count"
# Validate counts match
if [ "$name_count" != "$type_count" ]; then
_log "ERROR: Number of interface names ($name_count) does not match number of interface types ($type_count)"
_log "interface_names: $interface_names"
_log "interface_types: $interface_types"
return 1
fi
if [ "$name_count" != "$port_count" ]; then
_log "ERROR: Number of interface names ($name_count) does not match number of ports ($port_count)"
_log "interface_names: $interface_names"
_log "ports: $ports"
return 1
fi
if [ "$mac_count" -gt 0 -a "$mac_count" != "$name_count" ]; then
_log "WARNING: Number of MAC addresses ($mac_count) does not match number of interfaces ($name_count)"
_log "Some interfaces will use default MAC addresses"
fi
# Validate each parameter
local idx=1
local OLD_IFS="$IFS"
IFS=','
for name in $interface_names; do
validate_interface_name "$name" || {
IFS="$OLD_IFS"
return 1
}
done
for type in $interface_types; do
validate_interface_type "$type" || {
IFS="$OLD_IFS"
return 1
}
done
for port_spec in $ports; do
validate_port_spec "$port_spec" || {
IFS="$OLD_IFS"
return 1
}
done
if [ -n "$mac_addrs" ]; then
for mac in $mac_addrs; do
validate_mac_address "$mac" "1" || {
IFS="$OLD_IFS"
return 1
}
done
fi
IFS="$OLD_IFS"
_log "Configuration validation passed"
# Clean up existing configuration
cleanup_interfaces
# Split comma-separated values into arrays
local names_arr=""
local types_arr=""
local ports_arr=""
local macs_arr=""
# Save and set IFS for comma splitting
local OLD_IFS="$IFS"
IFS=','
for name in $interface_names; do
names_arr="$names_arr $name"
done
for type in $interface_types; do
types_arr="$types_arr $type"
done
for port_spec in $ports; do
ports_arr="$ports_arr $port_spec"
done
for mac in $mac_addrs; do
macs_arr="$macs_arr $mac"
done
# Restore IFS
IFS="$OLD_IFS"
# Convert to arrays for indexing
set -- $names_arr
local total_interfaces=$#
_log "Total interfaces to create: $total_interfaces"
# Get WAN port for routed interfaces
local wan_port=$(get_wan_port)
WAN_PORT="$wan_port"
_log "WAN port: $WAN_PORT"
# Create each interface
local idx=1
for if_name in $names_arr; do
# Get corresponding type, ports, and MAC address
local type_idx=$idx
local ports_idx=$idx
local mac_idx=$idx
set -- $types_arr
shift $((type_idx - 1))
local if_type="${1:-bridge:transparent}"
set -- $ports_arr
shift $((ports_idx - 1))
local port_list="${1:-ALL}"
set -- $macs_arr
shift $((mac_idx - 1))
local if_mac="${1:-}"
_log "Creating interface $idx/$total_interfaces: name=$if_name, type=$if_type, ports=$port_list, mac=$if_mac"
# Parse interface type
parse_interface_type "$if_type"
local mode="$PARSE_MODE"
local vlan_type="$PARSE_VLAN_TYPE"
local cvid="$PARSE_CVID"
local svid="$PARSE_SVID"
local mac_addr="$PARSE_MAC_ADDR"
local proto="$PARSE_PROTO"
local disabled="$PARSE_DISABLED"
local purpose="$PARSE_PURPOSE"
if [ "$purpose" = "iptv" ]; then
IPTV_IFACES="$IPTV_IFACES $if_name"
elif [ "$purpose" = "inet" ]; then
INET_IFACES="$INET_IFACES $if_name"
elif [ "$purpose" = "mgmt" ]; then
MGMT_IFACES="$MGMT_IFACES $if_name"
fi
if [ "$vlan_type" = "macvlan" ] && [ "$mac_count" -gt 0 ]; then
MACVLAN_PRESENT=1
fi
_log "Parsed: mode=$mode, vlan_type=$vlan_type, cvid=$cvid, svid=$svid, mac=$mac_addr, proto=$proto, purpose=$purpose"
case "$mode" in
bridge)
# Create bridge using helper function
create_bridge "$if_name" "$if_type" "$port_list" "$if_mac"
;;
brvlan)
# Create bridge with VLAN filtering
BRIDGE_VLAN_PRESENT=1
create_bridge_vlan_filtering "$if_name" "$if_type" "$port_list" "$if_mac"
;;
device-ref)
# Create interface that references device from another interface
# cvid contains the reference interface name
local ref_if_name="$cvid"
local ref_device=$(uci -q get "network.${ref_if_name}.device")
if [ -z "$ref_device" ]; then
_log "ERROR: Reference interface '$ref_if_name' not found or has no device"
exit 1
fi
_log "Creating interface $if_name referencing device $ref_device from interface $ref_if_name"
# Create interface using the same device as reference interface
uci -q delete "network.${if_name}"
uci -q set "network.${if_name}=interface"
uci -q set "network.${if_name}.proto=${proto}"
uci -q set "network.${if_name}.device=${ref_device}"
# Set MAC address if provided
if [ -n "$if_mac" ]; then
local resolved_mac=$(resolve_mac_address "$if_mac")
uci -q set "network.${if_name}.macaddr=${resolved_mac}"
_log "Setting MAC address: $if_mac -> $resolved_mac"
fi
[ "$disabled" = "1" ] && uci -q set "network.${if_name}.disabled=1"
;;
route)
# Create routed interface
port_list="${port_list//:u/}"
local base_device=""
if [ "$port_list" = "WAN" -o "$port_list" = "wan" ]; then
base_device="$wan_port"
else
# Use first port from list
local actual_ports=$(parse_port_list "$port_list")
base_device=$(echo "$actual_ports" | awk '{print $1}')
fi
create_routed_interface "$if_name" "$vlan_type" "$cvid" "$mac_addr" "$proto" "$base_device" "$disabled" "$purpose"
;;
direct)
# Create standalone VLAN interface
port_list="${port_list//:u/}"
local base_device=""
if [ "$port_list" = "WAN" -o "$port_list" = "wan" ]; then
base_device="$wan_port"
else
local actual_ports=$(parse_port_list "$port_list")
base_device=$(echo "$actual_ports" | awk '{print $1}')
fi
create_standalone_interface "$if_name" "$cvid" "$proto" "$base_device" "$disabled" "$if_mac"
;;
esac
idx=$((idx + 1))
done
if [ "$BRIDGE_VLAN_PRESENT" -eq 1 ]; then
# create the shared bridge once with all collected ports from bridge-vlan interfaces
create_shared_bridge
fi
# Commit network changes
uci -q commit network
IPTV_IFACES="$(echo "$IPTV_IFACES" | xargs)"
INET_IFACES="$(echo "$INET_IFACES" | xargs)"
MGMT_IFACES="$(echo "$MGMT_IFACES" | xargs)"
_log "Interface configuration completed"
}
#
# Configure L3 Multicast (Proxy)
#
configure_l3_mcast() {
_log "Configuring L3 multicast (Proxy) for $IPTV_DEVS"
# Remove proxy sections
uci -q delete mcast.igmp_proxy_1
uci -q delete mcast.mc_proxy_MLD
uci -q delete mcast.igmp_snooping_1
uci -q delete mcast.mld_snooping_1
IPTV_DEVS="$(echo "$IPTV_DEVS" | xargs | tr ' ' '\n' | sort -u)"
uci add mcast proxy
uci rename mcast.@proxy[-1]="mc_proxy_MLD"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="mld"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $IPTV_DEVS; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
uci add mcast proxy
uci rename mcast.@proxy[-1]="igmp_proxy_1"
uci set mcast.@proxy[-1].enable="1"
uci set mcast.@proxy[-1].proto="igmp"
uci set mcast.@proxy[-1].version="2"
uci set mcast.@proxy[-1].robustness="2"
uci set mcast.@proxy[-1].query_interval="125"
uci set mcast.@proxy[-1].query_response_interval="100"
uci set mcast.@proxy[-1].last_member_query_interval="10"
uci set mcast.@proxy[-1].fast_leave="1"
uci set mcast.@proxy[-1].snooping_mode="2"
uci add_list mcast.@proxy[-1].downstream_interface="br-lan"
IFS=" "
for itf in $IPTV_DEVS; do
uci add_list mcast.@proxy[-1].upstream_interface="$itf"
done
uci add_list mcast.@proxy[-1].filter="239.0.0.0/8"
uci -q commit mcast
_log "L3 multicast configuration complete"
}
#
# Configure L2 Multicast (Snooping)
#
configure_l2_mcast() {
_log "Configuring L2 multicast (snooping)"
# Remove proxy sections
uci -q delete mcast.igmp_proxy_1
uci -q delete mcast.mc_proxy_MLD
# Get all bridge names from network UCI
local bridge_list=""
local bridge_names=""
local br_device=""
# Query all network sections and filter for bridge type
bridge_list=$(uci -q show network | grep "\.type='bridge'" | cut -d'.' -f2)
# Convert to space-separated list
for bridge in $bridge_list; do
br_device="$(uci -q get network.${bridge}.name)"
if [ -z "$bridge_names" ]; then
[ -n "$br_device" ] && bridge_names="$br_device"
else
[ -n "$br_device" ] && bridge_names="$bridge_names $br_device"
fi
done
if [ -z "$bridge_names" ]; then
_log "No bridges found for multicast configuration"
return
fi
_log "Found bridges: $bridge_names"
# Add IGMP snooping
uci -q set mcast.igmp_snooping_1=snooping
uci -q set mcast.igmp_snooping_1.enable='1'
uci -q set mcast.igmp_snooping_1.proto='igmp'
uci -q set mcast.igmp_snooping_1.version='2'
uci -q set mcast.igmp_snooping_1.robustness='2'
uci -q set mcast.igmp_snooping_1.query_interval='125'
uci -q set mcast.igmp_snooping_1.query_response_interval='100'
uci -q set mcast.igmp_snooping_1.last_member_query_interval='10'
uci -q set mcast.igmp_snooping_1.fast_leave='1'
uci -q set mcast.igmp_snooping_1.snooping_mode='2'
uci -q set mcast.igmp_snooping_1.interface="$bridge_names"
# to avoid multiple additions over the course of netmode reloads
uci -q del_list mcast.igmp_snooping_1.filter='239.0.0.0/8'
uci -q add_list mcast.igmp_snooping_1.filter='239.0.0.0/8'
# Add MLD snooping
uci -q set mcast.mld_snooping_1=snooping
uci -q set mcast.mld_snooping_1.enable='1'
uci -q set mcast.mld_snooping_1.proto='mld'
uci -q set mcast.mld_snooping_1.version='2'
uci -q set mcast.mld_snooping_1.robustness='2'
uci -q set mcast.mld_snooping_1.query_interval='125'
uci -q set mcast.mld_snooping_1.query_response_interval='100'
uci -q set mcast.mld_snooping_1.last_member_query_interval='10'
uci -q set mcast.mld_snooping_1.fast_leave='1'
uci -q set mcast.mld_snooping_1.snooping_mode='2'
uci -q set mcast.mld_snooping_1.interface="$bridge_names"
uci -q commit mcast
_log "L2 multicast configuration complete"
}
#
# Configure DHCP
#
configure_dhcp() {
_log "Configuring DHCP"
# Check if we have any static interfaces (will be configured by post-hook)
local interface_names="${NETMODE_interface_names:-wan}"
local interface_types="${NETMODE_interface_types:-bridge:transparent}"
local has_static_lan=0
local OLD_IFS="$IFS"
IFS=','
local idx=1
for if_name in $interface_names; do
# Get corresponding type
local type_idx=$idx
set -- $interface_types
shift $((type_idx - 1))
local if_type="${1:-bridge:transparent}"
# Check if this is lan interface with static proto
if [ "$if_name" = "lan" ] && echo "$if_type" | grep -q -- '-static$'; then
has_static_lan=1
break
fi
idx=$((idx + 1))
done
IFS="$OLD_IFS"
uci -q get network.lan && has_static_lan="1"
if [ "$has_static_lan" = "1" ]; then
_log "LAN interface with static IP detected - DHCP server will be configured by post-hook"
# Don't disable DHCP for LAN, it will be configured by 15-static_lan.sh
# Only disable DHCP on WAN
uci -q set dhcp.wan.ignore=1 2>/dev/null
/etc/init.d/odhcpd enable
else
# Disable DHCP server on LAN (advanced mode without static LAN)
uci -q set dhcp.lan.ignore=1
# Disable DHCP on WAN if it exists
uci -q set dhcp.wan.ignore=1 2>/dev/null
/etc/init.d/odhcpd disable
_log "DHCP server disabled"
fi
local dhcp_ifaces="$(collect_interfaces_with_wan_port)"
_log "Disabling DHCP server on interfaces: $dhcp_ifaces"
for iface in $dhcp_ifaces; do
uci -q set dhcp.$iface=dhcp
uci -q set dhcp.$iface.interface="$iface"
uci -q set dhcp.$iface.ignore=1
done
uci -q commit dhcp
}
#
# Configure Firewall
#
configure_firewall() {
_log "Configuring firewall"
# Check if any interface is routed
local interface_types="${NETMODE_interface_types:-bridge:transparent}"
local has_routed=0
local OLD_IFS="$IFS"
IFS=','
for if_type in $interface_types; do
if echo "$if_type" | grep -q "^route:"; then
has_routed=1
break
fi
done
IFS="$OLD_IFS"
if [ "$has_routed" = "1" ]; then
# Enable firewall for routed interfaces
ensure_firewall_layout
fi
uci -q set firewall.globals.enabled="1"
uci -q commit firewall
_log "Firewall enabled"
}
#
# Update Service Dependencies
#
configure_services() {
_log "Updating service configurations"
# Get first interface name for services
local interface_names="${NETMODE_interface_names:-wan}"
local IFS=','
local first_interface=""
for if_name in $interface_names; do
first_interface="$if_name"
break
done
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="$first_interface"
uci -q commit cwmp
# Update gateway WAN Interface
uci -q set gateway.global.wan_interface="$first_interface"
uci -q commit gateway
# Disable SSDPD
uci -q set ssdpd.ssdp.enabled="0"
uci -q commit ssdpd
_log "Service configurations updated"
}
#
# Main Execution
#
_log "========================================="
_log "Starting Advanced Mode Configuration"
_log "========================================="
# Main execution with error handling
if ! configure_interfaces; then
_log "========================================="
_log "ERROR: Advanced Mode Configuration Failed"
_log "Please check the logs above for details"
_log "========================================="
exit 1
fi
if [ "$MACVLAN_PRESENT" -eq 1 ] || echo "$NETMODE_interface_types" | grep -q "BaseMACAddress"; then
_log "Macvlan interface with mac addr present, not generating default macoffset file"
else
_log "Macvlan interface with mac addr not present, generating default macoffset file"
configure_macoffset
fi
if [ -n "$IPTV_DEVS" ]; then
configure_l3_mcast
else
configure_l2_mcast
fi
configure_dhcp
configure_firewall
configure_services
_log "========================================="
_log "Advanced Mode Configuration Complete"
_log "========================================="
exit 0

View File

@@ -1,118 +0,0 @@
#!/bin/sh
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
source "/etc/device_info"
l2_mcast_config() {
# configure L2 mcast config for snooping
logger -s -p user.info -t "netmode" "Generating L2 mcast configuration"
# remove proxy sections
uci -q delete mcast.igmp_proxy_1
uci -q delete mcast.mc_proxy_MLD
# add igmp_snooping section
uci -q set mcast.igmp_snooping_1=snooping
uci -q set mcast.igmp_snooping_1.enable='1'
uci -q set mcast.igmp_snooping_1.proto='igmp'
uci -q set mcast.igmp_snooping_1.version='2'
uci -q set mcast.igmp_snooping_1.robustness='2'
uci -q set mcast.igmp_snooping_1.query_interval='125'
uci -q set mcast.igmp_snooping_1.query_response_interval='100'
uci -q set mcast.igmp_snooping_1.last_member_query_interval='10'
uci -q set mcast.igmp_snooping_1.fast_leave='1'
uci -q set mcast.igmp_snooping_1.snooping_mode='2'
uci -q set mcast.igmp_snooping_1.interface='br-lan'
uci -q add_list mcast.igmp_snooping_1.filter='239.0.0.0/8'
# add mld_snooping section
uci -q set mcast.mld_snooping_1=snooping
uci -q set mcast.mld_snooping_1.enable='1'
uci -q set mcast.mld_snooping_1.proto='mld'
uci -q set mcast.mld_snooping_1.version='2'
uci -q set mcast.mld_snooping_1.robustness='2'
uci -q set mcast.mld_snooping_1.query_interval='125'
uci -q set mcast.mld_snooping_1.query_response_interval='100'
uci -q set mcast.mld_snooping_1.last_member_query_interval='10'
uci -q set mcast.mld_snooping_1.fast_leave='1'
uci -q set mcast.mld_snooping_1.snooping_mode='2'
uci -q set mcast.mld_snooping_1.interface='br-lan'
uci -q commit mcast
}
l2_network_config() {
logger -s -p user.info -t "netmode" "Generating L2 network configuration"
# Configure L2 Network Mode
uci -q set network.lan=interface
uci -q set network.lan.proto='dhcp'
uci -q set network.lan.vendorid="$(uci -q get network.wan.vendorid)"
uci -q set network.lan.clientid="$(uci -q get network.wan.clientid)"
uci -q set network.lan.reqopts="$(uci -q get network.wan.reqopts)"
uci -q set network.lan.sendopts="$(uci -q get network.wan.sendopts)"
uci -q set network.lan.device='br-lan'
uci -q set network.lan.force_link='1'
uci -q set network.lan6=interface
uci -q set network.lan6.proto='dhcpv6'
uci -q set network.lan6.device='@lan'
uci -q set network.lan6.reqprefix='no'
uci -q delete network.wan
uci -q delete network.wan6
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_select wan 2>/dev/null
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
json_cleanup
fi
uci -q commit network
# Disable DHCP Server
uci -q set dhcp.lan.ignore=1
uci -q commit dhcp
/etc/init.d/odhcpd disable
# Disable SSDPD
uci -q set ssdpd.ssdp.enabled="0"
uci -q commit ssdpd
# Update CWMP Agent WAN Interface
uci -q set cwmp.cpe.default_wan_interface="lan"
uci -q commit cwmp
# Update gateway WAN Interface
uci -q set gateway.global.wan_interface="lan"
uci -q commit gateway
# disable firewall
uci -q set firewall.globals.enabled="0"
uci -q commit firewall
}
l2_network_config
l2_mcast_config

View File

@@ -2,6 +2,7 @@
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/netmode/advanced_helper.sh
source "/etc/device_info"
@@ -15,8 +16,12 @@ l3_mcast_config() {
}
l3_network_config() {
cleanup_interfaces
logger -s -p user.info -t "netmode" "Generating L3 network configuration"
configure_macoffset
wandev="$(uci -q get network.WAN.ifname)"
# Configure L3 Network Mode
@@ -76,28 +81,7 @@ l3_network_config() {
done
fi
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_cleanup
fi
create_br_lan_bridge_device
uci -q commit network

View File

@@ -2,6 +2,7 @@
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/netmode/advanced_helper.sh
source "/etc/device_info"
@@ -15,8 +16,12 @@ l3_mcast_config() {
}
l3_network_pppoe_config() {
cleanup_interfaces
logger -s -p user.info -t "netmode" "Generating L3 network configuration"
configure_macoffset
wandev="$(uci -q get network.WAN.ifname)"
# Configure L3 Network Mode
@@ -73,28 +78,7 @@ l3_network_pppoe_config() {
done
fi
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_cleanup
fi
create_br_lan_bridge_device
uci -q commit network

View File

@@ -2,6 +2,7 @@
. /lib/functions.sh
. /usr/share/libubox/jshn.sh
. /lib/netmode/advanced_helper.sh
source "/etc/device_info"
@@ -15,8 +16,12 @@ l3_mcast_config() {
}
l3_network_config() {
cleanup_interfaces
logger -s -p user.info -t "netmode" "Generating L3 network configuration"
configure_macoffset
wandev="$(uci -q get network.WAN.ifname)"
# Configure L3 Network Mode
@@ -74,28 +79,7 @@ l3_network_config() {
done
fi
uci -q delete network.br_lan.ports
uci -q set network.br_lan.bridge_empty='1'
add_port_to_br_lan() {
port="$1"
[ -n "$port" -a -d /sys/class/net/$port ] || continue
uci add_list network.br_lan.ports="$port"
}
if [ -f /etc/board.json ]; then
json_load_file /etc/board.json
json_select network
json_select lan
if json_is_a ports array; then
json_for_each_item add_port_to_br_lan ports
else
json_get_var device device
[ -n "$device" ] && uci add_list network.br_lan.ports="$device"
fi
json_select ..
json_cleanup
fi
create_br_lan_bridge_device
uci -q commit network

View File

@@ -95,6 +95,40 @@
"type": "string"
}
]
},
{
"name": "advanced",
"description": "Advanced Mode - Unified configuration for bridges, routed interfaces, and standalone VLANs",
"supported_args": [
{
"name": "interface_names",
"description": "Interface names (comma-separated, e.g., wan,iptv,mgmt,lan100)",
"required": false,
"type": "string",
"#value": "wan"
},
{
"name": "interface_types",
"description": "Interface types (comma-separated). Bridge: bridge:transparent, bridge:tagged:VID, bridge:wan-tagged:VID, bridge:qinq:C:S. Routed: route:vlan:VID, route:macvlan:MAC, route:vlan:VID:MAC. Standalone: direct:VID. Modifiers: -n (proto none), -d (disabled)",
"required": false,
"type": "string",
"#value": "bridge:transparent"
},
{
"name": "ports",
"description": "Port lists for each interface (comma-separated, use '-' to separate ports, e.g., ALL, ALL_LAN, LAN1-LAN2-WAN, WAN)",
"required": false,
"type": "string",
"#value": "ALL"
},
{
"name": "macaddrs",
"description": "MAC addresses for each interface (comma-separated). Use explicit MAC (AA:BB:CC:DD:EE:FF) or macros: BaseMACAddress, BaseMACAddressP1, BaseMACAddressP2, etc.",
"required": false,
"type": "string",
"#value": "BaseMACAddress,BaseMACAddressP1,BaseMACAddressP2"
}
]
}
]
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,64 @@
#!/bin/sh
#
# Auto-configure DHCP options for WAN interfaces
# This script runs after netmode applies configuration
#
. /etc/os-release 2>/dev/null
. /lib/functions/system.sh 2>/dev/null
# Get device information
model=$(cat /tmp/sysinfo/model 2>/dev/null || echo "OpenWrt")
basemac=$(get_mac_label 2>/dev/null || echo "000000000000")
software_ver=${OPENWRT_RELEASE##* }
software_ver=${software_ver:-unknown}
# DHCP options to request (TR-069/USP standard options)
reqopts="42 43 100 101 121 125 128 132 224 225 226"
# Helper: Set value if not already set
set_if_empty() {
uci -q get "$1" > /dev/null || uci set "${1}=${2}"
}
# Helper: Add request options (merge with existing)
set_reqopts() {
local intf="$1"
local new_opts="$2"
local opts=$(uci -q get "network.${intf}.reqopts")
local o
for o in $new_opts; do
echo "$opts" | grep -qwF "$o" || opts="${opts:+$opts }$o"
done
uci set "network.${intf}.reqopts=${opts}"
}
# Configure DHCP options only for 'wan' interface with proto=dhcp
for intf in $(uci show network | grep "=interface" | cut -d'.' -f2 | cut -d'=' -f1); do
# Only configure interface named 'wan' with proto=dhcp
[ "$intf" = "wan" ] || continue
[ "$(uci -q get "network.${intf}.proto")" = "dhcp" ] || continue
logger -s -p user.info -t "netmode-dhcp" "Configuring DHCP options for WAN interface"
# Set vendorid: model,software_version,dslforum.org
uci set "network.${intf}.vendorid=${model},${software_ver},dslforum.org"
# Set clientid (01 = ARP hardware type Ethernet)
set_if_empty "network.${intf}.clientid" "01${basemac//:}"
# Set DHCP request options
set_reqopts "$intf" "$reqopts"
# Set sendopts for TR-069/USP (option 124: Device.DeviceInfo.VendorClassID)
# Format: enterprise number (3561 = Broadband Forum) + data
set_if_empty "network.${intf}.sendopts" "124:00:00:0D:E9:04:03:75:73:70"
done
uci -q commit network
logger -s -p user.info -t "netmode-dhcp" "DHCP options configuration completed"
exit 0

View File

@@ -0,0 +1,53 @@
#!/bin/sh
#
# Auto-configure static IP and DHCP server for LAN interfaces
# This script runs after netmode applies configuration
#
_log() {
logger -s -p user.info -t "netmode-static-lan" "$*"
}
# Configure static IP and DHCP server for LAN interface
for intf in $(uci show network | grep "=interface" | cut -d'.' -f2 | cut -d'=' -f1); do
# Only configure interfaces with proto=static
[ "$(uci -q get "network.${intf}.proto")" = "static" ] || continue
_log "Configuring static IP for interface: $intf"
# Special handling for 'lan' interface
if [ "$intf" = "lan" ]; then
_log "Auto-configuring LAN interface with default static IP settings"
# Set static IP configuration
uci -q set "network.${intf}.ipaddr=192.168.1.1"
uci -q set "network.${intf}.netmask=255.255.255.0"
uci -q set "network.${intf}.ip6assign=60"
# Configure DHCP server for LAN
uci -q delete "dhcp.${intf}"
uci -q set "dhcp.${intf}=dhcp"
uci -q set "dhcp.${intf}.interface=${intf}"
uci -q set "dhcp.${intf}.start=100"
uci -q set "dhcp.${intf}.limit=150"
uci -q set "dhcp.${intf}.leasetime=1h"
uci -q set "dhcp.${intf}.dhcpv4=server"
uci -q set "dhcp.${intf}.dhcpv6=server"
uci -q set "dhcp.${intf}.ra=server"
uci -q set "dhcp.${intf}.ra_slaac=1"
uci -q delete "dhcp.${intf}.ra_flags"
uci -q add_list "dhcp.${intf}.ra_flags=managed-config"
uci -q add_list "dhcp.${intf}.ra_flags=other-config"
_log "LAN interface configured with IP 192.168.1.1/24 and DHCP server enabled"
else
_log "Interface '$intf' has proto=static but is not 'lan' - no auto-configuration applied"
fi
done
uci -q commit network
uci -q commit dhcp
_log "Static LAN configuration completed"
exit 0

View File

@@ -0,0 +1,57 @@
#!/bin/sh
if [ ! -f /var/run/boot_complete ]; then
exit 0
fi
if [ -f /etc/bbfdm/dmmap/PPP ]; then
rm -f /etc/bbfdm/dmmap/PPP
fi
if [ -f /etc/bbfdm/dmmap/IP ]; then
rm -f /etc/bbfdm/dmmap/IP
fi
if [ -f /etc/bbfdm/dmmap/Ethernet ]; then
rm -f /etc/bbfdm/dmmap/Ethernet
fi
if [ -f /etc/bbfdm/dmmap/dmmap_firewall ]; then
rm -f /etc/bbfdm/dmmap/dmmap_firewall
fi
if [ -f /etc/bbfdm/dmmap/DHCPv4 ]; then
rm -f /etc/bbfdm/dmmap/DHCPv4
fi
if [ -f /etc/bbfdm/dmmap/DHCPv6 ]; then
rm -f /etc/bbfdm/dmmap/DHCPv6
fi
if [ -f /etc/bbfdm/dmmap/dmmap_mcast ]; then
rm -f /etc/bbfdm/dmmap/dmmap_dns
fi
if [ -f /etc/bbfdm/dmmap/Ethernet ]; then
rm -f /etc/bbfdm/dmmap/Ethernet
fi
if [ -f /etc/bbfdm/dmmap/dmmap_bridge ]; then
rm -f /etc/bbfdm/dmmap/dmmap_bridge
fi
if [ -f /etc/bbfdm/dmmap/dmmap_bridge_vlanport ]; then
rm -f /etc/bbfdm/dmmap/dmmap_bridge_vlanport
fi
if [ -f /etc/bbfdm/dmmap/dmmap_bridge_vlan ]; then
rm -f /etc/bbfdm/dmmap/dmmap_bridge_vlan
fi
if [ -f /etc/bbfdm/dmmap/dmmap_bridge_port ]; then
rm -f /etc/bbfdm/dmmap/dmmap_bridge_port
fi
sleep 5
reboot -f

View File

@@ -1,17 +0,0 @@
#!/bin/sh
if [ ! -f /var/run/boot_complete ]; then
exit 0
fi
if [ -f /etc/bbfdm/dmmap/dmmap_ppp ]; then
rm -f /etc/bbfdm/dmmap/dmmap_ppp
fi
if [ -f /etc/bbfdm/dmmap/dmmap_network ]; then
rm -f /etc/bbfdm/dmmap/dmmap_network*
fi
sleep 5
reboot -f

View File

@@ -0,0 +1,72 @@
#!/bin/sh
# /usr/sbin/netmode-restore.sh
. /lib/functions.sh
LOG_TAG="netmode-restore"
log() {
logger -t "$LOG_TAG" "$*"
echo "[${LOG_TAG}] $*"
}
log "Starting netmode restore"
delete_extra_dhcp_sections() {
log "Cleaning up dhcp UCI"
# by default only lan and wan dhcp sections are present,
# so delete any extra sections
delete_dhcp_sec() {
sec="$1"
intf="$(uci -q get dhcp.$sec.interface)"
if [ "$intf" != "wan" ] && [ "$intf" != "lan" ]; then
log "deleting dhcp section $sec"
uci -q delete dhcp.$sec
fi
}
config_load "dhcp"
config_foreach delete_dhcp_sec dhcp
uci commit dhcp
}
restore_firewall() {
log "Cleaning up firewall UCI"
# in some netmodes, an extra mgmt zone is added
# so we remove its zone and rules
# ---- 1. reset wan zone networks -------------------------------------
uci -q set firewall.wan.network=""
# ---- 2. add base wan/wan6 -------------------------------------------
for net in wan wan6; do
uci -q add_list firewall.wan.network="$net"
done
delete_mgmt_rule() {
sec="$1"
src="$(uci -q get firewall.$sec.src)"
dest="$(uci -q get firewall.$sec.dest)"
if [ "$src" = "mgmt" ] || [ "$dest" = "mgmt" ]; then
log "deleting firewall section $sec"
uci -q delete firewall.$sec
fi
}
# ---- 3. delete mgmt rules ---------------------------------------------
config_load "firewall"
config_foreach delete_mgmt_rule rule
# ---- 4. delete mgmt zone ---------------------------------------------
uci -q delete firewall.mgmt
uci commit firewall
}
restore_firewall
delete_extra_dhcp_sections
log "Netmode restore completed"
exit 0

View File

@@ -10,7 +10,7 @@ PKG_VERSION:=8.0.0
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/BroadbandForum/obudpst.git
PKG_SOURCE_VERSION:=1d00a6de1147b5fb4280c443a67b7e5ded3a5c97
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
PKG_LICENSE:=BSD-3-Clause

View File

@@ -0,0 +1,31 @@
From dac144fb25e4aaaf4e965f066113dc265d0ee524 Mon Sep 17 00:00:00 2001
From: Andreas Gnau <andreas.gnau@iopsys.eu>
Date: Mon, 15 Dec 2025 09:02:10 +0100
Subject: [PATCH] cmake: fix compatibility with CMake 4
CMake 4 has dropped compatibility with old versions < 3.5, and will drop
compatibility for < 3.10 in the future. Update the minimum required
CMake version accordingly so that both old and new versions will work.
Upstream-Status: Submitted [https://github.com/BroadbandForum/obudpst/pull/23]
Signed-off-by: Andreas Gnau <andreas.gnau@iopsys.eu>
---
CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 83bee0290741..cb66227aa62f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -27,7 +27,7 @@
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
project(OB-UDPST)
-cmake_minimum_required(VERSION 3.0)
+cmake_minimum_required(VERSION 3.0...3.10)
if(${CMAKE_VERSION} VERSION_GREATER "3.3.0")
cmake_policy(SET CMP0057 NEW)
endif()
--
2.52.0

View File

@@ -5,15 +5,15 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=obuspa
PKG_VERSION:=10.0.0.22
PKG_VERSION:=10.0.7.12
LOCAL_DEV:=0
ifneq ($(LOCAL_DEV),1)
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/obuspa.git
PKG_SOURCE_VERSION:=12991107039ee685fcd1000bb2649dd1c4b344ff
PKG_SOURCE_VERSION:=567bc255d8847a113864882dfe8b76fc1b2cfdf7
PKG_MAINTAINER:=Vivek Dutta <vivek.dutta@iopsys.eu>
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
PKG_MIRROR_HASH:=skip
endif

Some files were not shown because too many files have changed in this diff Show More