mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-25 03:24:14 +08:00
Compare commits
708 Commits
for_fluent
...
netmode_do
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18314a27d2 | ||
|
|
bb3adc86ff | ||
|
|
82a32a7731 | ||
|
|
f0f18ed780 | ||
|
|
677357d997 | ||
|
|
fa608bc23b | ||
|
|
563a5d03b8 | ||
|
|
b1b432d852 | ||
|
|
fe06c8515f | ||
|
|
9101095a0a | ||
|
|
2bd4c0c236 | ||
|
|
61bda623ca | ||
|
|
e2eaf6221a | ||
|
|
82183e9e3b | ||
|
|
edfbcb1074 | ||
|
|
5af1df3493 | ||
|
|
3ec6c21456 | ||
|
|
9d251b5d9d | ||
|
|
a3e4a0f6e9 | ||
|
|
d5044df134 | ||
|
|
cef4d4efea | ||
|
|
1f093159d8 | ||
|
|
22e6d80384 | ||
|
|
fe1bf101c3 | ||
|
|
24c30a098e | ||
|
|
a0c1801511 | ||
|
|
59e7ece054 | ||
|
|
cb9825504d | ||
|
|
628331c808 | ||
|
|
229f62a906 | ||
|
|
034bd7e8b2 | ||
|
|
c594a4957f | ||
|
|
5fd540d5ba | ||
|
|
64fcaaadc7 | ||
|
|
64f4ceda35 | ||
|
|
0485c372bd | ||
|
|
155b4fe2b3 | ||
|
|
cf573d3fad | ||
|
|
09aa9746d5 | ||
|
|
e56ad858aa | ||
|
|
362bb8b1cf | ||
|
|
9bb0da51cf | ||
|
|
3158f92912 | ||
|
|
2847fdd2c2 | ||
|
|
bde6e11169 | ||
|
|
543ba2ac7a | ||
|
|
c02548298d | ||
|
|
0f03e3ae70 | ||
|
|
2c4307f83a | ||
|
|
98925cc464 | ||
|
|
d8d2d0090b | ||
|
|
2fc98ac307 | ||
|
|
98f5e19916 | ||
|
|
e8da3d1cd7 | ||
|
|
4112fbd17c | ||
|
|
26f202edb7 | ||
|
|
67b4ba0301 | ||
|
|
68fb3bea32 | ||
|
|
c0a1139764 | ||
|
|
39f30cd31a | ||
|
|
ac78f69136 | ||
|
|
f72d4e35d0 | ||
|
|
e5fc33e941 | ||
|
|
5faab025cc | ||
|
|
7a62843c29 | ||
|
|
b0d2b10055 | ||
|
|
7129b55362 | ||
|
|
6662f27493 | ||
|
|
b42c0201cf | ||
|
|
d626a673b5 | ||
|
|
18a5f6ca5b | ||
|
|
97045b2d39 | ||
|
|
8475fa81bc | ||
|
|
e67f2bbcf7 | ||
|
|
a3d7280423 | ||
|
|
61de08f440 | ||
|
|
05ecde4f55 | ||
|
|
55c3233739 | ||
|
|
6e9a38beac | ||
|
|
fea9e4de88 | ||
|
|
ceb5a9f2e4 | ||
|
|
cb8623a862 | ||
|
|
c6672e3cf0 | ||
|
|
75d0b18f09 | ||
|
|
806f685d74 | ||
|
|
e412cfa36d | ||
|
|
55967685ef | ||
|
|
3655ae9d79 | ||
|
|
d526ee41cd | ||
|
|
c7315af615 | ||
|
|
4d414af657 | ||
|
|
074e0c1cd1 | ||
|
|
6b81616883 | ||
|
|
ee3144f736 | ||
|
|
c96eceed2d | ||
|
|
dac23ee614 | ||
|
|
cc312af2f3 | ||
|
|
e506f6462c | ||
|
|
6fb90643c7 | ||
|
|
7e82a1c907 | ||
|
|
9bf94f688c | ||
|
|
ebf0e949b4 | ||
|
|
2766fef0c3 | ||
|
|
a73cd73fe1 | ||
|
|
0df826868a | ||
|
|
2ed0a4ec01 | ||
|
|
944ef75d57 | ||
|
|
b3cfbc8536 | ||
|
|
36928bdcb9 | ||
|
|
b8634e5bec | ||
|
|
a0ba20647d | ||
|
|
642544f579 | ||
|
|
f71042d2eb | ||
|
|
40c9c7ac7c | ||
|
|
f9a046f0b4 | ||
|
|
a7ea8701b9 | ||
|
|
718fde966f | ||
|
|
e198ed73c7 | ||
|
|
5e7a131b64 | ||
|
|
7816cc1e49 | ||
|
|
28d70c56c8 | ||
|
|
2c9a35eb8c | ||
|
|
0779d9f121 | ||
|
|
afa5f38654 | ||
|
|
1eeb06fd36 | ||
|
|
d64bf6ceea | ||
|
|
c28f5afe45 | ||
|
|
1ed383bee7 | ||
|
|
8236cd4093 | ||
|
|
46a09d8f8d | ||
|
|
61c7afe582 | ||
|
|
258449fc11 | ||
|
|
f5db3d3d45 | ||
|
|
a0c6545534 | ||
|
|
96d18ad234 | ||
|
|
18c9bef5f8 | ||
|
|
bd3b904c15 | ||
|
|
350ced4c32 | ||
|
|
b4e735e731 | ||
|
|
e96e2328a7 | ||
|
|
c8c6b5ab4b | ||
|
|
9bd7e17835 | ||
|
|
fa703437e1 | ||
|
|
cfc335aed8 | ||
|
|
1139c21f34 | ||
|
|
6af6728603 | ||
|
|
5a208be259 | ||
|
|
8764f317d0 | ||
|
|
c2e9144819 | ||
|
|
fc9f946be7 | ||
|
|
2aed4dc8f5 | ||
|
|
ce1b42e095 | ||
|
|
8fee332f4c | ||
|
|
ca78501dba | ||
|
|
9280ddd093 | ||
|
|
15563ca117 | ||
|
|
0718730d6b | ||
|
|
f9ad16934c | ||
|
|
966dbd6038 | ||
|
|
b1809e6993 | ||
|
|
ad8b8b2a55 | ||
|
|
6bf1cae138 | ||
|
|
92c3d6d721 | ||
|
|
853a0c840c | ||
|
|
49bcef77aa | ||
|
|
fa8e9fc3ef | ||
|
|
e3eec0d7ab | ||
|
|
74339e6216 | ||
|
|
8197f9ad93 | ||
|
|
1f96c3d295 | ||
|
|
d1d57ca528 | ||
|
|
10428fbda0 | ||
|
|
8e5d4c53ff | ||
|
|
1fb22dfe8c | ||
|
|
99fe2c2b2a | ||
|
|
c153911acf | ||
|
|
31cd59b33c | ||
|
|
21e6193e0a | ||
|
|
3af94e2180 | ||
|
|
df91d06078 | ||
|
|
ea090f50e1 | ||
|
|
7df4486a43 | ||
|
|
6818818127 | ||
|
|
63c0fb7d3b | ||
|
|
2a38e7cd23 | ||
|
|
8f6ae03e7e | ||
|
|
fecbbe90af | ||
|
|
fe1cdbd9bc | ||
|
|
67bf2c0227 | ||
|
|
307059d44b | ||
|
|
a8aa693e18 | ||
|
|
53fc48997a | ||
|
|
9e180eb2bf | ||
|
|
b98ccac057 | ||
|
|
fb236949fc | ||
|
|
5631c28df4 | ||
|
|
8170684100 | ||
|
|
332a35102d | ||
|
|
ba5e332b0d | ||
|
|
09560fb532 | ||
|
|
c4cf8cb24b | ||
|
|
56c94f1ec6 | ||
|
|
279fe9d291 | ||
|
|
924675d271 | ||
|
|
64cf5c7c9f | ||
|
|
9fa9b1adbf | ||
|
|
9944917399 | ||
|
|
2a25fc0ec7 | ||
|
|
ebd7e68714 | ||
|
|
000762c0cb | ||
|
|
c4328f411f | ||
|
|
0428934a69 | ||
|
|
580d24e04a | ||
|
|
95778a4262 | ||
|
|
02ee448479 | ||
|
|
0dcc9743a2 | ||
|
|
1a1a1e1255 | ||
|
|
9710e46c51 | ||
|
|
19e69f7b61 | ||
|
|
e319c85064 | ||
|
|
29638a28f7 | ||
|
|
ccb337ecbd | ||
|
|
5474b1c6d0 | ||
|
|
8df0ad8e46 | ||
|
|
6e358a6bd1 | ||
|
|
20a28db536 | ||
|
|
c6ee9114bc | ||
|
|
89fb4a0857 | ||
|
|
8d86188ff1 | ||
|
|
18d6afea15 | ||
|
|
0cb9aac1f1 | ||
|
|
dfe2af4643 | ||
|
|
2fe133227d | ||
|
|
15f17da6e5 | ||
|
|
2e56ef292c | ||
|
|
65e4bebc0f | ||
|
|
ceb577a6ab | ||
|
|
2d45a45126 | ||
|
|
45294a9f0c | ||
|
|
eb5c837353 | ||
|
|
495d95dcc8 | ||
|
|
32e5dc46b3 | ||
|
|
6980c1e2e5 | ||
|
|
da727b4dc1 | ||
|
|
d8aaacc4c9 | ||
|
|
e036702c16 | ||
|
|
604a105bc9 | ||
|
|
04bdaa950f | ||
|
|
54fdaf2b43 | ||
|
|
644e98e595 | ||
|
|
9fc594d74f | ||
|
|
ac7cfb581e | ||
|
|
ba75b33fc5 | ||
|
|
912978164b | ||
|
|
7a50c328e1 | ||
|
|
f8c9088db7 | ||
|
|
fd34c3e9f3 | ||
|
|
70d7d7a64d | ||
|
|
112f4cb99d | ||
|
|
2380a6de86 | ||
|
|
b0c168322e | ||
|
|
22d8a0992c | ||
|
|
3c075c293c | ||
|
|
17ae16e5d2 | ||
|
|
46dc9e86d8 | ||
|
|
0b3420240d | ||
|
|
83ca06b626 | ||
|
|
2dafb9ec2c | ||
|
|
c2c54e5ca0 | ||
|
|
9314e4bbf3 | ||
|
|
5840332288 | ||
|
|
bb4fffb680 | ||
|
|
4b2b09080d | ||
|
|
ba651b5457 | ||
|
|
1509db0630 | ||
|
|
85e97ca660 | ||
|
|
f9640bc237 | ||
|
|
72b16e33ab | ||
|
|
4e81706967 | ||
|
|
483fc2e6cb | ||
|
|
c2594f2d37 | ||
|
|
fb2eac485b | ||
|
|
c867ab610e | ||
|
|
ef8d667b83 | ||
|
|
3934674c81 | ||
|
|
4f53f35dc1 | ||
|
|
4fe815299a | ||
|
|
9394517727 | ||
|
|
742b357026 | ||
|
|
d383896918 | ||
|
|
646f5d6e1c | ||
|
|
d897632279 | ||
|
|
47e93f13c1 | ||
|
|
70bb662514 | ||
|
|
6f9ec4bf7d | ||
|
|
fc88c554c1 | ||
|
|
5ba6ade386 | ||
|
|
0d1b585c5d | ||
|
|
bf43efa993 | ||
|
|
0e3545cacb | ||
|
|
fefe14d540 | ||
|
|
b6df14f78e | ||
|
|
24cfbe2e48 | ||
|
|
eee28bb66c | ||
|
|
5fcee38906 | ||
|
|
72a9da5bd3 | ||
|
|
2cf19c9469 | ||
|
|
bd0fed8409 | ||
|
|
b23e510dd3 | ||
|
|
bf06544066 | ||
|
|
85762b4641 | ||
|
|
60dafc2028 | ||
|
|
e6054d9f8f | ||
|
|
8b106e6b58 | ||
|
|
41edb9f1a5 | ||
|
|
f6026298e8 | ||
|
|
c3ab091cdc | ||
|
|
dcfca56db8 | ||
|
|
991657fc99 | ||
|
|
90f13664e9 | ||
|
|
e843c83d0c | ||
|
|
7d5c13a9f5 | ||
|
|
417a5c5428 | ||
|
|
0074af0d3c | ||
|
|
fae1f7d816 | ||
|
|
f500a8c749 | ||
|
|
af9e4f99c6 | ||
|
|
e451e32f77 | ||
|
|
26cbba9724 | ||
|
|
5be4e38c68 | ||
|
|
549534f8aa | ||
|
|
f4a623e637 | ||
|
|
833a9a002a | ||
|
|
ff4e68f70a | ||
|
|
b471113bfa | ||
|
|
2b997a4386 | ||
|
|
06a280707a | ||
|
|
c54fd95889 | ||
|
|
86fb3db75b | ||
|
|
70cda05eda | ||
|
|
502aab4f3c | ||
|
|
34b63e84aa | ||
|
|
5f2aa06285 | ||
|
|
5232cc61ac | ||
|
|
98d8e9866c | ||
|
|
0e59fd0d47 | ||
|
|
a7e8e65d88 | ||
|
|
1fd74364fa | ||
|
|
20c49302c1 | ||
|
|
c2e5ade3bb | ||
|
|
b933622547 | ||
|
|
7b12c29425 | ||
|
|
082452bfb5 | ||
|
|
a6b8987dac | ||
|
|
d1307bfd76 | ||
|
|
edd78f675e | ||
|
|
3a1772e1b8 | ||
|
|
b2dd40cae3 | ||
|
|
24f22d0ecc | ||
|
|
a86f478014 | ||
|
|
9a59ccc498 | ||
|
|
15e4dd732a | ||
|
|
784a281fa6 | ||
|
|
8f82b31658 | ||
|
|
3745b4e913 | ||
|
|
90d646319b | ||
|
|
13064e27b3 | ||
|
|
539bf50985 | ||
|
|
1b7b377bd1 | ||
|
|
1c9ba1c83c | ||
|
|
e307ee7aa8 | ||
|
|
6bcf7987d7 | ||
|
|
ff146bf093 | ||
|
|
0f23bee1da | ||
|
|
2070630b07 | ||
|
|
f1702b3e70 | ||
|
|
9634b0678b | ||
|
|
d395030be7 | ||
|
|
4cb0504eb3 | ||
|
|
6df57301f9 | ||
|
|
f527b8a25a | ||
|
|
fbba67542e | ||
|
|
824d6d3abe | ||
|
|
1a9a339cc6 | ||
|
|
0533f114d1 | ||
|
|
dc579e3c60 | ||
|
|
d232e76905 | ||
|
|
2fffb45748 | ||
|
|
b15f1b5026 | ||
|
|
43a0dfc863 | ||
|
|
307381c9af | ||
|
|
1a80f2df47 | ||
|
|
9b79eb42db | ||
|
|
602926b076 | ||
|
|
74cfe57095 | ||
|
|
01845eded6 | ||
|
|
11dce5812c | ||
|
|
7af15ec9a9 | ||
|
|
8359755dc8 | ||
|
|
1a735b7730 | ||
|
|
6a008d3419 | ||
|
|
6142da5d43 | ||
|
|
f5715d478a | ||
|
|
bce9364d14 | ||
|
|
425949900b | ||
|
|
938681c270 | ||
|
|
30f7a15450 | ||
|
|
4d4006309b | ||
|
|
41f1e0d52a | ||
|
|
db207a87fc | ||
|
|
89ab349565 | ||
|
|
8ffe108f95 | ||
|
|
074d9268b0 | ||
|
|
fc7b21aa73 | ||
|
|
6f83732b0e | ||
|
|
97141307ed | ||
|
|
ddec5540bc | ||
|
|
09b97ae69d | ||
|
|
977c1b5767 | ||
|
|
467b3897fb | ||
|
|
a688381a3c | ||
|
|
9bad79439b | ||
|
|
608b9637b0 | ||
|
|
fcd59e95f0 | ||
|
|
5820d98e2c | ||
|
|
9c6b9d6260 | ||
|
|
9fad74246e | ||
|
|
aab3f74290 | ||
|
|
0eb2ce3728 | ||
|
|
f9aabb68d5 | ||
|
|
9917da1ca3 | ||
|
|
acf7344c13 | ||
|
|
693ff8bd19 | ||
|
|
c1286064bb | ||
|
|
2503b1fc72 | ||
|
|
d468c13b3f | ||
|
|
064611a15d | ||
|
|
5c427dd08a | ||
|
|
1703e6d328 | ||
|
|
35c27393ce | ||
|
|
fca93627ba | ||
|
|
417a127dd9 | ||
|
|
afde0b98ad | ||
|
|
a0069cc9be | ||
|
|
368255f50b | ||
|
|
ad1233ff32 | ||
|
|
697ddc356e | ||
|
|
b82eb8325e | ||
|
|
c150053a83 | ||
|
|
7ee83ff47f | ||
|
|
98905256f8 | ||
|
|
a8a511c4ff | ||
|
|
d0d90946b3 | ||
|
|
c2ad0fa44d | ||
|
|
be7fa433c5 | ||
|
|
01e9d7c0bc | ||
|
|
2f398a2671 | ||
|
|
8254547866 | ||
|
|
e8ceb167b5 | ||
|
|
434c794671 | ||
|
|
9628be4812 | ||
|
|
bd90dc7ec2 | ||
|
|
e0736df927 | ||
|
|
afa58be1f8 | ||
|
|
3cbcac96ba | ||
|
|
a92f32eba4 | ||
|
|
842968da4f | ||
|
|
60ef90c1b6 | ||
|
|
56cec9cb7f | ||
|
|
4042d46009 | ||
|
|
d6dfc5bd08 | ||
|
|
451036aebc | ||
|
|
8d01ace7a6 | ||
|
|
d7e22b922b | ||
|
|
a1d535058d | ||
|
|
1bb307ef4f | ||
|
|
404a642e41 | ||
|
|
ae3f1819e6 | ||
|
|
fbd8f64c40 | ||
|
|
369fc0d4bb | ||
|
|
b44afe067f | ||
|
|
d69245f570 | ||
|
|
c3564ff528 | ||
|
|
fafe1d9447 | ||
|
|
e35bf1d509 | ||
|
|
8e11e5dbc8 | ||
|
|
2698ee9358 | ||
|
|
92be6f1129 | ||
|
|
4dfc196968 | ||
|
|
1c17fed77d | ||
|
|
27b9fb9350 | ||
|
|
b917a2177e | ||
|
|
2372de4864 | ||
|
|
c5d7ddd851 | ||
|
|
a688b2091c | ||
|
|
bfc7e6a78a | ||
|
|
41495cf6e5 | ||
|
|
d3d1b444de | ||
|
|
9681b6222c | ||
|
|
d20fb01a1b | ||
|
|
85e49b3df6 | ||
|
|
511e0af668 | ||
|
|
1151478d13 | ||
|
|
7e87028731 | ||
|
|
cb18ecc420 | ||
|
|
e581c05d27 | ||
|
|
3ae6c52e7d | ||
|
|
498a06916b | ||
|
|
332057fdd4 | ||
|
|
58aff3cb45 | ||
|
|
5678b6dcaa | ||
|
|
a597c514f7 | ||
|
|
3c1dcf90eb | ||
|
|
62dc6c28a3 | ||
|
|
2703ea0421 | ||
|
|
b4a0572b7c | ||
|
|
428055c911 | ||
|
|
97723f9e7a | ||
|
|
2dceb5b44b | ||
|
|
8c9689caf7 | ||
|
|
af5bb94c8c | ||
|
|
9db65fcfba | ||
|
|
2b43c27e53 | ||
|
|
c16f4d3f82 | ||
|
|
99a4f3c036 | ||
|
|
71217d4f68 | ||
|
|
ad012d7549 | ||
|
|
6cca837500 | ||
|
|
6bec3c159c | ||
|
|
fd921bb196 | ||
|
|
60d2f92da3 | ||
|
|
8f83250890 | ||
|
|
652ec8a4af | ||
|
|
937b824055 | ||
|
|
889723079b | ||
|
|
7a457ae32a | ||
|
|
7e5e38e657 | ||
|
|
44edac6572 | ||
|
|
fea3e1e4ef | ||
|
|
eae31a6dd4 | ||
|
|
3a1a65d5df | ||
|
|
70a22d0299 | ||
|
|
2a19a1a92a | ||
|
|
5b865c9dbc | ||
|
|
bc041faf04 | ||
|
|
de08bc79a1 | ||
|
|
9ab8dbdb3b | ||
|
|
f3cb8ad566 | ||
|
|
95e9630c4b | ||
|
|
2c6a9e76c8 | ||
|
|
653b74aacf | ||
|
|
c6437fbf53 | ||
|
|
3a4ad69af9 | ||
|
|
0379e816c5 | ||
|
|
b8f99bbe64 | ||
|
|
42df10c708 | ||
|
|
7369ee4c20 | ||
|
|
dc3aa2ec9d | ||
|
|
312d28bec4 | ||
|
|
45a754f567 | ||
|
|
491f2ca07d | ||
|
|
2d5f9229f2 | ||
|
|
16536b9bc3 | ||
|
|
f552b68f10 | ||
|
|
7c444911f7 | ||
|
|
7a12fb28b1 | ||
|
|
a430d76517 | ||
|
|
b48c7e14dc | ||
|
|
269d72c30a | ||
|
|
f19082aa1e | ||
|
|
43f0296ea2 | ||
|
|
6418f9fa8f | ||
|
|
58ecaf9c15 | ||
|
|
0f8887f676 | ||
|
|
a1193cc6b8 | ||
|
|
392a41b38a | ||
|
|
c3128d3a14 | ||
|
|
4d88e123a9 | ||
|
|
fb050cae2e | ||
|
|
90af4f350b | ||
|
|
605f0faacc | ||
|
|
065772401b | ||
|
|
886000a830 | ||
|
|
0b5a84e33a | ||
|
|
a2763cd075 | ||
|
|
4a8b27ed95 | ||
|
|
6eef7e4b21 | ||
|
|
a0bde81de4 | ||
|
|
5e04f9312b | ||
|
|
a1e7f80ae0 | ||
|
|
ed5169b94c | ||
|
|
c64701e6b2 | ||
|
|
db6672c9ee | ||
|
|
05c4d0d3d1 | ||
|
|
6535fe465c | ||
|
|
2703db3f2e | ||
|
|
bb603cb492 | ||
|
|
f8d7788d6f | ||
|
|
97df4367eb | ||
|
|
21fbf0253c | ||
|
|
ced2b4187f | ||
|
|
bfdd27f72a | ||
|
|
6f1953e4a4 | ||
|
|
fd816f8ee1 | ||
|
|
cbdc083db5 | ||
|
|
eb1897a730 | ||
|
|
546450566e | ||
|
|
5fb51c6fd9 | ||
|
|
5d84d0ae29 | ||
|
|
340709b527 | ||
|
|
38bef28d00 | ||
|
|
ba53aeda7d | ||
|
|
bd63c5a090 | ||
|
|
89c1fbb38a | ||
|
|
d6ff1d851b | ||
|
|
107b1576e8 | ||
|
|
47694dc23e | ||
|
|
002836769c | ||
|
|
cafb9f09ba | ||
|
|
a440adbef9 | ||
|
|
2ba04321b3 | ||
|
|
9126f2ef7d | ||
|
|
ed01ddf670 | ||
|
|
7e360f7b30 | ||
|
|
e15dcd3b25 | ||
|
|
9ee00a3c82 | ||
|
|
ba94d88f0d | ||
|
|
041e51edf3 | ||
|
|
6ca5af0790 | ||
|
|
6d32d6e8b3 | ||
|
|
2b4f9029f8 | ||
|
|
8c3bf8763e | ||
|
|
1c6243113c | ||
|
|
eedf8d2761 | ||
|
|
bf8b4de5da | ||
|
|
fd208e0e5f | ||
|
|
5b090176a1 | ||
|
|
93b1952f50 | ||
|
|
ddcfeeb339 | ||
|
|
8cea3573f7 | ||
|
|
8ac0f69992 | ||
|
|
65dea29e5f | ||
|
|
2cecb4f75a | ||
|
|
a47d302ec7 | ||
|
|
a9b3a392dd | ||
|
|
397611aff5 | ||
|
|
21c9fafc4d | ||
|
|
41efd7d712 | ||
|
|
f1e37ac0d8 | ||
|
|
ab6d3935d1 | ||
|
|
db529f651e | ||
|
|
975bf57de0 | ||
|
|
6fb3a1b91d | ||
|
|
57ae4eb344 | ||
|
|
dc79aa56f9 | ||
|
|
8334b65ad4 | ||
|
|
e9caa2e7cd | ||
|
|
49a31dbd49 | ||
|
|
31f223f7a0 | ||
|
|
8e33d24256 | ||
|
|
e6df8f9ad0 | ||
|
|
2c3e9ce606 | ||
|
|
616e15b9c4 | ||
|
|
93d2d09dcc | ||
|
|
ece7e8f22c | ||
|
|
879b473d20 | ||
|
|
ac9da0ec6f | ||
|
|
7c5046d9d8 | ||
|
|
69ccc34b2c | ||
|
|
87a6852c1a | ||
|
|
b0d1ada967 | ||
|
|
09cccc39cc | ||
|
|
7227cbd8da | ||
|
|
c57b0322b0 | ||
|
|
db626422dc | ||
|
|
26ffa55453 | ||
|
|
adc2b26a78 | ||
|
|
51e3ad0404 | ||
|
|
d9448a0de4 | ||
|
|
84eff7c8e0 | ||
|
|
53d940586e | ||
|
|
712435786a | ||
|
|
e57bbc0306 | ||
|
|
cc4aa5a415 | ||
|
|
7e502d79c8 | ||
|
|
cbbc3b3725 | ||
|
|
dcfe80ad8e | ||
|
|
c8bbe8725a | ||
|
|
71828eb20b | ||
|
|
90fd7f326d | ||
|
|
1263451924 | ||
|
|
c74662e1dd | ||
|
|
34482e3c86 | ||
|
|
96be0f9fab | ||
|
|
971d1ca37e | ||
|
|
99821b5010 | ||
|
|
c68b1c01eb | ||
|
|
a053e7752f | ||
|
|
558bd40b9f | ||
|
|
432969f0bf | ||
|
|
a7dfecba54 | ||
|
|
0ba1417643 | ||
|
|
29d6ad2fbd | ||
|
|
f7ef772ebf | ||
|
|
d0c9d595c8 | ||
|
|
912d98f496 | ||
|
|
8fb1b55e57 | ||
|
|
c5e79244c7 |
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.15.28
|
||||
PKG_VERSION:=1.18.16
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=a20a15888b15864136ec40b15f221db2edbaf574
|
||||
PKG_SOURCE_VERSION:=72c3307651cb583121fa5b4abcaad957ddc264bd
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
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
|
||||
@@ -107,7 +107,7 @@ endif
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)" \
|
||||
-DBBFDMD_MAX_MSG_LEN:Integer=10485760 \
|
||||
-DBBFDMD_MAX_MSG_LEN:Integer=20971520 \
|
||||
-DCMAKE_BUILD_TYPE:String="Debug" \
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -1,20 +1,47 @@
|
||||
{
|
||||
"usp": [
|
||||
"firewall",
|
||||
"network",
|
||||
"dhcp",
|
||||
"time",
|
||||
"wireless",
|
||||
"ieee1905",
|
||||
"mapcontroller",
|
||||
"mosquitto",
|
||||
"nginx"
|
||||
"/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",
|
||||
"wireless",
|
||||
"time"
|
||||
"/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"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
@@ -15,9 +15,13 @@
|
||||
]
|
||||
},
|
||||
"dhcp_refresh": {
|
||||
"if_operator": "OR",
|
||||
"if" : [
|
||||
{
|
||||
"event": "host"
|
||||
},
|
||||
{
|
||||
"event": "wifi.dataelements.Associated"
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bridgemngr
|
||||
PKG_VERSION:=1.0.14
|
||||
PKG_VERSION:=1.1.6
|
||||
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr
|
||||
PKG_SOURCE_VERSION:=99bc3a3a0a2571917eda7085c21952f779fdb471
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/bridgemngr.git
|
||||
PKG_SOURCE_VERSION:=882f8c8cc9a97372297d192cc916c4f8ffe7c25a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -52,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
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
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_VERSION:=f54550f2d587a701c0a8d5cac4a0910a99ce92cf
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddnsmngr
|
||||
PKG_VERSION:=1.0.11
|
||||
PKG_VERSION:=1.0.12
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/ddnsmngr.git
|
||||
PKG_SOURCE_VERSION:=9f2f4dabc71c4f405b1c5df576d20d793d299e94
|
||||
PKG_SOURCE_VERSION:=44af9a7b3fec3929f8554af9633a5b8068189b48
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=decollector
|
||||
PKG_VERSION:=6.2.1.2
|
||||
PKG_VERSION:=6.2.3.8
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=a5c381b2855bd88f09dedb00f76040f1a4662079
|
||||
PKG_SOURCE_VERSION:=8396091a83aefaf8423dfd41a957b04f3ed821e7
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -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))
|
||||
|
||||
26
decollector/bbfdm_service.json
Normal file
26
decollector/bbfdm_service.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.7.7
|
||||
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:=289a91b3e7f221f16c976efd147bd4b203420b41
|
||||
PKG_SOURCE_VERSION:=5c2720563b3ed889e9d4de6fdb9b0f6a9d584094
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
|
||||
@@ -57,13 +57,53 @@ get_dcx81_device() {
|
||||
device_name_line="$(grep '^DEVNAME=' "$uevent_file")" || return 1
|
||||
readonly device="/dev/${device_name_line##DEVNAME=}"
|
||||
[ -c "$device" ] || return 1
|
||||
printf "%s" "$device"
|
||||
printf "%s" "$(basename $device)"
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
check_dcx81_firmware() {
|
||||
local dcx81_uart=$1
|
||||
local fw_link="/lib/firmware/dcx81_firmware"
|
||||
local fw_file
|
||||
|
||||
[ -L "$fw_link" ] || return
|
||||
|
||||
fw_file=$(readlink -f $fw_link)
|
||||
[ -f "$fw_file" ] || return
|
||||
|
||||
# the symbolic link is not needed
|
||||
rm -f $fw_link
|
||||
|
||||
eval $(/sbin/cmbs_tcx -comname "$dcx81_uart" -fw_version |grep DCX81_FW_Version)
|
||||
[ -n "$DCX81_FW_Version" ] || return
|
||||
|
||||
if echo $(basename $fw_file) | grep -qi "$DCX81_FW_Version" ; then
|
||||
logger -t "$PROG" "DCX81 running expected $DCX81_FW_Version"
|
||||
return;
|
||||
fi
|
||||
|
||||
logger -t "$PROG" "DCX81 firmware upgrading to $fw_file"
|
||||
/sbin/cmbs_tcx -comname "$dcx81_uart" -fwu "$fw_file" 2>&1 >/dev/null &
|
||||
|
||||
echo -n "Updrading DCX81 firmware.." >/dev/console
|
||||
local wait_time=0
|
||||
while pidof cmbs_tcx >/dev/null && [ "$wait_time" -lt "200" ] ; do
|
||||
sleep 5
|
||||
wait_time=$(($wait_time + 5))
|
||||
echo -n "." >/dev/console
|
||||
done
|
||||
|
||||
if pidof cmbs_tcx >/dev/null ; then
|
||||
killall -9 cmbs_tcx
|
||||
logger -t "$PROG" "DCX81 firmware upgrade timeout"
|
||||
else
|
||||
logger -t "$PROG" "DCX81 firmware upgrade done"
|
||||
fi
|
||||
}
|
||||
|
||||
start_service() {
|
||||
local opt_ext=
|
||||
local rfpi=
|
||||
@@ -75,14 +115,16 @@ start_service() {
|
||||
return 0
|
||||
fi
|
||||
|
||||
opt_ext="-extensionShift $(get_extension_shift)"
|
||||
|
||||
local dcx81_uart_device
|
||||
if ! dcx81_uart_device="$(get_dcx81_device)"; then
|
||||
logger -t "$PROG" -p daemon.warning "Could not determine DCX81 UART device. Falling back to default ttyH0."
|
||||
dcx81_uart_device=/dev/ttyH0
|
||||
dcx81_uart_device="ttyH0"
|
||||
fi
|
||||
|
||||
check_dcx81_firmware $dcx81_uart_device
|
||||
|
||||
opt_ext="-extensionShift $(get_extension_shift)"
|
||||
|
||||
rfpi=$(db -q get hw.board.dect_rfpi)
|
||||
[ -n "$rfpi" -a ${#rfpi} -eq 14 ] && opt_ext="$opt_ext -rfpi $rfpi"
|
||||
|
||||
@@ -106,21 +148,19 @@ start_service() {
|
||||
|
||||
procd_open_instance
|
||||
|
||||
# dectmngr takes expects device without /dev
|
||||
readonly dcx81_uart_device_wo_dev="${dcx81_uart_device##/dev/}"
|
||||
case "$log_dect_cmbs" in
|
||||
none)
|
||||
echo "Starting dectmngr with cmbs logging disabled"
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" $opt_ext
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device" $opt_ext
|
||||
rm -f $LOG_PATH/*
|
||||
;;
|
||||
file)
|
||||
echo "Starting dectmngr with cmbs logging enabled to file"
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -log $LOG_PATH/dect-cmbs.log $opt_ext
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device" -log $LOG_PATH/dect-cmbs.log $opt_ext
|
||||
;;
|
||||
*)
|
||||
echo "Starting dectmngr with cmbs logging enabled to syslog"
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device_wo_dev" -syslog $opt_ext
|
||||
procd_set_param command "$PROG" -comname "$dcx81_uart_device" -syslog $opt_ext
|
||||
rm -f $LOG_PATH/*
|
||||
;;
|
||||
esac
|
||||
|
||||
12
dhcpmngr/Config.in
Normal file
12
dhcpmngr/Config.in
Normal file
@@ -0,0 +1,12 @@
|
||||
if PACKAGE_dhcpmngr
|
||||
|
||||
config DHCPMNGR_ENABLE_VENDOR_EXT
|
||||
bool "Use datamodel vendor extensions"
|
||||
default y
|
||||
help
|
||||
Set this option to use bridge BBF vendor extensions.
|
||||
|
||||
config DHCPMNGR_VENDOR_PREFIX
|
||||
string "Package specific datamodel Vendor Prefix for TR181 extensions"
|
||||
default ""
|
||||
endif
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dhcpmngr
|
||||
PKG_VERSION:=1.0.6
|
||||
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:=986f66608959f4f589009d580b046e250d8c620d
|
||||
PKG_SOURCE_VERSION:=74d96cd70119e4ea08767d68b45b4922162d0328
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -39,6 +39,22 @@ define Package/dhcpmngr/description
|
||||
Package to add Device.DHCPv4. and Device.DHCPv6. data model support.
|
||||
endef
|
||||
|
||||
define Package/$(PKG_NAME)/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
ifeq ($(CONFIG_DHCPMNGR_ENABLE_VENDOR_EXT),y)
|
||||
MAKE_FLAGS += DHCPMNGR_ENABLE_VENDOR_EXT=y
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_DHCPMNGR_VENDOR_PREFIX),"")
|
||||
VENDOR_PREFIX = $(CONFIG_BBF_VENDOR_PREFIX)
|
||||
else
|
||||
VENDOR_PREFIX = $(CONFIG_DHCPMNGR_VENDOR_PREFIX)
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(VENDOR_PREFIX)\\\"
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/dhcpmngr/* $(PKG_BUILD_DIR)/
|
||||
|
||||
48
dmcli-plugins/Makefile
Normal file
48
dmcli-plugins/Makefile
Normal file
@@ -0,0 +1,48 @@
|
||||
#
|
||||
# Copyright (c) 2023 Genexis Netherlands B.V. All rights reserved.
|
||||
# This Software and its content are protected by the Dutch Copyright Act
|
||||
# ('Auteurswet'). All and any copying and distribution of the software
|
||||
# and its content without authorization by Genexis Netherlands B.V. is
|
||||
# prohibited. The prohibition includes every form of reproduction and
|
||||
# distribution.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dmcli-plugins
|
||||
PKG_LICENSE:=PROPRIETARY GENEXIS
|
||||
PKG_VERSION:=2.2.6
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/dmcli-plugin-easydm.git
|
||||
PKG_SOURCE_VERSION:=bc8b8527e8a41bdba73cb277a3c6c3b42b045153
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dmcli-plugins
|
||||
SECTION:=tools
|
||||
CATEGORY:=Genexis
|
||||
TITLE:=Easy-to-use data model on top of TR181
|
||||
URL:=http://genexis.eu
|
||||
DEPENDS:=+dmcli
|
||||
endef
|
||||
|
||||
define Package/dmcli-plugins/description
|
||||
EasyDM offers a user-friendly approach to configuring TR-181
|
||||
simplifying the process with its intuitive interface.
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
true
|
||||
endef
|
||||
|
||||
define Package/dmcli-plugins/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/dmcli/plugins
|
||||
$(CP) $(PKG_BUILD_DIR)/src/*.js $(1)/usr/lib/dmcli/plugins/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dmcli-plugins))
|
||||
9
dmcli/Config.in
Normal file
9
dmcli/Config.in
Normal file
@@ -0,0 +1,9 @@
|
||||
if PACKAGE_dmcli
|
||||
|
||||
config DMCLI_REMOTE_CONNECTION
|
||||
bool "Add dmcli remote controller configuration"
|
||||
default n
|
||||
help
|
||||
This adds a usp controller configuration for dmcli remote connection from different machine/laptop/server.
|
||||
|
||||
endif
|
||||
76
dmcli/Makefile
Normal file
76
dmcli/Makefile
Normal file
@@ -0,0 +1,76 @@
|
||||
#
|
||||
# Copyright (c) 2021 Genexis Netherlands B.V. All rights reserved.
|
||||
# This Software and its content are protected by the Dutch Copyright Act
|
||||
# ('Auteurswet'). All and any copying and distribution of the software
|
||||
# and its content without authorization by Genexis Netherlands B.V. is
|
||||
# prohibited. The prohibition includes every form of reproduction and
|
||||
# distribution.
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dmcli
|
||||
PKG_LICENSE:=PROPRIETARY GENEXIS
|
||||
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:=f03188eff6c2cab59e4c8f18a435c940ff5043f5
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/dmcli
|
||||
SECTION:=tools
|
||||
CATEGORY:=Genexis
|
||||
TITLE:=DMCLI (datamodel-based CLI)
|
||||
URL:=http://genexis.eu
|
||||
DEPENDS:=+usp-js +DMCLI_REMOTE_CONNECTION:mosquitto-auth-plugin +shadow-utils +@BUSYBOX_CONFIG_ADDUSER
|
||||
endef
|
||||
|
||||
define Package/dmcli/description
|
||||
CLI to view and configure datamodels of CPE
|
||||
endef
|
||||
|
||||
define Package/dmcli/conffiles
|
||||
/etc/dmcli/dmcli.conf
|
||||
endef
|
||||
|
||||
define Package/dmcli/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/dmcli/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dmcli $(1)/usr/bin/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib/dmcli
|
||||
$(CP) $(PKG_BUILD_DIR)/common $(1)/usr/lib/dmcli/
|
||||
mv $(1)/usr/lib/dmcli/common/os_qjs.js $(1)/usr/lib/dmcli/common/os.js
|
||||
rm $(1)/usr/lib/dmcli/common/os_node.js
|
||||
$(CP) $(PKG_BUILD_DIR)/core $(1)/usr/lib/dmcli/
|
||||
$(CP) $(PKG_BUILD_DIR)/cli $(1)/usr/lib/dmcli/
|
||||
$(CP) $(PKG_BUILD_DIR)/data $(1)/usr/lib/dmcli/
|
||||
$(CP) $(PKG_BUILD_DIR)/plugins $(1)/usr/lib/dmcli/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/36-dmcli $(1)/etc/uci-defaults/
|
||||
ifeq ($(CONFIG_DMCLI_REMOTE_CONNECTION),y)
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/36-dmcli-remote $(1)/etc/uci-defaults/
|
||||
else
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/36-dmcli-remote-remove $(1)/etc/uci-defaults/
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/dmcli
|
||||
$(CP) ./files/etc/dmcli/dmcli.acl $(1)/etc/dmcli/
|
||||
$(CP) ./files/etc/dmcli/dmcli.conf $(1)/etc/dmcli/
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/users/roles/
|
||||
$(INSTALL_DATA) ./files/etc/users/roles/operator.json $(1)/etc/users/roles/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,dmcli))
|
||||
4
dmcli/files/etc/dmcli/dmcli.acl
Normal file
4
dmcli/files/etc/dmcli/dmcli.acl
Normal file
@@ -0,0 +1,4 @@
|
||||
user operator
|
||||
topic read /usp/operator/controller/reply-to
|
||||
topic read /usp/operator/controller
|
||||
topic write /usp/operator/endpoint
|
||||
45
dmcli/files/etc/dmcli/dmcli.conf
Normal file
45
dmcli/files/etc/dmcli/dmcli.conf
Normal file
@@ -0,0 +1,45 @@
|
||||
{
|
||||
"Settings": {
|
||||
"USP": {
|
||||
"ActiveConnectionProfile": "local",
|
||||
"ConnectionProfile": [
|
||||
{
|
||||
"Name": "local",
|
||||
"Host": "127.0.0.1",
|
||||
"Port": 9002,
|
||||
"Username": "operator",
|
||||
"Protocol": "ws",
|
||||
"FromId": "oui:000F94:device-controller-operator",
|
||||
"PublishEndpoint": "/usp/operator/endpoint",
|
||||
"SubscribeEndpoint": "/usp/operator/controller"
|
||||
}
|
||||
],
|
||||
"Session": {
|
||||
"AutoStart": false
|
||||
},
|
||||
"Notification": {
|
||||
"LogTo": "console",
|
||||
"Format": "brief",
|
||||
"LogFile": "usp-notification.log"
|
||||
}
|
||||
},
|
||||
"CLI": {
|
||||
"Home": "/",
|
||||
"Color": "true",
|
||||
"Mode": "Command",
|
||||
"ShowCommandTime": false,
|
||||
"SortDMTree": false
|
||||
},
|
||||
"Prompt": {
|
||||
"Auto": true,
|
||||
"Color": "default",
|
||||
"SelectedBackgroundColor": "yellow",
|
||||
"PageSize": "3",
|
||||
"AutoPromptOnEmptyCommand": false,
|
||||
"AutoPromptInstanceNumbers": false
|
||||
},
|
||||
"Log": {
|
||||
"Level": "Error"
|
||||
}
|
||||
}
|
||||
}
|
||||
120
dmcli/files/etc/uci-defaults/36-dmcli
Normal file
120
dmcli/files/etc/uci-defaults/36-dmcli
Normal file
@@ -0,0 +1,120 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /lib/functions/iopsys-environment.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
DMCLI_CONF="/etc/dmcli/dmcli.conf"
|
||||
CONTROLLER_ID='oui:000F94:device-controller-operator'
|
||||
DMCLI_RESP_TOPIC="/usp/operator/endpoint"
|
||||
DMCLI_CTRL_TOPIC="/usp/operator/controller"
|
||||
DMCLI_PORT="9002"
|
||||
|
||||
grep -q "^operator:" /etc/passwd || {
|
||||
adduser -g 'Operator' -D -H -s /usr/bin/dmcli --home '/usr/lib/dmcli' 'operator'
|
||||
hash=""
|
||||
if type get_operator_password_hash > /dev/null 2>&1; then
|
||||
hash=$(get_operator_password_hash)
|
||||
fi
|
||||
if [ -z "$hash" ]; then
|
||||
hash='$6$zP4Wk/VQJOLwwofC$teuhnYFQBcA8YUZo/Q0quDMi4SsOHmfBcyvt5VNchPnzgwF1nfNNliC3yBVW22NwmwttPEWeBEBfnMTBB0rYs/'
|
||||
fi
|
||||
echo "operator:${hash}" | chpasswd -e
|
||||
}
|
||||
|
||||
grep -q "^/usr/bin/dmcli$" /etc/shells || {
|
||||
echo '/usr/bin/dmcli' >> /etc/shells
|
||||
}
|
||||
|
||||
uci -q del_list sshd.@sshd[0].AllowUsers='operator'
|
||||
uci -q add_list sshd.@sshd[0].AllowUsers='operator'
|
||||
|
||||
uci -q delete users.operator
|
||||
uci -q set users.operator=user
|
||||
uci -q set users.operator.enabled=1
|
||||
uci -q set users.operator.shell='dmcli'
|
||||
uci -q set users.operator.member_roles='operator'
|
||||
|
||||
if [ -f "/etc/config/mosquitto" ]; then
|
||||
uci_add mosquitto listener dmcli_local
|
||||
uci_set mosquitto dmcli_local enabled 1
|
||||
uci_set mosquitto dmcli_local port "${DMCLI_PORT}"
|
||||
uci_set mosquitto dmcli_local protocol 'websockets'
|
||||
uci_set mosquitto dmcli_local acl_file '/etc/dmcli/dmcli.acl'
|
||||
uci_set mosquitto dmcli_local no_remote_access '1'
|
||||
uci_set mosquitto dmcli_local allow_anonymous '1'
|
||||
fi
|
||||
|
||||
if [ -f "/etc/config/obuspa" ]; then
|
||||
uci_add obuspa mqtt mqtt_operator
|
||||
uci_set obuspa mqtt_operator BrokerAddress '127.0.0.1'
|
||||
uci_set obuspa mqtt_operator BrokerPort '1883'
|
||||
uci_set obuspa mqtt_operator TransportProtocol 'TCP/IP'
|
||||
|
||||
uci_add obuspa mtp mtp_operator
|
||||
uci_set obuspa mtp_operator Protocol 'MQTT'
|
||||
uci_set obuspa mtp_operator ResponseTopicConfigured "${DMCLI_RESP_TOPIC}"
|
||||
uci_set obuspa mtp_operator mqtt 'mqtt_operator'
|
||||
|
||||
uci_add obuspa controller controller_operator
|
||||
uci_set obuspa controller_operator EndpointID "${CONTROLLER_ID}"
|
||||
uci_set obuspa controller_operator Protocol 'MQTT'
|
||||
uci_set obuspa controller_operator Topic "${DMCLI_CTRL_TOPIC}"
|
||||
uci_set obuspa controller_operator mqtt 'mqtt_operator'
|
||||
uci_set obuspa controller_operator assigned_role_name 'operator'
|
||||
fi
|
||||
|
||||
_get_endpoint_id() {
|
||||
local id serial oui
|
||||
|
||||
id="$(uci -q get obuspa.localagent.EndpointID)"
|
||||
if [ -n "${id}" ]; then
|
||||
echo "${id}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
serial="$(db -q get device.deviceinfo.SerialNumber)"
|
||||
oui="$(db -q get device.deviceinfo.ManufacturerOUI)"
|
||||
|
||||
echo "os::${oui}-${serial//+/%2B}"
|
||||
}
|
||||
|
||||
update_dmcli_conf() {
|
||||
local endpointid confTmpFile
|
||||
local port fromid publish subscribe toid
|
||||
|
||||
if [ -f "${DMCLI_CONF}" ]; then
|
||||
endpointid="$(_get_endpoint_id)"
|
||||
json_load_file "${DMCLI_CONF}" || return
|
||||
json_select "Settings" || return
|
||||
json_select "USP" || return
|
||||
json_select "ConnectionProfile" || return
|
||||
json_select "1" || return
|
||||
json_get_var port "Port"
|
||||
json_get_var fromid "FromId"
|
||||
json_get_var publish "PublishEndpoint"
|
||||
json_get_var subscribe "SubscribeEndpoint"
|
||||
json_get_var toid "ToId"
|
||||
|
||||
json_add_int "Port" "${DMCLI_PORT}"
|
||||
json_add_string "FromId" "${CONTROLLER_ID}"
|
||||
json_add_string "PublishEndpoint" "${DMCLI_RESP_TOPIC}"
|
||||
json_add_string "SubscribeEndpoint" "${DMCLI_CTRL_TOPIC}"
|
||||
json_add_string "ToId" "${endpointid}"
|
||||
json_select ..
|
||||
json_select ..
|
||||
json_select ..
|
||||
json_select ..
|
||||
|
||||
if [ "${port}" != "${DMCLI_PORT}" ] || [ "${fromid}" != "${CONTROLLER_ID}" ] || \
|
||||
[ "${publish}" != "${DMCLI_RESP_TOPIC}" ] || [ "${subscribe}" != "${DMCLI_CTRL_TOPIC}" ] || \
|
||||
[ "${toid}" != "${endpointid}" ]; then
|
||||
confTmpFile="$(mktemp -u -p "$(dirname "$DMCLI_CONF")" "$(basename "$DMCLI_CONF").XXXXXXX")"
|
||||
json_pretty
|
||||
json_dump > "${confTmpFile}" || return
|
||||
mv -f "${confTmpFile}" "${DMCLI_CONF}" || return
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
update_dmcli_conf || exit
|
||||
14
dmcli/files/etc/uci-defaults/36-dmcli-remote
Normal file
14
dmcli/files/etc/uci-defaults/36-dmcli-remote
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
if [ -f "/etc/config/mosquitto" ]; then
|
||||
uci_add mosquitto listener dmcli
|
||||
uci_set mosquitto dmcli enabled 1
|
||||
uci_set mosquitto dmcli port '9003'
|
||||
uci_set mosquitto dmcli protocol 'websockets'
|
||||
uci_set mosquitto dmcli auth_plugin '/usr/lib/mosquitto_auth_plugin.so'
|
||||
uci_set mosquitto dmcli acl_file '/etc/dmcli/dmcli.acl'
|
||||
fi
|
||||
|
||||
exit 0
|
||||
9
dmcli/files/etc/uci-defaults/36-dmcli-remote-remove
Normal file
9
dmcli/files/etc/uci-defaults/36-dmcli-remote-remove
Normal file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
if [ -f "/etc/config/mosquitto" ]; then
|
||||
uci_remove mosquitto dmcli
|
||||
fi
|
||||
|
||||
exit 0
|
||||
14
dmcli/files/etc/users/roles/operator.json
Normal file
14
dmcli/files/etc/users/roles/operator.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"tr181": {
|
||||
"name": "operator",
|
||||
"instance": 6,
|
||||
"permission": [
|
||||
{
|
||||
"object": "Device.",
|
||||
"perm": [
|
||||
"PERMIT_ALL"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
7
dmcli/src/Makefile
Normal file
7
dmcli/src/Makefile
Normal file
@@ -0,0 +1,7 @@
|
||||
all: dmcli
|
||||
|
||||
dmcli: main.c
|
||||
$(CC) $(CFLAGS) -Wall -Werror -o $@ $^
|
||||
|
||||
clean:
|
||||
rm -f dmcli
|
||||
32
dmcli/src/main.c
Normal file
32
dmcli/src/main.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*
|
||||
* Copyright (c) 2021 Genexis Netherlands B.V. All rights reserved.
|
||||
* This Software and its content are protected by the Dutch Copyright Act
|
||||
* ('Auteurswet'). All and any copying and distribution of the software
|
||||
* and its content without authorization by Genexis Netherlands B.V. is
|
||||
* prohibited. The prohibition includes every form of reproduction and
|
||||
* distribution.
|
||||
*/
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* C Wrapper for operator to login to the CLI via ssh: the shell in
|
||||
* the passwd file cannot be a script that requires an interpreter. */
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
char *cmd[3 + (argc > 1 ? argc - 1 : 0)];
|
||||
|
||||
cmd[0] = "/usr/bin/qjs";
|
||||
cmd[1] = "/usr/lib/dmcli/cli/main.js";
|
||||
cmd[2] = NULL;
|
||||
|
||||
if (argc > 1) {
|
||||
memcpy(&cmd[2], &argv[1], (argc - 1) * sizeof(char *));
|
||||
cmd[2 + argc - 1] = NULL;
|
||||
}
|
||||
|
||||
execv(cmd[0], cmd);
|
||||
fprintf(stderr, "%s: command not found\n", cmd[0]);
|
||||
return 127;
|
||||
}
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dnsmngr
|
||||
PKG_VERSION:=1.0.17
|
||||
PKG_VERSION:=1.0.20
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dnsmngr.git
|
||||
PKG_SOURCE_VERSION:=2ceb76e98cf23a8d52ab3f464d38d62385311a87
|
||||
PKG_SOURCE_VERSION:=83e485fae8905f9061257264cf43ea41e47743a6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dslmngr
|
||||
PKG_VERSION:=1.2.9
|
||||
PKG_VERSION:=1.2.10
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/dslmngr.git
|
||||
PKG_SOURCE_VERSION:=5340cb31f759301f5aca3fd848fc3a63b0b4663f
|
||||
PKG_SOURCE_VERSION:=8fb4093b4d26b3cb06603e110d424005e33cf5d6
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
|
||||
PKG_MIRROR_HASH:=skip
|
||||
@@ -30,6 +30,8 @@ include ../bbfdm/bbfdm.mk
|
||||
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
TARGET_PLATFORM=BROADCOM
|
||||
else ifneq ($(CONFIG_TARGET_airoha),)
|
||||
TARGET_PLATFORM=AIROHA
|
||||
else
|
||||
$(info Unexpected CONFIG_TARGET)
|
||||
endif
|
||||
@@ -41,7 +43,7 @@ define Package/dslmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=XDSL status and configration utility
|
||||
DEPENDS:=+libdsl +libuci +libubox +ubus +libpthread +libnl-genl +libeasy
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +TARGET_airoha:br2684ctl
|
||||
endef
|
||||
|
||||
define Package/dslmngr/description
|
||||
@@ -75,7 +77,10 @@ define Package/dslmngr/install
|
||||
$(CP) ./files/common/* $(1)/
|
||||
ifeq ($(CONFIG_TARGET_brcmbca),y)
|
||||
$(CP) ./files/broadcom/* $(1)/
|
||||
else ifneq ($(CONFIG_TARGET_airoha),)
|
||||
$(CP) ./files/airoha/* $(1)/
|
||||
endif
|
||||
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/dslmngr $(1)/sbin/
|
||||
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
|
||||
|
||||
26
dslmngr/files/airoha/etc/init.d/xdsl_wan
Executable file
26
dslmngr/files/airoha/etc/init.d/xdsl_wan
Executable file
@@ -0,0 +1,26 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=99
|
||||
STOP=99
|
||||
USE_PROCD=1
|
||||
|
||||
start_service() {
|
||||
readonly need_xdsl="$(jsonfilter -i /etc/board.json -e @.dsl)"
|
||||
[ -f /etc/board.json ] || return 0
|
||||
|
||||
if [ "$need_xdsl" != "" ]; then
|
||||
procd_open_instance xdsl_wan
|
||||
procd_set_param command /sbin/xdsl_wan
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
fi
|
||||
}
|
||||
|
||||
boot() {
|
||||
: # boot-up is handled from 'hsm' application
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
{
|
||||
procd_add_reload_trigger "dsl"
|
||||
}
|
||||
28
dslmngr/files/airoha/lib/dsl/airoha.sh
Normal file
28
dslmngr/files/airoha/lib/dsl/airoha.sh
Normal file
@@ -0,0 +1,28 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
xtm_remove_devices() {
|
||||
:
|
||||
}
|
||||
|
||||
xtm_create_devices() {
|
||||
:
|
||||
}
|
||||
|
||||
xdsl_configure() {
|
||||
# Support bridged WAN interface
|
||||
ebtables --concurrent -t broute -D BROUTING -p 0xbeed -j DROP 2> /dev/null
|
||||
ebtables --concurrent -t broute -I BROUTING -p 0xbeed -j DROP
|
||||
}
|
||||
|
||||
xdsl_stop() {
|
||||
return 0
|
||||
}
|
||||
|
||||
xdsl_init() {
|
||||
readonly need_xdsl="$(jsonfilter -i /etc/board.json -e @.dsl)"
|
||||
[ "$need_xdsl" = "" ] && exit 0
|
||||
|
||||
echo "Starting DSL"
|
||||
}
|
||||
270
dslmngr/files/airoha/sbin/xdsl_wan
Executable file
270
dslmngr/files/airoha/sbin/xdsl_wan
Executable file
@@ -0,0 +1,270 @@
|
||||
#!/bin/sh
|
||||
|
||||
source "/lib/functions.sh"
|
||||
source "/lib/functions/network.sh"
|
||||
source "/lib/functions/system.sh"
|
||||
|
||||
PREVLINK=""
|
||||
LINK=""
|
||||
LINKSPEED=""
|
||||
PREVWANMODE=""
|
||||
WANMODE=""
|
||||
CONFIGURED=0
|
||||
CINDEX=0
|
||||
WANPORT="$(jsonfilter -i /etc/board.json -e @.network.wan.device)"
|
||||
|
||||
delete_atm_device() {
|
||||
/userfs/bin/blapi_cmd xdsl atm_delete_interface $CINDEX
|
||||
CINDEX=$((CINDEX+1))
|
||||
}
|
||||
|
||||
delete_atm_devices() {
|
||||
CINDEX=0
|
||||
config_load dsl
|
||||
config_foreach delete_atm_device atm-device
|
||||
}
|
||||
|
||||
configure_atm_device() {
|
||||
local vpi vci encapsulation qos_class pcr mbs scr
|
||||
local encap qos ethmac
|
||||
|
||||
config_get vpi $1 vpi "8"
|
||||
config_get vci $1 vci "35"
|
||||
config_get encapsulation $1 encapsulation "llc"
|
||||
config_get qos_class $1 qos_class "ubr"
|
||||
config_get pcr $1 pcr "0"
|
||||
config_get mbs $1 mbs "0"
|
||||
config_get scr $1 scr "0"
|
||||
|
||||
case $encapsulation in # llc, vcmux
|
||||
vcmux)
|
||||
encap="1483 Bridged IP VC-Mux"
|
||||
;;
|
||||
*)
|
||||
encap="1483 Bridged IP LLC"
|
||||
;;
|
||||
|
||||
esac
|
||||
|
||||
ethmac="$(echo -n "$(macaddr_add 02:AA:BB:01:23:40 $((CINDEX+2)))" | sed 's#:##g')"
|
||||
|
||||
/userfs/bin/blapi_cmd xdsl create_device $CINDEX ATM "" "$ethmac"
|
||||
/userfs/bin/blapi_cmd xdsl atm_create_interface $CINDEX ATM "$qos_class" "$encap" "$vpi" "$vci" "$pcr" "$scr" "$mbs" 0
|
||||
|
||||
CINDEX=$((CINDEX+1))
|
||||
}
|
||||
|
||||
create_atm_devices() {
|
||||
delete_atm_devices
|
||||
|
||||
CINDEX=0
|
||||
config_foreach configure_atm_device atm-device
|
||||
}
|
||||
|
||||
configure_line() {
|
||||
local mode profile bitswap sra us0 sesdrop sos roc ginp gvector mod prof
|
||||
local adsl1_flag=0 issue2_flag=0 Glite_flag=0 adsl2_flag=0 adsl2p_flag=0 vdsl2_flag=0
|
||||
local pro_8a_flag=0 pro_8b_flag=0 pro_8c_flag=0 pro_8d_flag=0 pro_12a_flag=0 pro_12b_flag=0 pro_17a_flag=0 pro_30a_flag=0 pro_35b_flag=0
|
||||
|
||||
config_get mode $1 mode "vdsl2"
|
||||
config_get profile $1 profile "35b"
|
||||
config_get bitswap $1 bitswap "1"
|
||||
config_get sra $1 sra "1"
|
||||
config_get us0 $1 us0 "1"
|
||||
config_get sos $1 sos "0"
|
||||
config_get roc $1 roc "0"
|
||||
config_get ginp $1 ginp "1"
|
||||
config_get gvector $1 gvector "1"
|
||||
|
||||
for mod in $mode; do
|
||||
[ "$mod" = "gdmt" ] && adsl1_flag=1
|
||||
[ "$mod" = "glite" ] && Glite_flag=1
|
||||
[ "$mod" = "t1413" ] && issue2_flag=1
|
||||
[ "$mod" = "adsl2" ] && adsl2_flag=1
|
||||
[ "$mod" = "adsl2p" ] && adsl2p_flag=1
|
||||
[ "$mod" = "vdsl2" ] && vdsl2_flag=1
|
||||
done
|
||||
|
||||
for prof in $profile; do
|
||||
[ "$prof" = "8a" ] && pro_8a_flag=1
|
||||
[ "$prof" = "8b" ] && pro_8b_flag=1
|
||||
[ "$prof" = "8c" ] && pro_8c_flag=1
|
||||
[ "$prof" = "8d" ] && pro_8d_flag=1
|
||||
[ "$prof" = "12a" ] && pro_12a_flag=1
|
||||
[ "$prof" = "12b" ] && pro_12b_flag=1
|
||||
[ "$prof" = "17a" ] && pro_17a_flag=1
|
||||
[ "$prof" = "30a" ] && pro_30a_flag=1
|
||||
[ "$prof" = "35b" ] && pro_35b_flag=1
|
||||
done
|
||||
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_profile "$pro_8a_flag" "$pro_8b_flag" "$pro_8c_flag" "$pro_8d_flag" "$pro_12a_flag" "$pro_12b_flag" "$pro_17a_flag" "$pro_30a_flag" "$pro_35b_flag"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_mode "$adsl1_flag" "$issue2_flag" "$Glite_flag" "$adsl2_flag" "$adsl2p_flag" "$vdsl2_flag"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_gvector "$((!gvector))"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_ginp "$((!ginp))"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_sos_roc "$((!sos))" "$((!roc))"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_us0 "$((!us0))"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_sra "$((!sra))"
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_bitswap "$((!bitswap))"
|
||||
|
||||
CONFIGURED=1
|
||||
}
|
||||
|
||||
configure_lines() {
|
||||
config_load dsl
|
||||
config_foreach configure_line dsl-line
|
||||
}
|
||||
|
||||
call_wan_hotplug() {
|
||||
# initializations
|
||||
local updown="$1"
|
||||
local ethwan="$2"
|
||||
|
||||
# ethernet hotlugs expect LINK and PORT environment variables set
|
||||
env -i LINK="$updown" PORT="$ethwan" /sbin/hotplug-call ethernet
|
||||
}
|
||||
|
||||
if [ "$WANPORT" = "ae_wan" -a -f /proc/device-tree/ae_wan/wan-dsl ]; then
|
||||
/etc/init.d/br2684ctl stop
|
||||
else
|
||||
/etc/init.d/br2684ctl start
|
||||
fi
|
||||
|
||||
# Wait for nas0 interface to come up.
|
||||
while [ "$(devstatus "$WANPORT" | jsonfilter -e @.up)" != "true" ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
while [ true ]; do
|
||||
LINK="$(awk '/ADSL link status:/{print $4}' /proc/tc3162/adsl_stats)"
|
||||
[ \( "$LINK" = "down" -o "$LINK" = "up" \) ] && break
|
||||
sleep 1
|
||||
done
|
||||
sleep 2
|
||||
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_sysvid "26 00 47 4E 58 53 00 00" # GNXS vendor id
|
||||
/userfs/bin/blapi_cmd xdsl set_adsl_version "$(ubus call fwbank dump | jsonfilter -e "@.bank[@.active=true].swver" | cut -f1 -d'_' | cut -f1 -d'-' | hexdump -e '11/1 "%02x " "\n"' | head -n1)"
|
||||
/userfs/bin/blapi_cmd xdsl set_power_up_down 1
|
||||
/userfs/bin/blapi_cmd xdsl set_power_up_down 0
|
||||
sleep 1
|
||||
|
||||
while [ true ]; do
|
||||
LINK="$(awk '/ADSL link status:/{print $4}' /proc/tc3162/adsl_stats)"
|
||||
|
||||
if [ "$LINK" != "$PREVLINK" -a \( "$LINK" = "down" -o "$LINK" = "up" \) ]; then
|
||||
if [ "$LINK" = "down" ]; then
|
||||
if [ ! -s /tmp/qos/wan_link_shape_rate ]; then
|
||||
rm -rf /tmp/qos/wan_link_shape_rate
|
||||
rm -rf /tmp/qos/wan_link_speed
|
||||
/usr/sbin/qos-uplink-bandwidth
|
||||
fi
|
||||
|
||||
[ "$CONFIGURED" -eq 0 ] && configure_lines # Needs to be done once the slave SoC is in down state and we've not been able to auto-sync.
|
||||
if [ -n "$WANMODE" ]; then
|
||||
if [ "$WANMODE" = "PTM" ]; then
|
||||
/userfs/bin/blapi_cmd xdsl ptm_do_reset_sequence 0 1
|
||||
else
|
||||
delete_atm_devices
|
||||
fi
|
||||
fi
|
||||
|
||||
call_wan_hotplug "down" "$WANPORT"
|
||||
else
|
||||
CONFIGURED=1
|
||||
WANMODE="$(awk '/TPSTC type:/{print $4}' /proc/tc3162/adsl_stats)"
|
||||
if [ "$WANMODE" != "$PREVWANMODE" ]; then
|
||||
OLDWANPORT="$WANPORT"
|
||||
network_defer_device "$OLDWANPORT"
|
||||
|
||||
if [ -f /proc/device-tree/ae_wan/wan-dsl ]; then
|
||||
WANPORT="ae_wan"
|
||||
else
|
||||
WANPORT="nas10"
|
||||
fi
|
||||
|
||||
if [ "$WANMODE" = "PTM" ]; then
|
||||
/etc/init.d/br2684ctl stop
|
||||
delete_atm_devices
|
||||
/userfs/bin/blapi_cmd system set_wan_mode 1
|
||||
/userfs/bin/blapi_cmd xdsl reload_ko 2
|
||||
/userfs/bin/blapi_cmd xdsl ptm_do_reset_sequence 1 2
|
||||
|
||||
# Set extended TPID for PTM packet flow
|
||||
sys memwl 1FB50000 81001839
|
||||
# VLAN TPID - VLAN
|
||||
sys memwl 1FB50F18 8100
|
||||
|
||||
ifconfig ${WANPORT} mtu 1500
|
||||
else
|
||||
/userfs/bin/blapi_cmd system set_wan_mode 0
|
||||
/userfs/bin/blapi_cmd xdsl reload_ko 1
|
||||
/etc/init.d/br2684ctl start
|
||||
|
||||
# Set extended TPID for ATM packet flow
|
||||
sys memwl 1FB50000 884C1839
|
||||
# VLAN TPID - MPOA
|
||||
sys memwl 1FB50F18 884C
|
||||
|
||||
ifconfig ${WANPORT} mtu 1982
|
||||
ifconfig ${WANPORT} down up
|
||||
|
||||
OLDWANPORT="$WANPORT"
|
||||
ATMINDEX="$(cat /sys/class/atm/TSARM*/atmindex | tail -n1 2> /dev/null)"
|
||||
WANPORT="nas$((ATMINDEX))"
|
||||
fi
|
||||
|
||||
if [ "$OLDWANPORT" != "$WANPORT" ]; then
|
||||
call_wan_hotplug "down" "$OLDWANPORT"
|
||||
|
||||
FILES="$(grep "$OLDWANPORT" /etc/config/* | cut -f1 -d: | uniq | cut -f4 -d/ | xargs)"
|
||||
for FILE in $FILES; do
|
||||
sed -i -e "s#${OLDWANPORT}#${WANPORT}#g" "/etc/config/${FILE}"
|
||||
"/etc/init.d/${FILE}" restart
|
||||
done
|
||||
else
|
||||
/etc/init.d/network restart
|
||||
fi
|
||||
ifconfig ${OLDWANPORT} down up
|
||||
fi
|
||||
|
||||
if [ "$WANMODE" = "PTM" ]; then
|
||||
: # ToDo
|
||||
else
|
||||
create_atm_devices
|
||||
fi
|
||||
|
||||
call_wan_hotplug "up" "$WANPORT"
|
||||
PREVWANMODE="$WANMODE"
|
||||
|
||||
if [ ! -s /tmp/qos/wan_link_shape_rate ]; then
|
||||
LINKSPEED="$(awk '/far-end interleaved channel bit rate/{print $6}' /proc/tc3162/adsl_stats)"
|
||||
LINKSPEED=$((LINKSPEED))
|
||||
if [ "$LINKSPEED" -eq 0 ]; then
|
||||
LINKSPEED="$(awk '/far-end fast channel bit rate/{print $6}' /proc/tc3162/adsl_stats)"
|
||||
LINKSPEED=$((LINKSPEED))
|
||||
fi
|
||||
|
||||
if [ "$LINKSPEED" -ne 0 ]; then
|
||||
mkdir -p /tmp/qos
|
||||
touch /tmp/qos/wan_link_shape_rate
|
||||
|
||||
/userfs/bin/qosrule discpline Rate uplink-bandwidth ${LINKSPEED}
|
||||
hw_nat -! > /dev/null 2>&1
|
||||
else
|
||||
rm -rf /tmp/qos/wan_link_speed
|
||||
/usr/sbin/qos-uplink-bandwidth
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Toggle link state
|
||||
network_defer_device "$WANPORT"
|
||||
network_ready_device "$WANPORT"
|
||||
|
||||
# We are only interested in the transtion from init -> up/down and up/down -> down/up and vice versa.
|
||||
# Since we poll the status via in-band signaling packets might get lost and the /procfs file is empty.
|
||||
# This state we don't want to handle as it will toggle the link and do a re-setup which is totally unnecessary and unwanted.
|
||||
PREVLINK="$LINK"
|
||||
fi
|
||||
|
||||
sleep 5
|
||||
done
|
||||
@@ -25,6 +25,7 @@ config dsl-line line
|
||||
list profile 12b
|
||||
list profile 17a
|
||||
list profile 30a
|
||||
list profile 35b
|
||||
option bitswap 1
|
||||
option sra 1
|
||||
option us0 1 # VDSL2 only
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethmngr
|
||||
PKG_VERSION:=3.0.7
|
||||
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:=171cf63d972c6fa81b97281531e457a0967c16c7
|
||||
PKG_SOURCE_VERSION:=0283fb5cb74a7baca46c4360da680757c57c86ac
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -10,19 +10,14 @@ 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_BUILD_PARALLEL:=1
|
||||
|
||||
@@ -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)))
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewallmngr
|
||||
PKG_VERSION:=1.0.9
|
||||
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:=77ad8425b73a3ac63f6160dc217635394ac87907
|
||||
PKG_SOURCE_VERSION:=30319c67fb4db285a2bcd272b1c10bc040eecf19
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
ZONE_NAME_FILE="/tmp/service_fw_zone"
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t firewall.service -p info
|
||||
}
|
||||
@@ -17,6 +19,37 @@ exec_cmd() {
|
||||
return 0
|
||||
}
|
||||
|
||||
collect_zone_name() {
|
||||
local name network
|
||||
|
||||
config_get name "${1}" name ""
|
||||
if [ -z "${name}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
config_get network "${1}" network ""
|
||||
for i in ${network}; do
|
||||
var="${i}_zone"
|
||||
echo "${var}=${name}" >> "${ZONE_NAME_FILE}"
|
||||
done
|
||||
}
|
||||
|
||||
load_zone_names() {
|
||||
rm -f "${ZONE_NAME_FILE}"
|
||||
config_foreach collect_zone_name zone
|
||||
}
|
||||
|
||||
get_firewall_zone() {
|
||||
if [ ! -f "${ZONE_NAME_FILE}" ]; then
|
||||
echo ""
|
||||
return
|
||||
fi
|
||||
|
||||
var="${1}_zone="
|
||||
name="$(cat ${ZONE_NAME_FILE} | grep ${var} | head -n 1 | cut -d'=' -f 2)"
|
||||
echo "${name}"
|
||||
}
|
||||
|
||||
add_iptable_rule() {
|
||||
chain_name=$1
|
||||
protocol=$2
|
||||
@@ -135,9 +168,14 @@ add_service() {
|
||||
fi
|
||||
|
||||
action=$(echo "${target}" | tr a-z A-Z)
|
||||
chain_name="zone_${interface}_input"
|
||||
res=0
|
||||
zone_name="$(get_firewall_zone ${interface})"
|
||||
if [ -z "${zone_name}" ]; then
|
||||
log "Rule can not be added without zone name for interface ${interface}"
|
||||
return
|
||||
fi
|
||||
|
||||
chain_name="zone_${zone_name}_input"
|
||||
res=0
|
||||
count=$(echo "${proto}" | sed -n "/-1/p" | wc -l)
|
||||
|
||||
if [ "${count}" -eq 0 ]; then
|
||||
@@ -160,4 +198,9 @@ add_service() {
|
||||
}
|
||||
|
||||
config_load firewall
|
||||
|
||||
load_zone_names
|
||||
|
||||
config_foreach add_service "service"
|
||||
|
||||
rm -f "${ZONE_NAME_FILE}"
|
||||
|
||||
@@ -5,15 +5,16 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fluent-bit
|
||||
PKG_VERSION:=4.0.2
|
||||
PKG_VERSION:=4.0.4
|
||||
PKG_RELEASE:=$(AUTORELEASE)
|
||||
|
||||
LOCAL_DEV:=0
|
||||
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_URL_FILE:=v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/fluent/fluent-bit/archive/refs/tags/
|
||||
PKG_HASH:=aa0577ba7251081c8d5398b2a905b5b0585bb657ca13b39a5e12931437516f08
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
@@ -55,7 +56,7 @@ CMAKE_OPTIONS+= \
|
||||
-DFLB_BACKTRACE=No \
|
||||
-DFLB_KAFKA=No \
|
||||
-DFLB_WASM=No \
|
||||
-DFLB_LUAJIT=Yes
|
||||
-DFLB_LUAJIT=No
|
||||
|
||||
# In plugins
|
||||
CMAKE_OPTIONS += \
|
||||
@@ -65,15 +66,15 @@ CMAKE_OPTIONS += \
|
||||
-DFLB_IN_DISK=Yes \
|
||||
-DFLB_IN_EXEC=Yes \
|
||||
-DFLB_IN_HEAD=Yes \
|
||||
-DFLB_IN_KMSG=Yes \
|
||||
-DFLB_IN_TAIL=Yes \
|
||||
-DFLB_IN_FORWARD=No \
|
||||
-DFLB_IN_KMSG=No \
|
||||
-DFLB_IN_PROC=No \
|
||||
-DFLB_IN_RANDOM=No \
|
||||
-DFLB_IN_SERIAL=No \
|
||||
-DFLB_IN_MQTT=No \
|
||||
-DFLB_IN_STDIN=No \
|
||||
-DFLB_IN_SYSTEMD=No \
|
||||
-DFLB_IN_TAIL=No \
|
||||
-DFLB_IN_TCP=No \
|
||||
-DFLB_IN_THERMAL=No \
|
||||
-DFLB_IN_UDP=No \
|
||||
@@ -103,10 +104,10 @@ CMAKE_OPTIONS += \
|
||||
|
||||
# Filter options
|
||||
CMAKE_OPTIONS += \
|
||||
-DFLB_FILTER_LUA=Yes \
|
||||
-DFLB_FILTER_AWS=No \
|
||||
-DFLB_FILTER_ECS=No \
|
||||
-DFLB_FILTER_KUBERNETES=No \
|
||||
-DFLB_FILTER_LUA=No \
|
||||
-DFLB_FILTER_NEST=No \
|
||||
-DFLB_FILTER_RECORD_MODIFIER=No \
|
||||
-DFLB_FILTER_THROTTLE=No \
|
||||
@@ -170,6 +171,7 @@ CMAKE_OPTIONS += \
|
||||
define Package/fluent-bit/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/fluent-bit
|
||||
$(INSTALL_DIR) $(1)/etc/fluent-bit/conf.d
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/bin/fluent-bit $(1)/usr/sbin/
|
||||
$(INSTALL_DATA) ./files/fluent-bit.conf $(1)/etc/fluent-bit/fluent-bit.conf
|
||||
$(INSTALL_DATA) $(PKG_BUILD_DIR)/conf/parsers.conf $(1)/etc/fluent-bit/parsers.conf
|
||||
|
||||
@@ -9,6 +9,10 @@
|
||||
tag syslog
|
||||
path /dev/log
|
||||
|
||||
[INPUT]
|
||||
name kmsg
|
||||
tag kernel
|
||||
|
||||
[OUTPUT]
|
||||
name null
|
||||
match *
|
||||
|
||||
@@ -1,45 +0,0 @@
|
||||
diff --git a/plugins/out_file/file.c b/plugins/out_file/file.c
|
||||
index 2e47c9666..95d28e438 100644
|
||||
--- a/plugins/out_file/file.c
|
||||
+++ b/plugins/out_file/file.c
|
||||
@@ -27,6 +27,7 @@
|
||||
#include <msgpack.h>
|
||||
|
||||
#include <stdio.h>
|
||||
+#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <fcntl.h>
|
||||
@@ -55,6 +56,7 @@ struct flb_file_conf {
|
||||
int csv_column_names;
|
||||
int mkdir;
|
||||
struct flb_output_instance *ins;
|
||||
+ char hostname[256];
|
||||
};
|
||||
|
||||
static char *check_delimiter(const char *str)
|
||||
@@ -141,6 +143,9 @@ static int cb_file_init(struct flb_output_instance *ins,
|
||||
}
|
||||
}
|
||||
|
||||
+ if (gethostname(ctx->hostname, sizeof(ctx->hostname)) != 0)
|
||||
+ snprintf(ctx->hostname, sizeof(ctx->hostname), "%s", "localhost");
|
||||
+
|
||||
tmp = flb_output_get_property("delimiter", ins);
|
||||
ret_str = check_delimiter(tmp);
|
||||
if (ret_str != NULL) {
|
||||
@@ -233,12 +238,8 @@ static int template_output_write(struct flb_file_conf *ctx,
|
||||
int i;
|
||||
msgpack_object_kv *kv;
|
||||
|
||||
- /*
|
||||
- * Right now we treat "{time}" specially and fill the placeholder
|
||||
- * with the metadata timestamp (formatted as float).
|
||||
- */
|
||||
- if (!strncmp(key, "time", size)) {
|
||||
- fprintf(fp, "%f", flb_time_to_double(tm));
|
||||
+ if (!strncmp(key, "hostname", size)) {
|
||||
+ fprintf(fp, "%s", ctx->hostname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
27
fluent-bit/patches/0002-file_out_time.patch
Normal file
27
fluent-bit/patches/0002-file_out_time.patch
Normal file
@@ -0,0 +1,27 @@
|
||||
diff --git a/plugins/out_file/file.c b/plugins/out_file/file.c
|
||||
index 77baf6be8..04c519d5a 100644
|
||||
--- a/plugins/out_file/file.c
|
||||
+++ b/plugins/out_file/file.c
|
||||
@@ -238,10 +238,20 @@ static int template_output_write(struct flb_file_conf *ctx,
|
||||
|
||||
/*
|
||||
* Right now we treat "{time}" specially and fill the placeholder
|
||||
- * with the metadata timestamp (formatted as float).
|
||||
+ * with the metadata timestamp.
|
||||
*/
|
||||
if (!strncmp(key, "time", size)) {
|
||||
- fprintf(fp, "%f", flb_time_to_double(tm));
|
||||
+ struct tm tm_local;
|
||||
+ char buf[32];
|
||||
+ if (localtime_r(&tm->tm.tv_sec, &tm_local) == NULL) {
|
||||
+ flb_plg_error(ctx->ins, "localtime_r failed");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (strftime(buf, sizeof(buf), "%b %d %H:%M:%S", &tm_local) == 0) {
|
||||
+ flb_plg_error(ctx->ins, "strftime failed");
|
||||
+ return -1;
|
||||
+ }
|
||||
+ fputs(buf, fp);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
diff --git a/lib/luajit-cmake/LuaJIT.cmake b/lib/luajit-cmake/LuaJIT.cmake
|
||||
index 4ad1ef565..c0dee5830 100644
|
||||
--- a/lib/luajit-cmake/LuaJIT.cmake
|
||||
+++ b/lib/luajit-cmake/LuaJIT.cmake
|
||||
@@ -426,10 +426,17 @@ execute_process(
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
)
|
||||
|
||||
-if (GIT_EXISTENCE EQUAL 0)
|
||||
+execute_process(
|
||||
+ COMMAND git rev-parse --is-inside-work-tree
|
||||
+ RESULT_VARIABLE GIT_IN_REPOSITORY
|
||||
+ OUTPUT_VARIABLE GIT_IS_IN_REPOSITORY
|
||||
+ OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
+)
|
||||
+
|
||||
+if ((GIT_EXISTENCE EQUAL 0) AND (GIT_IN_REPOSITORY EQUAL 0))
|
||||
message(STATUS "Using Git: ${GIT_VERSION}")
|
||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
|
||||
- COMMAND git show -s --format=${GIT_FORMAT} > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
|
||||
+ COMMAND git -c log.showSignature=false show -s --format=${GIT_FORMAT} > ${CMAKE_CURRENT_BINARY_DIR}/luajit_relver.txt
|
||||
WORKING_DIRECTORY ${LUAJIT_DIR}
|
||||
)
|
||||
else()
|
||||
@@ -0,0 +1,47 @@
|
||||
diff --git a/plugins/out_syslog/syslog.c b/plugins/out_syslog/syslog.c
|
||||
index 4ecc7c4ac..cfe568245 100644
|
||||
--- a/plugins/out_syslog/syslog.c
|
||||
+++ b/plugins/out_syslog/syslog.c
|
||||
@@ -776,12 +776,42 @@ static flb_sds_t syslog_format(struct flb_syslog *ctx, msgpack_object *o,
|
||||
}
|
||||
|
||||
if (ctx->parsed_mode != FLB_SYSLOG_UDP) {
|
||||
+ unsigned int msg_len = 0;
|
||||
+
|
||||
+ /* Create new SDS for length prefix */
|
||||
+ flb_sds_t prefix = flb_sds_create_size(ctx->maxsize + 32);
|
||||
+ if (!prefix) {
|
||||
+ ret_sds = NULL;
|
||||
+ goto clean;
|
||||
+ }
|
||||
+
|
||||
+ /* Add newline also to make behaviour similar to syslog-ng */
|
||||
tmp = flb_sds_cat(*s, "\n", 1);
|
||||
if (!tmp) {
|
||||
+ flb_sds_destroy(prefix);
|
||||
ret_sds = NULL;
|
||||
goto clean;
|
||||
}
|
||||
*s = tmp;
|
||||
+
|
||||
+ msg_len = flb_sds_len(*s);
|
||||
+ tmp = flb_sds_printf(&prefix, "%u ", msg_len);
|
||||
+ if (!tmp) {
|
||||
+ flb_sds_destroy(prefix);
|
||||
+ ret_sds = NULL;
|
||||
+ goto clean;
|
||||
+ }
|
||||
+ prefix = tmp;
|
||||
+
|
||||
+ tmp = flb_sds_cat(prefix, *s, msg_len);
|
||||
+ if (!tmp) {
|
||||
+ flb_sds_destroy(prefix);
|
||||
+ ret_sds = NULL;
|
||||
+ goto clean;
|
||||
+ }
|
||||
+
|
||||
+ flb_sds_destroy(*s);
|
||||
+ *s = tmp;
|
||||
}
|
||||
}
|
||||
else {
|
||||
73
fluent-bit/patches/0020-fix_kmsg.patch
Normal file
73
fluent-bit/patches/0020-fix_kmsg.patch
Normal file
@@ -0,0 +1,73 @@
|
||||
diff --git a/plugins/in_kmsg/in_kmsg.c b/plugins/in_kmsg/in_kmsg.c
|
||||
index cd5c4cd17..15f105451 100644
|
||||
--- a/plugins/in_kmsg/in_kmsg.c
|
||||
+++ b/plugins/in_kmsg/in_kmsg.c
|
||||
@@ -36,7 +36,6 @@
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <inttypes.h>
|
||||
-#include <time.h>
|
||||
|
||||
#include "in_kmsg.h"
|
||||
|
||||
@@ -123,12 +122,17 @@ static inline int process_line(const char *line,
|
||||
ctx->buffer_id++;
|
||||
|
||||
errno = 0;
|
||||
- val = strtol(p, &end, 10);
|
||||
- if ((errno == ERANGE && (val == INT_MAX || val == INT_MIN))
|
||||
+ val = strtoul(p, &end, 10);
|
||||
+ if ((errno == ERANGE && val == ULONG_MAX)
|
||||
|| (errno != 0 && val == 0)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ /* ensure something was consumed */
|
||||
+ if (end == p) {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
/* Priority */
|
||||
priority = FLB_KLOG_PRI(val);
|
||||
|
||||
@@ -144,24 +148,35 @@ static inline int process_line(const char *line,
|
||||
}
|
||||
p++;
|
||||
|
||||
- val = strtoul(p, &end, 10);
|
||||
- if ((errno == ERANGE && (val == INT_MAX || val == INT_MIN))
|
||||
+ val = strtoull(p, &end, 10);
|
||||
+ if ((errno == ERANGE && val == ULLONG_MAX)
|
||||
|| (errno != 0 && val == 0)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ /* make sure strtoull consumed something */
|
||||
+ /* after the sequence number, the next char must be ',' */
|
||||
+ if (end == p || *end != ',') {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
sequence = val;
|
||||
p = ++end;
|
||||
|
||||
/* Timestamp */
|
||||
- val = strtoul(p, &end, 10);
|
||||
- if ((errno == ERANGE && (val == INT_MAX || val == INT_MIN))
|
||||
+ val = strtoull(p, &end, 10);
|
||||
+ if ((errno == ERANGE && val == ULLONG_MAX)
|
||||
|| (errno != 0 && val == 0)) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
+ /* ensure something was consumed */
|
||||
+ if (end == p) {
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
tv.tv_sec = val/1000000;
|
||||
- tv.tv_usec = val - (tv.tv_sec * 1000000);
|
||||
+ tv.tv_usec = val - ((uint64_t)tv.tv_sec * 1000000);
|
||||
|
||||
flb_time_set(&ts, ctx->boot_time.tv_sec + tv.tv_sec, tv.tv_usec * 1000);
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostmngr
|
||||
PKG_VERSION:=1.2.20
|
||||
PKG_VERSION:=1.4.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3948618fa8fa23a0ddc51632b0036dbd08e27696
|
||||
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
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.9.6
|
||||
PKG_VERSION:=9.10.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
|
||||
PKG_SOURCE_VERSION:=5dba542b280495730176da468bc45ed5dcc8c94e
|
||||
PKG_SOURCE_VERSION:=63251b6c9789b1428604af0a5c1d23d32d14a8b8
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -84,10 +84,12 @@ define Package/icwmp/install
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/icwmpd $(1)/usr/sbin/icwmpd
|
||||
$(INSTALL_DATA) ./files/etc/config/cwmp $(1)/etc/config/cwmp
|
||||
$(INSTALL_BIN) ./files/etc/init.d/icwmpd $(1)/etc/init.d/icwmpd
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/50-cwmp-align-keep-config $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-cwmp-set-userid $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/90-cwmpfirewall $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/95-set-random-inform-time $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/85-migrate-gw-info $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/999-cwmp-conn-config $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/vendor_log.sh $(1)/etc/icwmpd/vendor_log.sh
|
||||
$(INSTALL_BIN) ./files/etc/icwmpd/firewall.cwmp $(1)/etc/icwmpd/firewall.cwmp
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/icwmp $(1)/lib/upgrade/keep.d/icwmp
|
||||
|
||||
@@ -28,9 +28,9 @@ config cpe 'cpe'
|
||||
option log_severity 'WARNING'
|
||||
option log_file_name '/var/log/icwmpd.log'
|
||||
option log_max_size '102400'
|
||||
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
|
||||
@@ -42,7 +42,9 @@ config cpe 'cpe'
|
||||
option periodic_notify_interval '10'
|
||||
option incoming_rule 'Port_Only'
|
||||
option active_notif_throttle '0'
|
||||
option fw_upgrade_keep_settings '1'
|
||||
#option KeepConfig '1'
|
||||
#option KeepOpConf '1'
|
||||
#option ConfigScope 'UserOnly'
|
||||
option clock_sync_timeout '128'
|
||||
option disable_datatype_check '0'
|
||||
#list allowed_cr_ip '10.5.1.0/24'
|
||||
|
||||
@@ -1,14 +1,44 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
ZONE_NAME_FILE="/tmp/cwmp_fw_zone"
|
||||
|
||||
#created by the icwmp package
|
||||
log() {
|
||||
echo "${@}"|logger -t firewall.cwmp -p info
|
||||
}
|
||||
|
||||
collect_zone_name() {
|
||||
local name network
|
||||
|
||||
config_get name "${1}" name ""
|
||||
if [ -z "${name}" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
config_get network "${1}" network ""
|
||||
for i in ${network}; do
|
||||
var="${i}_zone"
|
||||
echo "${var}=${name}" >> "${ZONE_NAME_FILE}"
|
||||
done
|
||||
}
|
||||
|
||||
load_zone_names() {
|
||||
rm -f "${ZONE_NAME_FILE}"
|
||||
config_load firewall
|
||||
config_foreach collect_zone_name zone
|
||||
}
|
||||
|
||||
get_firewall_zone() {
|
||||
zone="$(uci show firewall|grep network|grep -w "${1}"|cut -d. -f 2)"
|
||||
zone="${zone:-wan}" # defaults to wan zone
|
||||
echo "$zone"
|
||||
if [ ! -f "${ZONE_NAME_FILE}" ]; then
|
||||
echo ""
|
||||
return
|
||||
fi
|
||||
|
||||
var="${1}_zone="
|
||||
name="$(cat ${ZONE_NAME_FILE} | grep ${var} | head -n 1 | cut -d'=' -f 2)"
|
||||
echo "${name}"
|
||||
}
|
||||
|
||||
cleanup_upstream_rules() {
|
||||
@@ -103,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}"
|
||||
|
||||
@@ -145,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
|
||||
@@ -167,6 +247,10 @@ 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
|
||||
configure_connection_req_rules "$@"
|
||||
rm -f "${ZONE_NAME_FILE}"
|
||||
|
||||
@@ -16,79 +16,6 @@ log() {
|
||||
echo "${@}"|logger -t cwmp.init -p info
|
||||
}
|
||||
|
||||
regenerate_ssl_link() {
|
||||
local cert_dir
|
||||
|
||||
cert_dir="${1%/}"
|
||||
if [ -f "${cert_dir}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# do not generate the c_rehash if its system default cert path
|
||||
# ca-certificate package already generates c_rehash on compilation
|
||||
[ ! -d "${cert_dir}" ] || [ "${cert_dir}" = "/etc/ssl/certs" ] && return 0
|
||||
|
||||
generate_links() {
|
||||
local file_type="$1"
|
||||
local files="${cert_dir}"/*."${file_type}"
|
||||
for cfile in ${files}; do
|
||||
if [ -f "${cfile}" ]; then
|
||||
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
|
||||
if [ ! -f "${cert_dir}/${rehash}.0" ]; then
|
||||
log "Generating c_rehash for ${cfile}=>${rehash}.0"
|
||||
ln -s "${cfile}" "${cert_dir}/${rehash}.0"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
generate_links "pem"
|
||||
}
|
||||
|
||||
enable_dhcp_option43() {
|
||||
local wan="${1}"
|
||||
|
||||
### Ask for DHCP Option 43 only if CWMP is enabled ###
|
||||
local reqopts="$(uci -q get network."${wan}".reqopts)"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
local newreqopts=""
|
||||
local option43_present=0
|
||||
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
43) option43_present=1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ${option43_present} -eq 1 ]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
newreqopts="$reqopts 43"
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
uci commit network
|
||||
ubus call network reload
|
||||
fi
|
||||
}
|
||||
|
||||
set_vendor_id() {
|
||||
local wan="${1}"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
vendorid="$(uci -q get network."${wan}".vendorid)"
|
||||
if [ -z "${vendorid}" ]; then
|
||||
uci -q set network."${wan}".vendorid="dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
elif [[ $vendorid != *"dslforum.org"* ]]; then
|
||||
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
|
||||
ubus call uci commit '{"config":"network"}'
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
wait_for_resolvfile() {
|
||||
local time=$1
|
||||
local tm=1
|
||||
@@ -170,7 +97,9 @@ validate_cpe_section()
|
||||
'periodic_notify_enable:bool' \
|
||||
'enable:bool:1' \
|
||||
'periodic_notify_interval:uinteger' \
|
||||
'fw_upgrade_keep_settings:bool'
|
||||
'KeepConfig:bool' \
|
||||
'KeepOpConf:bool' \
|
||||
'ConfigScope:string'
|
||||
}
|
||||
|
||||
validate_defaults() {
|
||||
@@ -211,28 +140,6 @@ validate_defaults() {
|
||||
}
|
||||
|
||||
boot() {
|
||||
local dhcp_discovery wan_interface skip_dhcp_boot_options
|
||||
|
||||
config_load cwmp
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
config_get dhcp_discovery acs dhcp_discovery "0"
|
||||
config_get skip_dhcp_boot_options acs skip_dhcp_boot_options "0"
|
||||
|
||||
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
|
||||
if [ "${skip_dhcp_boot_options}" -ne 1 ]; then
|
||||
# Set dhcp option 43 if not already configured
|
||||
enable_dhcp_option43 "${wan_interface}"
|
||||
# Set dhcp option 60
|
||||
set_vendor_id "${wan_interface}"
|
||||
fi
|
||||
fi
|
||||
|
||||
config_get ssl_capath acs ssl_capath
|
||||
|
||||
if [ -n "${ssl_capath}" ]; then
|
||||
regenerate_ssl_link "${ssl_capath}"
|
||||
fi
|
||||
|
||||
# Copy backup data so that if it restart latter on, it gets the info
|
||||
copy_cwmp_etc_files_to_varstate
|
||||
mkdir -p /var/run/icwmpd/
|
||||
@@ -263,13 +170,21 @@ start_service() {
|
||||
|
||||
stop_service()
|
||||
{
|
||||
local switch_bank
|
||||
local switch_bank KeepConfig KeepOpConf ConfigScope
|
||||
|
||||
copy_cwmp_varstate_files_to_etc
|
||||
|
||||
switch_bank=$(uci -q -c /var/state/ get icwmp.cpe.switch_bank)
|
||||
if [ -n "$switch_bank" ] && [ "$switch_bank" = "1" ]; then
|
||||
[ -x /etc/sysmngr/fwbank ] && /etc/sysmngr/fwbank call copy_config
|
||||
if [ "$switch_bank" = "1" ] && [ -x /etc/sysmngr/fwbank ]; then
|
||||
KeepConfig="$(uci -q get cwmp.cpe.KeepConfig)"
|
||||
KeepOpConf="$(uci -q get cwmp.cpe.KeepOpConf)"
|
||||
ConfigScope="$(uci -q get cwmp.cpe.ConfigScope)"
|
||||
|
||||
json_init
|
||||
[ -n "${KeepConfig}" ] && json_add_boolean "keep_config" "${KeepConfig}"
|
||||
[ -n "${KeepOpConf}" ] && json_add_boolean "keep_opconf" "${KeepOpConf}"
|
||||
[ -n "${ConfigScope}" ] && json_add_string "config_scope" "${ConfigScope}"
|
||||
|
||||
json_dump| /etc/sysmngr/fwbank call copy_config
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
7
icwmp/files/etc/uci-defaults/50-cwmp-align-keep-config
Normal file
7
icwmp/files/etc/uci-defaults/50-cwmp-align-keep-config
Normal file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
keep_settings="$(uci -q get cwmp.cpe.fw_upgrade_keep_settings)"
|
||||
if [ -n "${keep_settings}" ]; then
|
||||
uci -q delete cwmp.cpe.fw_upgrade_keep_settings
|
||||
uci -q set cwmp.cpe.KeepConfig="${keep_settings}"
|
||||
fi
|
||||
@@ -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
|
||||
|
||||
107
icwmp/files/etc/uci-defaults/999-cwmp-conn-config
Normal file
107
icwmp/files/etc/uci-defaults/999-cwmp-conn-config
Normal file
@@ -0,0 +1,107 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
log() {
|
||||
echo "${@}"|logger -t cwmp.defaults -p info
|
||||
}
|
||||
|
||||
set_vendor_id() {
|
||||
local wan="${1}"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
vendorid="$(uci -q get network."${wan}".vendorid)"
|
||||
if [ -z "${vendorid}" ]; then
|
||||
uci -q set network."${wan}".vendorid="dslforum.org"
|
||||
elif [[ $vendorid != *"dslforum.org"* ]]; then
|
||||
uci -q set network."${wan}".vendorid="${vendorid},dslforum.org"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dhcp_option43() {
|
||||
local wan="${1}"
|
||||
|
||||
local reqopts="$(uci -q get network."${wan}".reqopts)"
|
||||
local proto="$(uci -q get network."${wan}".proto)"
|
||||
local newreqopts=""
|
||||
local option43_present=0
|
||||
|
||||
for ropt in $reqopts; do
|
||||
case $ropt in
|
||||
43) option43_present=1 ;;
|
||||
*) ;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ ${option43_present} -eq 1 ]; then
|
||||
return;
|
||||
fi
|
||||
|
||||
newreqopts="$reqopts 43"
|
||||
if [ "${proto}" = "dhcp" ]; then
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
fi
|
||||
}
|
||||
|
||||
regenerate_ssl_link() {
|
||||
local cert_dir
|
||||
|
||||
cert_dir="${1%/}"
|
||||
if [ -f "${cert_dir}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# do not generate the c_rehash if its system default cert path
|
||||
# ca-certificate package already generates c_rehash on compilation
|
||||
[ ! -d "${cert_dir}" ] || [ "${cert_dir}" = "/etc/ssl/certs" ] && return 0
|
||||
|
||||
generate_links() {
|
||||
local file_type="$1"
|
||||
local files="${cert_dir}"/*."${file_type}"
|
||||
for cfile in ${files}; do
|
||||
if [ -f "${cfile}" ]; then
|
||||
rehash="$(openssl x509 -hash -noout -in "${cfile}")"
|
||||
if [ ! -f "${cert_dir}/${rehash}.0" ]; then
|
||||
log "Generating c_rehash for ${cfile}=>${rehash}.0"
|
||||
ln -s "${cfile}" "${cert_dir}/${rehash}.0"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
generate_links "pem"
|
||||
}
|
||||
|
||||
configure_dhcp_discovery() {
|
||||
local dhcp_discovery wan_interface skip_dhcp_boot_options
|
||||
|
||||
config_load cwmp
|
||||
config_get wan_interface cpe default_wan_interface "wan"
|
||||
config_get dhcp_discovery acs dhcp_discovery "0"
|
||||
config_get skip_dhcp_boot_options acs skip_dhcp_boot_options "0"
|
||||
|
||||
if [ "${dhcp_discovery}" = "enable" ] || [ "${dhcp_discovery}" = "1" ]; then
|
||||
if [ "${skip_dhcp_boot_options}" -ne 1 ]; then
|
||||
# Set dhcp option 43 if not already configured
|
||||
enable_dhcp_option43 "${wan_interface}"
|
||||
# Set dhcp option 60
|
||||
set_vendor_id "${wan_interface}"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
configure_ssl_path() {
|
||||
local ssl_capath
|
||||
|
||||
config_load cwmp
|
||||
config_get ssl_capath acs ssl_capath
|
||||
|
||||
if [ -n "${ssl_capath}" ]; then
|
||||
regenerate_ssl_link "${ssl_capath}"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_dhcp_discovery
|
||||
configure_ssl_path
|
||||
@@ -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
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
#
|
||||
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2025 Genexis Sweden AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ieee1905
|
||||
PKG_VERSION:=8.7.8
|
||||
PKG_VERSION:=8.7.44
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=9c507bfb7f45fad81097262f05dc7cd11760e6b0
|
||||
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
|
||||
@@ -105,6 +106,7 @@ TARGET_CFLAGS += -DHAS_UBUS
|
||||
|
||||
ifeq ($(CONFIG_IEEE1905_BUILD_TR181_PLUGIN),y)
|
||||
TARGET_CFLAGS += -DBUILD_TR181_PLUGIN
|
||||
TARGET_CFLAGS += -DBBF_VENDOR_PREFIX=\\\"$(CONFIG_BBF_VENDOR_PREFIX)\\\"
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += \
|
||||
@@ -114,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
|
||||
|
||||
23
ieee1905/files/datamodel_description.json
Normal file
23
ieee1905/files/datamodel_description.json
Normal 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"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@ config al-iface
|
||||
list ifname 'br-lan'
|
||||
list ifname '/eth.*'
|
||||
list ifname '/wl.*'
|
||||
list ifname '/ra.*'
|
||||
list ifname '/wds.*'
|
||||
|
||||
# ap sections are auto-generated/overwritten during onboarding
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions/system.sh
|
||||
|
||||
BMAC=$(db -q get hw.board.basemac)
|
||||
BMAC=$(get_mac_label)
|
||||
BMAC=${BMAC//:/}
|
||||
BMAC=${BMAC// /}
|
||||
BMAC=$(printf "%12.12X" $((0x$BMAC)))
|
||||
|
||||
[ "$BMAC" == "" ] && exit 1
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ PKG_NAME:=iopsys-analytics
|
||||
PKG_RELEASE:=$(COMMITCOUNT)
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=00189cea0a78b7a30dbfdd363b6d8e836437d1bc
|
||||
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
|
||||
@@ -31,8 +31,12 @@ define Package/$(PKG_NAME)
|
||||
+@PACKAGE_COLLECTD_ENCRYPTED_NETWORK \
|
||||
# remote syslog
|
||||
DEPENDS+= \
|
||||
+syslog-ng \
|
||||
+@SYSLOGNG_LOGROTATE \
|
||||
+@PACKAGE_syslog-ng:SYSLOGNG_LOGROTATE \
|
||||
+PACKAGE_fluent-bit:logrotate \
|
||||
+@DMCLI_REMOTE_CONNECTION
|
||||
# tools used in development/testing
|
||||
DEPENDS+= \
|
||||
+iperf3
|
||||
|
||||
endef
|
||||
|
||||
@@ -44,7 +48,13 @@ endef
|
||||
Build/Compile=
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(CP) -r $(PKG_BUILD_DIR)/files/* $(1)/
|
||||
$(CP) -r $(PKG_BUILD_DIR)/files/common/* $(1)/
|
||||
ifneq ($(CONFIG_PACKAGE_fluent-bit),)
|
||||
$(CP) -r $(PKG_BUILD_DIR)/files/fluent-bit/* $(1)/
|
||||
endif
|
||||
ifneq ($(CONFIG_PACKAGE_syslog-ng),)
|
||||
$(CP) -r $(PKG_BUILD_DIR)/files/syslog-ng/* $(1)/
|
||||
endif
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,$(PKG_NAME)))
|
||||
|
||||
@@ -6,13 +6,13 @@ include $(TOPDIR)/rules.mk
|
||||
include $(INCLUDE_DIR)/kernel.mk
|
||||
|
||||
PKG_NAME:=ipt-trigger
|
||||
PKG_VERSION:=1.0.2
|
||||
PKG_VERSION:=1.0.3
|
||||
PKG_LICENSE:=GPL-2.0
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=4f3d4427403e0a9be7653c1b92907ae8ae5f21ae
|
||||
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_MIRROR_HASH:=skip
|
||||
|
||||
55
json-schema-validator/Makefile
Normal file
55
json-schema-validator/Makefile
Normal file
@@ -0,0 +1,55 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=json-schema-validator
|
||||
PKG_VERSION:=2.3.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/pboettch/json-schema-validator.git
|
||||
PKG_SOURCE_VERSION:=$(PKG_VERSION)
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
PKG_BUILD_PARALLEL:=1
|
||||
PKG_INSTALL:=1
|
||||
|
||||
PKG_BUILD_DEPENDS:=nlohmann-json
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
CMAKE_OPTIONS += \
|
||||
-DJSON_VALIDATOR_BUILD_TESTS=OFF \
|
||||
-DJSON_VALIDATOR_BUILD_EXAMPLES=OFF \
|
||||
-DJSON_VALIDATOR_INSTALL=ON \
|
||||
-DJSON_VALIDATOR_SHARED_LIBS=OFF
|
||||
|
||||
define Package/json-schema-validator
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=JSON Schema Validator for nlohmann::json
|
||||
URL:=https://github.com/pboettch/json-schema-validator
|
||||
DEPENDS:=+libstdcpp +nlohmann-json
|
||||
endef
|
||||
|
||||
define Package/json-schema-validator/description
|
||||
A JSON Schema Validator for Modern C++ using nlohmann/json.
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/nlohmann
|
||||
$(CP) $(PKG_BUILD_DIR)/src/nlohmann/json-schema.hpp $(1)/usr/include/nlohmann/
|
||||
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/libnlohmann_json_schema_validator*.a $(1)/usr/lib/ 2>/dev/null || true
|
||||
$(CP) $(PKG_BUILD_DIR)/libnlohmann_json_schema_validator*.so* $(1)/usr/lib/ 2>/dev/null || true
|
||||
endef
|
||||
|
||||
define Package/json-schema-validator/install
|
||||
true
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,json-schema-validator))
|
||||
44
jsonval/Makefile
Normal file
44
jsonval/Makefile
Normal file
@@ -0,0 +1,44 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=jsonval
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_LICENSE:=MIT
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
define Package/jsonval
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Command-line JSON Schema Validator
|
||||
DEPENDS:=+nlohmann-json +json-schema-validator +libstdcpp
|
||||
endef
|
||||
|
||||
define Package/jsonval/description
|
||||
A small CLI tool to validate JSON files against a schema using json-schema-validator and nlohmann/json.
|
||||
endef
|
||||
|
||||
define Build/Prepare
|
||||
mkdir -p $(PKG_BUILD_DIR)
|
||||
cp -r ./src/* $(PKG_BUILD_DIR)/
|
||||
endef
|
||||
|
||||
define Build/Compile
|
||||
$(TARGET_CXX) \
|
||||
$(TARGET_CXXFLAGS) -std=c++17 \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/nlohmann \
|
||||
-L$(STAGING_DIR)/usr/lib \
|
||||
$(PKG_BUILD_DIR)/main.cpp \
|
||||
-o $(PKG_BUILD_DIR)/jsonval \
|
||||
-lnlohmann_json_schema_validator
|
||||
endef
|
||||
|
||||
define Package/jsonval/install
|
||||
$(INSTALL_DIR) $(1)/usr/bin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/jsonval $(1)/usr/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,jsonval))
|
||||
64
jsonval/src/main.cpp
Normal file
64
jsonval/src/main.cpp
Normal file
@@ -0,0 +1,64 @@
|
||||
#include <iostream>
|
||||
#include <fstream>
|
||||
#include <string>
|
||||
#include <nlohmann/json.hpp>
|
||||
#include <nlohmann/json-schema.hpp>
|
||||
|
||||
using nlohmann::json;
|
||||
using nlohmann::json_schema::json_validator;
|
||||
using namespace std;
|
||||
|
||||
void print_usage(const string& prog_name) {
|
||||
cerr << "Usage: " << prog_name << " -s <schema.json> -j <data.json>" << endl;
|
||||
}
|
||||
|
||||
int main(int argc, char* argv[]) {
|
||||
string schema_path, data_path;
|
||||
|
||||
// Simple argument parsing
|
||||
for (int i = 1; i < argc; ++i) {
|
||||
string arg = argv[i];
|
||||
if ((arg == "-s" || arg == "--schema") && i + 1 < argc) {
|
||||
schema_path = argv[++i];
|
||||
} else if ((arg == "-j" || arg == "--json") && i + 1 < argc) {
|
||||
data_path = argv[++i];
|
||||
} else {
|
||||
print_usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (schema_path.empty() || data_path.empty()) {
|
||||
print_usage(argv[0]);
|
||||
return 1;
|
||||
}
|
||||
|
||||
ifstream schema_file(schema_path);
|
||||
ifstream data_file(data_path);
|
||||
|
||||
if (!schema_file.is_open() || !data_file.is_open()) {
|
||||
cerr << "Error: Could not open one or both files." << endl;
|
||||
return 2;
|
||||
}
|
||||
|
||||
json schema, document;
|
||||
try {
|
||||
schema_file >> schema;
|
||||
data_file >> document;
|
||||
} catch (const json::parse_error& e) {
|
||||
cerr << "Parse error: " << e.what() << endl;
|
||||
return 3;
|
||||
}
|
||||
|
||||
try {
|
||||
json_validator validator;
|
||||
validator.set_root_schema(schema);
|
||||
validator.validate(document);
|
||||
cout << "Valid" << endl;
|
||||
} catch (const std::exception& e) {
|
||||
cerr << "Validation failed: " << e.what() << endl;
|
||||
return 4;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libdpp
|
||||
PKG_VERSION:=2.1.1
|
||||
PKG_VERSION:=2.1.3
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=6024efd3db9dd490c07465ea9b0c15120063165c
|
||||
PKG_SOURCE_VERSION:=fdfe23e51ff77ca6d2661ad6208d097758524147
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/libdpp.git
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libdsl
|
||||
PKG_VERSION:=7.2.100
|
||||
PKG_VERSION:=7.3.2
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=20875ec79fcc7c546c2f1253c867d6afbc8bff75
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/libdsl.git
|
||||
PKG_SOURCE_VERSION:=1aa9c40f9503311652e562617b1e15533257adcc
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -37,6 +37,9 @@ else ifeq ($(CONFIG_TARGET_x86),y)
|
||||
else ifeq ($(CONFIG_TARGET_armvirt),y)
|
||||
TARGET_PLATFORM=TEST
|
||||
TARGET_CFLAGS +=-DIOPSYS_TEST
|
||||
else ifeq ($(CONFIG_TARGET_airoha),y)
|
||||
TARGET_PLATFORM=AIROHA
|
||||
TARGET_CFLAGS +=-DIOPSYS_AIROHA
|
||||
endif
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
@@ -57,7 +60,7 @@ define Package/libdsl
|
||||
SUBMENU:=IOPSYS HAL libs
|
||||
MENU:=1
|
||||
TITLE:= xDSL library (libdsl)
|
||||
DEPENDS+=TARGET_brcmbca:bcm963xx-bsp
|
||||
DEPENDS+=TARGET_brcmbca:bcm963xx-bsp +TARGET_airoha:libeasy
|
||||
endef
|
||||
|
||||
define Package/libdsl/description
|
||||
|
||||
@@ -1,32 +1,28 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 Iopsys
|
||||
# Copyright (C) 2025 Genexis Sweden AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libeasy
|
||||
PKG_VERSION:=7.4.6
|
||||
PKG_VERSION:=7.5.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=ca7b20068c9d373e41045a2e899a9c697576262c
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libeasy.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE_VERSION:=b981f7e1bd51f66041cd0c25d15af74ae1e3bc75
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/libeasy.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>
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/openssl \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3
|
||||
include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
@@ -34,9 +30,6 @@ define Build/Prepare
|
||||
endef
|
||||
endif
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall"
|
||||
|
||||
define Package/libeasy
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
@@ -47,7 +40,7 @@ define Package/libeasy
|
||||
endef
|
||||
|
||||
define Package/libeasy/description
|
||||
Library provides common utility functions
|
||||
This package provides libeasy.so for common utility functions.
|
||||
endef
|
||||
|
||||
define Build/InstallDev/libeasy
|
||||
@@ -67,6 +60,7 @@ define Build/InstallDev/libeasy
|
||||
endef
|
||||
|
||||
define Build/InstallDev
|
||||
$(call Build/InstallDev/cmake,$(1))
|
||||
$(call Build/InstallDev/libeasy,$(1),$(2))
|
||||
endef
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-airoha
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.3
|
||||
PKG_VERSION:=1.1.8
|
||||
PKG_LICENSE:=PROPRIETARY
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
@@ -17,7 +17,7 @@ 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:=f4ffa38b77e20f9e2a6b6ffd5b2bf83cddb6bffc
|
||||
PKG_SOURCE_VERSION:=9763c574ec69e2aa492db4f1296d4bcd53776fba
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -17,9 +17,13 @@ SLIC=$(cat /proc/device-tree/airoha-voice/slic-type)
|
||||
hasDect=$(db -q get hw.board.hasDect)
|
||||
[ "$hasDect" = "1" ] || exit 0
|
||||
|
||||
# Set the DECT RFPI
|
||||
. /lib/functions/iopsys-environment.sh
|
||||
db set hw.board.dect_rfpi=$(get_dect_rfpi)
|
||||
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'
|
||||
}
|
||||
|
||||
100
libwifi/Makefile
100
libwifi/Makefile
@@ -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.12.9
|
||||
PKG_VERSION:=7.22.10
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=0877163a9653a9f83c8244aa24f762a131ae02a6
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE_VERSION:=4759a74db66dd0b4bfa6707683129a317ae42779
|
||||
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
|
||||
@@ -61,13 +76,13 @@ else
|
||||
endif
|
||||
|
||||
ifneq ($(CONFIG_PACKAGE_kmod-mt7915e_en7523),)
|
||||
TARGET_CFLAGS=-DMT7915_VENDOR_EXT
|
||||
TARGET_CFLAGS +=-DMT7915_VENDOR_EXT
|
||||
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))
|
||||
|
||||
@@ -31,8 +31,8 @@ MESON_ARGS += \
|
||||
|
||||
define Package/linux-pam/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/security
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/pam_faillock.uci_default $(1)/etc/uci-defaults/99-add_pam_faillock
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./linux_pam.init $(1)/etc/init.d/linux_pam
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,linux-pam))
|
||||
|
||||
@@ -1,43 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
create_faillock_files()
|
||||
{
|
||||
# also create files needed by pam_faillock
|
||||
touch /var/log/faillock
|
||||
chmod 700 /var/log/faillock
|
||||
touch /var/log/btmp
|
||||
chmod 700 /var/log/btmp
|
||||
}
|
||||
|
||||
update_pam_common_auth()
|
||||
{
|
||||
local file="/etc/pam.d/common-auth"
|
||||
local deny=6
|
||||
local unlock_time=300
|
||||
|
||||
# update pam_unix.so line
|
||||
sed -i -E 's|^.*pam_unix\.so.*|auth\t sufficient\tpam_unix.so nullok_secure|' "$file"
|
||||
|
||||
# Insert pam_faillock lines before and after pam_unix.so
|
||||
sed -i -E "/pam_unix.so nullok_secure/i auth required pam_faillock.so preauth deny=$deny even_deny_root unlock_time=$unlock_time" "$file"
|
||||
sed -i -E "/pam_unix.so nullok_secure/a auth [default=die] pam_faillock.so authfail audit deny=$deny even_deny_root unlock_time=$unlock_time" "$file"
|
||||
}
|
||||
|
||||
update_pam_common_account()
|
||||
{
|
||||
# update account file
|
||||
sed -i "/pam_unix.so/ i account required pam_faillock.so" /etc/pam.d/common-account
|
||||
}
|
||||
|
||||
if [ -f "/usr/lib/security/pam_faillock.so" ]; then
|
||||
update_pam_common_auth
|
||||
update_pam_common_account
|
||||
create_faillock_files
|
||||
fi
|
||||
|
||||
if [ -f /etc/config/sshd ]; then
|
||||
uci -q set sshd.@sshd[0].UsePAM=1
|
||||
uci commit sshd
|
||||
fi
|
||||
|
||||
exit 0
|
||||
18
linux-pam/linux_pam.init
Executable file
18
linux-pam/linux_pam.init
Executable file
@@ -0,0 +1,18 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=11
|
||||
STOP=90
|
||||
USE_PROCD=1
|
||||
|
||||
create_faillock_files()
|
||||
{
|
||||
# also create files needed by pam_faillock
|
||||
touch /var/log/faillock
|
||||
chmod 700 /var/log/faillock
|
||||
touch /var/log/btmp
|
||||
chmod 700 /var/log/btmp
|
||||
}
|
||||
|
||||
boot() {
|
||||
create_faillock_files
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
if PACKAGE_logmngr
|
||||
|
||||
choice
|
||||
prompt "Select backend for syslog management"
|
||||
default LOGMNGR_BACKEND_FLUENTBIT
|
||||
@@ -31,4 +32,5 @@ config LOGMNGR_VENDOR_LOG_FILE
|
||||
default y
|
||||
help
|
||||
It adds support for Device.DeviceInfo.VendorLogFile. Object.
|
||||
|
||||
endif
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=logmngr
|
||||
PKG_VERSION:=1.0.15
|
||||
PKG_VERSION:=1.1.4
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/system/logmngr.git
|
||||
PKG_SOURCE_VERSION:=1561b71a2225af737db9f091204247ab4e141abb
|
||||
PKG_SOURCE_VERSION:=62441fdfe14a39bff8fff7c62307bd7b54d7240f
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -29,7 +29,6 @@ define Package/logmngr
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Logging Manager
|
||||
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit
|
||||
DEPENDS+=+@LOGMNGR_BACKEND_FLUENTBIT:BUSYBOX_CONFIG_KLOGD
|
||||
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
|
||||
DEPENDS+=+LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
@@ -53,31 +52,37 @@ endif
|
||||
|
||||
define Package/logmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./files/logmngr.init $(1)/etc/init.d/logmngr
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/10-logmngr_config_generate $(1)/etc/uci-defaults/
|
||||
|
||||
$(INSTALL_BIN) ./files/etc/init.d/logmngr $(1)/etc/init.d/
|
||||
$(INSTALL_DATA) ./files/etc/config/logmngr $(1)/etc/config/
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/10-logmngr_config_migrate $(1)/etc/uci-defaults/
|
||||
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1) core 10
|
||||
|
||||
# Install logmngr service backend
|
||||
$(INSTALL_DIR) $(1)/lib/logmngr
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_FLUENTBIT),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_DIR) $(1)/usr/libexec
|
||||
$(INSTALL_BIN) ./files/logmngr-klogd $(1)/usr/libexec/
|
||||
$(INSTALL_DIR) $(1)/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/ntp/
|
||||
$(INSTALL_BIN) ./files/logread $(1)/sbin/
|
||||
endif
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_BIN) ./files/etc/hotplug.d/ntp/20-reload_fluent_bit $(1)/etc/hotplug.d/ntp/
|
||||
else ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/syslog-ng.sh $(1)/lib/logmngr/
|
||||
endif
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfsyslog.so $(1) core 10
|
||||
|
||||
ifeq ($(CONFIG_LOGMNGR_LOGROTATE),y)
|
||||
$(INSTALL_BIN) ./files/11-logmngr_logrotate_config_generate $(1)/etc/uci-defaults/
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/logrotate.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_DATA) ./files/etc/uci-defaults/11-logmngr_logrotate_syslog $(1)/etc/uci-defaults/
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1) sysmngr 11
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_LOGMNGR_VENDOR_LOG_FILE),y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr 12
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,logmngr))
|
||||
|
||||
@@ -1,26 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if uci -q get logmngr.@globals[0] >/dev/null; then
|
||||
# return if there is any valid content
|
||||
exit 0
|
||||
else
|
||||
rm -f /etc/config/logmngr
|
||||
fi
|
||||
|
||||
touch /etc/config/logmngr
|
||||
|
||||
uci set logmngr.globals=globals
|
||||
uci set logmngr.globals.enable=1
|
||||
|
||||
uci set logmngr.a1=action
|
||||
uci set logmngr.a1.name="ac1"
|
||||
|
||||
uci set logmngr.lf1=log_file
|
||||
uci set logmngr.lf1.enable=1
|
||||
uci set logmngr.lf1.action="ac1"
|
||||
uci set logmngr.lf1.file="/var/log/messages"
|
||||
|
||||
uci set logmngr.lr1=log_remote
|
||||
uci set logmngr.lr1.enable=0
|
||||
uci set logmngr.lr1.action="ac1"
|
||||
uci set logmngr.lr1.port="514"
|
||||
26
logmngr/files/etc/config/logmngr
Normal file
26
logmngr/files/etc/config/logmngr
Normal file
@@ -0,0 +1,26 @@
|
||||
config globals 'globals'
|
||||
option enable '1'
|
||||
|
||||
config source 'default_source'
|
||||
option name 'default_source'
|
||||
option system_messages '1'
|
||||
option kernel_messages '1'
|
||||
|
||||
config template 'default_template'
|
||||
option name 'default_template'
|
||||
option expression '{time} {hostname} {ident}[{pid}]: {message}'
|
||||
|
||||
config action 'default_action'
|
||||
option name 'default_action'
|
||||
list source 'default_source'
|
||||
option template 'default_template'
|
||||
|
||||
config log_file 'lf1'
|
||||
option enable '1'
|
||||
option action 'default_action'
|
||||
option file '/var/log/messages'
|
||||
|
||||
config log_remote 'lr1'
|
||||
option enable '0'
|
||||
option action 'default_action'
|
||||
option port '514'
|
||||
14
logmngr/files/etc/hotplug.d/ntp/20-reload_fluent_bit
Normal file
14
logmngr/files/etc/hotplug.d/ntp/20-reload_fluent_bit
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
# This hotplug script reloads fluent-bit, so that kmsg logs' timestamp gets in sync
|
||||
|
||||
[ "$ACTION" = stratum ] || exit 0
|
||||
|
||||
# only once
|
||||
if ! uci -q get time.global.first_use_date > /dev/null 2>&1; then
|
||||
flb_pid="$(pidof fluent-bit)"
|
||||
|
||||
if [ -n "$flb_pid" ]; then
|
||||
logger -t "logmngr.hotplug" -p info "reload fluent-bit due to ntp sync"
|
||||
kill -SIGHUP "$flb_pid"
|
||||
fi
|
||||
fi
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=12
|
||||
START=09
|
||||
|
||||
USE_PROCD=1
|
||||
|
||||
36
logmngr/files/etc/uci-defaults/10-logmngr_config_migrate
Normal file
36
logmngr/files/etc/uci-defaults/10-logmngr_config_migrate
Normal file
@@ -0,0 +1,36 @@
|
||||
#!/bin/sh
|
||||
|
||||
# check if this is a new type UCI or old type UCI
|
||||
if ! uci -q get logmngr.default_source > /dev/null; then
|
||||
uci -q set logmngr.default_source=source
|
||||
uci -q set logmngr.default_source.name='default_source'
|
||||
uci -q set logmngr.default_source.system_messages='1'
|
||||
uci -q set logmngr.default_source.kernel_messages='1'
|
||||
fi
|
||||
|
||||
if ! uci -q get logmngr.default_template > /dev/null; then
|
||||
uci -q set logmngr.default_template=template
|
||||
uci -q set logmngr.default_template.name='default_template'
|
||||
uci -q set logmngr.default_template.expression='{time} {hostname} {ident}[{pid}]: {message}'
|
||||
fi
|
||||
|
||||
if uci -q get logmngr.a1 >/dev/null; then
|
||||
uci -q rename logmngr.a1='default_action'
|
||||
uci -q set logmngr.default_action.name='default_action'
|
||||
uci -q set logmngr.default_action.template='default_template'
|
||||
|
||||
uci -q delete logmngr.default_action.source
|
||||
uci -q add_list logmngr.default_action.source='default_source'
|
||||
fi
|
||||
|
||||
if uci -q get logmngr.lf1 >/dev/null; then
|
||||
uci -q rename logmngr.lf1='default_logfile'
|
||||
uci -q set logmngr.default_logfile.action='default_action'
|
||||
fi
|
||||
|
||||
if uci -q get logmngr.lr1 >/dev/null; then
|
||||
uci -q rename logmngr.lr1='default_logremote'
|
||||
uci -q set logmngr.default_logremote.action='default_action'
|
||||
fi
|
||||
|
||||
exit 0
|
||||
@@ -1,7 +1,7 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adds a default log rotate policy if none exists
|
||||
if uci -q get logmngr.@log_rotate[0] >/dev/null; then
|
||||
if uci -q get logmngr.lro1 >/dev/null; then
|
||||
# return if there is any valid content
|
||||
exit 0
|
||||
fi
|
||||
@@ -5,6 +5,38 @@
|
||||
|
||||
CONF_FILE=/etc/fluent-bit/fluent-bit.conf
|
||||
TMP_CONF_FILE=/tmp/fluent-bit/fluent-bit.conf
|
||||
FLUENT_BIT_CONF_DIR=/etc/fluent-bit/conf.d
|
||||
PROCESSED_SYSLOG_TAGS=""
|
||||
PROCESSED_KMSG_TAGS=""
|
||||
|
||||
# check if syslog source section is already processed
|
||||
# and add it to the list of processed source sections
|
||||
syslog_tag_already_processed() {
|
||||
local tag="$1"
|
||||
|
||||
for t in $PROCESSED_SYSLOG_TAGS; do
|
||||
[ "$t" = "$tag" ] && return 0
|
||||
done
|
||||
|
||||
PROCESSED_SYSLOG_TAGS="$tag $PROCESSED_SYSLOG_TAGS"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
# check if kmsg source section is already processed
|
||||
# and add it to the list of processed source sections
|
||||
# two separate functions used because we want to populate
|
||||
# appropriate PROCESSED variable
|
||||
kmsg_tag_already_processed() {
|
||||
local tag="$1"
|
||||
for t in $PROCESSED_KMSG_TAGS; do
|
||||
[ "$t" = "$tag" ] && return 0
|
||||
done
|
||||
|
||||
PROCESSED_KMSG_TAGS="$tag $PROCESSED_KMSG_TAGS"
|
||||
|
||||
return 1
|
||||
}
|
||||
|
||||
append_conf() {
|
||||
echo "$*" >> ${TMP_CONF_FILE}
|
||||
@@ -14,201 +46,287 @@ create_config_file() {
|
||||
mkdir -p /tmp/fluent-bit
|
||||
rm -f ${TMP_CONF_FILE}
|
||||
touch ${TMP_CONF_FILE}
|
||||
# include all files placed in FLUENT_BIT_CONF_DIR directory
|
||||
# fluent-bit does not support using directory in include directive
|
||||
# also, if no file is found then fluent-bit aborts
|
||||
# so only add include if any file is present in the FLUENT_BIT_CONF_DIR
|
||||
if [ -d "$FLUENT_BIT_CONF_DIR" ] && [ "$(ls -A "$FLUENT_BIT_CONF_DIR")" ]; then
|
||||
append_conf "@INCLUDE ${FLUENT_BIT_CONF_DIR}/*"
|
||||
fi
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
create_service_section() {
|
||||
# the service section of the fluent-bit.conf file has hardcoded values,
|
||||
# no need to lookup any uci section to configure this section
|
||||
echo "[SERVICE]" >> ${TMP_CONF_FILE}
|
||||
echo " flush 1" >> ${TMP_CONF_FILE}
|
||||
echo " daemon off" >> ${TMP_CONF_FILE}
|
||||
echo " log_level info" >> ${TMP_CONF_FILE}
|
||||
echo " coro_stack_size 24576" >> ${TMP_CONF_FILE}
|
||||
echo " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
|
||||
echo "" >> ${TMP_CONF_FILE}
|
||||
append_conf "[SERVICE]"
|
||||
append_conf " flush 1"
|
||||
append_conf " daemon off"
|
||||
append_conf " log_level info"
|
||||
append_conf " coro_stack_size 1048576"
|
||||
append_conf " parsers_file /etc/fluent-bit/parsers.conf"
|
||||
append_conf " hot_reload on"
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
create_default_filters() {
|
||||
append_conf "[FILTER]"
|
||||
append_conf " name modify"
|
||||
append_conf " match KM*"
|
||||
append_conf " add ident kernel"
|
||||
append_conf " rename msg message"
|
||||
append_conf ""
|
||||
|
||||
append_conf "[FILTER]"
|
||||
append_conf " name modify"
|
||||
append_conf " match *"
|
||||
append_conf " add pid 0"
|
||||
append_conf ""
|
||||
|
||||
append_conf "[FILTER]"
|
||||
append_conf " name sysinfo"
|
||||
append_conf " match *"
|
||||
append_conf " hostname_key hostname"
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
create_input_section() {
|
||||
local tag="$1"
|
||||
|
||||
# the input in our case is always syslog, hence, this section of the
|
||||
# fluent-bit.conf file has hardcoded values as well that do not depend
|
||||
# on any uci value
|
||||
echo "[INPUT]" >> ${TMP_CONF_FILE}
|
||||
echo " name syslog" >> ${TMP_CONF_FILE}
|
||||
echo " tag $tag" >> ${TMP_CONF_FILE}
|
||||
echo " path /dev/log" >> ${TMP_CONF_FILE}
|
||||
echo "" >> ${TMP_CONF_FILE}
|
||||
[ -z "$tag" ] && return
|
||||
|
||||
# check if this source section has already been processed
|
||||
syslog_tag_already_processed "$tag" && return
|
||||
|
||||
append_conf "[INPUT]"
|
||||
append_conf " name syslog"
|
||||
append_conf " unix_perm 0666"
|
||||
append_conf " tag $tag"
|
||||
append_conf " path /dev/log"
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
generate_facility_regex() {
|
||||
local facility_level=$1
|
||||
local pri=0
|
||||
populate_allowed_logs() {
|
||||
local facility_level sev_level
|
||||
local section="$1"
|
||||
|
||||
if [ "$facility_level" == "24" ]; then
|
||||
# value 24 means all facility level, which is as good as not
|
||||
# generating a filter section, so return
|
||||
return
|
||||
fi
|
||||
[ -z "$section" ] && return
|
||||
|
||||
# facility_level is a list value, hence, generate regex for
|
||||
# each value
|
||||
IFS=" "
|
||||
for val in $facility_level; do
|
||||
# as per rfc 5424 and 3164, pri in syslog msg is
|
||||
# facility*8+severity. Severity value can range from 0-7 hence
|
||||
# generate regex for each.
|
||||
for sval in 0 1 2 3 4 5 6 7; do
|
||||
pri=`expr $val \* 8 + $sval`
|
||||
echo " regex pri $pri" >> ${TMP_CONF_FILE}
|
||||
done
|
||||
done
|
||||
}
|
||||
# reset
|
||||
match_pattern=""
|
||||
facilities=""
|
||||
all_facilities=0
|
||||
kern_facility=0
|
||||
severities=""
|
||||
sev_compare=1
|
||||
sev_action=0
|
||||
|
||||
generate_severity_regex() {
|
||||
local sev_level="$1"
|
||||
local sev_compare="$2"
|
||||
local sev_action="$3"
|
||||
# read config
|
||||
config_get match_pattern $section pattern_match
|
||||
|
||||
local pri=0
|
||||
local param="exclude"
|
||||
|
||||
if [ "$sev_action" == "0" ]; then
|
||||
param="regex"
|
||||
fi
|
||||
|
||||
local fval=0
|
||||
if [ "$sev_compare" == "0" ]; then
|
||||
# generate regex for all facility values, with severity=sev_level
|
||||
while [ $fval -le 23 ] ; do
|
||||
pri=`expr $fval \* 8 + $sev_level`
|
||||
echo " $param pri $pri" >> ${TMP_CONF_FILE}
|
||||
fval=$((fval + 1))
|
||||
done
|
||||
elif [ "$sev_compare" == "1" ]; then
|
||||
# generate regex for all severity value greater than or equal to
|
||||
# sev_level. please, lower value have higher precedence, so sev_level
|
||||
# 0 which is emergency has higher precedence than error which is 3
|
||||
while [ $fval -le 23 ] ; do
|
||||
sval=0
|
||||
while [ $sev_level -ge $sval ]; do
|
||||
pri=`expr $fval \* 8 + $sval`
|
||||
echo " $param pri $pri" >> ${TMP_CONF_FILE}
|
||||
sval=$((sval + 1))
|
||||
done
|
||||
fval=$((fval + 1))
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
handle_filter_conf() {
|
||||
local section="$1" # config filter
|
||||
local filter_name="$2"
|
||||
local name
|
||||
|
||||
# no need to proceed if name of filter section is not one of the values
|
||||
# listed in option filter in config action section
|
||||
config_get name $section name
|
||||
if [ "$name" != "$filter_name" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
# as per data model, at a time either facility_level or severity_level can
|
||||
# be specified along with pattern_match. hence, first process and generate
|
||||
# regex for pattern_match which is common in both condition. Next, we will
|
||||
# process facility_level and return if facility level is defined and not
|
||||
# process severity related params at all.
|
||||
|
||||
local pattern_match
|
||||
config_get pattern_match $section pattern_match
|
||||
if [ -n "$pattern_match" ]; then
|
||||
echo " regex $pattern_match" >> ${TMP_CONF_FILE}
|
||||
fi
|
||||
|
||||
local facility_level
|
||||
config_get facility_level $section facility_level
|
||||
|
||||
if [ -n "$facility_level" ]; then
|
||||
generate_facility_regex $facility_level
|
||||
# return from here since if facility_level is defined, then no
|
||||
# need to process severity_level
|
||||
return
|
||||
fi
|
||||
|
||||
local sev_level
|
||||
local sev_compare
|
||||
local sev_action
|
||||
config_get sev_level $section severity_level
|
||||
config_get sev_compare $section severity_compare 1
|
||||
config_get sev_action $section severity_action 0
|
||||
|
||||
if [ -n "$sev_level" ]; then
|
||||
# value 1 of severity compare corresponds to data model
|
||||
# and system default which is EqualorHigher
|
||||
config_get sev_compare $section severity_compare 1
|
||||
# value 0 of severity action corresponds to data model
|
||||
# and system default that is log
|
||||
config_get sev_action $section severity_action 0
|
||||
# normalize facilities
|
||||
if [ -n "$facility_level" ]; then
|
||||
for f in $facility_level; do
|
||||
if [ "$f" = "24" ]; then
|
||||
all_facilities=1
|
||||
# xargs is used to convert from new line separated numbers to space separated numbers
|
||||
facilities="$(seq 0 23 | xargs)"
|
||||
break
|
||||
fi
|
||||
|
||||
generate_severity_regex $sev_level $sev_compare $sev_action
|
||||
if [ "$f" = "0" ]; then
|
||||
kern_facility=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ "$all_facilities" -eq 0 ]; then
|
||||
facilities="$facility_level"
|
||||
fi
|
||||
else
|
||||
# default to "all facilities" when unset
|
||||
all_facilities=1
|
||||
facilities="$(seq 0 23 | xargs)"
|
||||
fi
|
||||
|
||||
# normalize severities
|
||||
case "$sev_level" in
|
||||
8) # all severities
|
||||
severities="$(seq 0 7 | xargs)"
|
||||
;;
|
||||
9) # none
|
||||
severities="none"
|
||||
;;
|
||||
"") # unset, treat as "all"
|
||||
severities="$(seq 0 7 | xargs)"
|
||||
;;
|
||||
*)
|
||||
if [ "$sev_compare" = "0" ]; then
|
||||
# equal
|
||||
severities="$sev_level"
|
||||
else
|
||||
# equl or higher
|
||||
severities="$(seq 0 $sev_level | xargs)"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
}
|
||||
|
||||
create_filter_section() {
|
||||
local match="$1"
|
||||
local match_regex="$1"
|
||||
local pattern="$2"
|
||||
|
||||
echo "[FILTER]" >> ${TMP_CONF_FILE}
|
||||
echo " name grep" >> ${TMP_CONF_FILE}
|
||||
echo " match $match" >> ${TMP_CONF_FILE}
|
||||
echo " logical_op or" >> ${TMP_CONF_FILE} # handle multiple filters
|
||||
[ -z "$match_regex" ] && return
|
||||
|
||||
append_conf "[FILTER]"
|
||||
append_conf " name grep"
|
||||
append_conf " match_regex $match_regex"
|
||||
|
||||
# we need "logical_op or" only in non-pattern sections
|
||||
if [ "$pattern" = "0" ]; then
|
||||
append_conf " logical_op or" # handle multiple filters
|
||||
fi
|
||||
}
|
||||
|
||||
handle_filter_ref() {
|
||||
local filter_name="$1"
|
||||
config_foreach handle_filter_conf filter "$filter_name"
|
||||
create_kmsg_input_section() {
|
||||
local tag="$1"
|
||||
local max_sev=7
|
||||
|
||||
[ -z "$tag" ] && return
|
||||
kmsg_tag_already_processed "$tag" && return
|
||||
|
||||
if [ -c "/dev/kmsg" ]; then
|
||||
append_conf "[INPUT]"
|
||||
append_conf " name kmsg"
|
||||
append_conf " tag $tag"
|
||||
|
||||
# check kern facility (0)
|
||||
if [ "$all_facilities" -eq 1 ] || [ "$kern_facility" -eq 1 ]; then
|
||||
if [ "$severities" != "none" ]; then
|
||||
# severity filtering
|
||||
# only EqualOrHigher is supported by Prio_Level
|
||||
# and only Log action is supported
|
||||
# so set Prio_Level = max severity
|
||||
if [ "$sev_action" = "0" ] && [ "$sev_compare" = "1" ]; then
|
||||
if [ -n "$severities" ]; then
|
||||
max_sev=$(echo $severities | tr ' ' '\n' | sort -n | tail -1)
|
||||
fi
|
||||
|
||||
append_conf " prio_level $max_sev"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
append_conf ""
|
||||
|
||||
# if severities is none, or
|
||||
# if kern facility has been excluded
|
||||
# then we need to stop kernel logs
|
||||
# sev_action and sev_compare is being checked because we don't want to work with rules that exclude logs
|
||||
if [ "$severities" = "none" ] || { [ "$kern_facility" -eq 0 ] && [ "$all_facilities" -eq 0 ] && [ "$sev_action" = "0" ] && [ "$sev_compare" = "1" ]; }; then
|
||||
# block all
|
||||
# create a filter section that matches on KM* tag
|
||||
# and excludes all messages
|
||||
create_filter_section "KM*" "0"
|
||||
append_conf " exclude message ^.*$"
|
||||
append_conf ""
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
generate_syslog_filter() {
|
||||
local param="regex"
|
||||
|
||||
[ "$sev_action" = "1" ] && param="exclude"
|
||||
|
||||
# start adding the fluent-bit filter section
|
||||
create_filter_section "SL*" "0"
|
||||
|
||||
if [ "$severities" = "none" ]; then
|
||||
append_conf " exclude pri ^.*$"
|
||||
return
|
||||
fi
|
||||
|
||||
for fval in $facilities; do
|
||||
for sval in $severities; do
|
||||
local pri=$((fval * 8 + sval))
|
||||
append_conf " $param pri ^${pri}$"
|
||||
done
|
||||
done
|
||||
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
generate_pattern_filter() {
|
||||
local match_regex="$1"
|
||||
local match_pattern="$2"
|
||||
|
||||
[ -z "$match_regex" ] && return
|
||||
[ -z "$match_pattern" ] && return
|
||||
|
||||
# start adding the fluent-bit filter section
|
||||
create_filter_section "$match_regex" "1"
|
||||
append_conf " regex message $match_pattern"
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
handle_log_file() {
|
||||
local section="$1" # out_file section
|
||||
local match="$2"
|
||||
local linker="$2"
|
||||
local match_regex="$3"
|
||||
local template="$4"
|
||||
local action_ref
|
||||
|
||||
config_get action_ref $section action
|
||||
if [ "$action_ref" != "$match" ]; then
|
||||
if [ "$action_ref" != "$linker" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local enabled
|
||||
config_get enabled $section enable
|
||||
if [ "$enabled" == 0 ]; then
|
||||
config_get_bool enabled $section enable
|
||||
if [ "$enabled" = "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local file
|
||||
config_get file $section file
|
||||
if [ -z "$file" ]; then
|
||||
if [ -z "$file" ] || [ -z "$match_regex" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
|
||||
echo " name file" >> ${TMP_CONF_FILE}
|
||||
echo " match $match" >> ${TMP_CONF_FILE}
|
||||
echo " file $file" >> ${TMP_CONF_FILE}
|
||||
echo " format template" >> ${TMP_CONF_FILE}
|
||||
echo " template {time} {hostname} {ident}: {message}" >> ${TMP_CONF_FILE}
|
||||
append_conf "[OUTPUT]"
|
||||
append_conf " name file"
|
||||
append_conf " workers 2"
|
||||
append_conf " match_regex $match_regex"
|
||||
append_conf " file $file"
|
||||
|
||||
|
||||
if [ -n "$template" ]; then
|
||||
append_conf " format template"
|
||||
append_conf " template ${template}"
|
||||
fi
|
||||
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
handle_log_remote() {
|
||||
local section="$1"
|
||||
local match="$2"
|
||||
local linker="$2"
|
||||
local match_regex="$3"
|
||||
local action_ref
|
||||
|
||||
config_get action_ref $section action
|
||||
if [ "$action_ref" != "$match" ]; then
|
||||
if [ "$action_ref" != "$linker" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
local enabled
|
||||
config_get enabled $section enable
|
||||
if [ "$enabled" == 0 ]; then
|
||||
config_get_bool enabled $section enable
|
||||
if [ "$enabled" = "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -218,83 +336,167 @@ handle_log_remote() {
|
||||
return
|
||||
fi
|
||||
|
||||
echo "[OUTPUT]" >> ${TMP_CONF_FILE}
|
||||
echo " name syslog" >> ${TMP_CONF_FILE}
|
||||
echo " match $match" >> ${TMP_CONF_FILE}
|
||||
echo " host $address" >> ${TMP_CONF_FILE}
|
||||
append_conf "[OUTPUT]"
|
||||
append_conf " name syslog"
|
||||
append_conf " match_regex $match_regex"
|
||||
append_conf " host $address"
|
||||
append_conf " syslog_appname_key ident"
|
||||
append_conf " syslog_procid_key pid"
|
||||
append_conf " syslog_message_key message"
|
||||
|
||||
local hostname="$(uci -q get 'system.@system[0].hostname')"
|
||||
if [ -n "${hostname}" ]; then
|
||||
append_conf " syslog_hostname_preset ${hostname}"
|
||||
fi
|
||||
append_conf " syslog_hostname_key hostname"
|
||||
|
||||
local proto # holds value tcp or udp
|
||||
config_get proto ${section} proto
|
||||
if [ -n "$proto" ]; then
|
||||
if [ "$proto" == "tls" ]; then
|
||||
echo " mode tcp" >> ${TMP_CONF_FILE}
|
||||
echo " tls on" >> ${TMP_CONF_FILE}
|
||||
append_conf " mode tcp"
|
||||
append_conf " tls on"
|
||||
else
|
||||
echo " mode $proto" >> ${TMP_CONF_FILE}
|
||||
append_conf " mode $proto"
|
||||
fi
|
||||
fi
|
||||
|
||||
local port
|
||||
config_get port $section port
|
||||
if [ -n "$port" ]; then
|
||||
echo " port $port" >> ${TMP_CONF_FILE}
|
||||
append_conf " port $port"
|
||||
fi
|
||||
|
||||
local cert
|
||||
local peer_verify
|
||||
config_get cert $section cert
|
||||
if [ -n "$cert" ]; then
|
||||
echo " tls.crt_file $cert" >> ${TMP_CONF_FILE}
|
||||
append_conf " tls.crt_file $cert"
|
||||
|
||||
config_get peer_verify $section peer_verify
|
||||
if [ "$peer_verify" == "1" ]; then
|
||||
echo " tls.verify on" >> ${TMP_CONF_FILE}
|
||||
config_get_bool peer_verify $section peer_verify
|
||||
if [ "$peer_verify" = "1" ]; then
|
||||
append_conf " tls.verify on"
|
||||
fi
|
||||
fi
|
||||
append_conf ""
|
||||
}
|
||||
|
||||
resolve_source_section() {
|
||||
local src_section="$1"
|
||||
local linker="$2"
|
||||
local src_name syslog_en kernel_en
|
||||
|
||||
config_get src_name "$src_section" name
|
||||
[ "$src_name" = "$linker" ] || return
|
||||
|
||||
config_get_bool syslog_en "$src_section" system_messages 1
|
||||
config_get_bool kernel_en "$src_section" kernel_messages 1
|
||||
|
||||
# create an input section using /dev/log or kmsg
|
||||
# and store the tag in a variable
|
||||
# so that later a regex can be made to match this tag
|
||||
# which will be used in output section
|
||||
if [ "$syslog_en" = "1" ]; then
|
||||
source_tag_syslog="SL$src_name"
|
||||
create_input_section "$source_tag_syslog"
|
||||
fi
|
||||
|
||||
if [ "$kernel_en" = "1" ]; then
|
||||
source_tag_kmsg="KM$src_name"
|
||||
create_kmsg_input_section "$source_tag_kmsg"
|
||||
fi
|
||||
}
|
||||
|
||||
# get the value of option expression from the relevant section
|
||||
resolve_template_section() {
|
||||
local tmpl_section="$1"
|
||||
local tmpl_name
|
||||
|
||||
config_get tmpl_name "$tmpl_section" name
|
||||
[ "$tmpl_name" = "$template_ref" ] || return
|
||||
|
||||
config_get template_expr "$tmpl_section" expression
|
||||
|
||||
[ -n "$template_expr" ] && echo "$template_expr"
|
||||
}
|
||||
|
||||
# loop over template sections and get the value of option expression from the relevant section
|
||||
get_template_expression() {
|
||||
local template_ref="$1"
|
||||
[ -n "$template_ref" ] && config_foreach resolve_template_section template
|
||||
}
|
||||
|
||||
# build a regex that will match all the tags supplied to this function
|
||||
build_match_regex() {
|
||||
local tags="$1"
|
||||
local first=1
|
||||
local regex="^("
|
||||
for tag in $tags; do
|
||||
[ "$first" -eq 1 ] && first=0 || regex="$regex|"
|
||||
regex="$regex$tag"
|
||||
done
|
||||
regex="$regex)\$"
|
||||
echo "$regex"
|
||||
}
|
||||
|
||||
handle_filter_conf() {
|
||||
local section="$1" # config filter
|
||||
local filter_name="$2"
|
||||
local name
|
||||
|
||||
config_get name $section name
|
||||
[ "$name" = "$filter_name" ] || return
|
||||
|
||||
populate_allowed_logs "$filter_name"
|
||||
}
|
||||
|
||||
handle_action() {
|
||||
local section="$1"
|
||||
local tag_regex filter source_ref template_ref source_sec log_template finst
|
||||
local action_section="$1"
|
||||
local source_tag_syslog source_tag_kmsg
|
||||
|
||||
local filter
|
||||
config_get filter $section filter
|
||||
# shared variables set by populate_allowed_logs
|
||||
match_pattern=""
|
||||
facilities=""
|
||||
all_facilities=0
|
||||
kern_facility=1
|
||||
severities=""
|
||||
sev_compare=1
|
||||
sev_action=0
|
||||
|
||||
# use config action option name as tag for input
|
||||
local tag
|
||||
config_get tag $section name
|
||||
if [ -z "$tag" ]; then
|
||||
return
|
||||
fi
|
||||
config_get action_name "$action_section" name
|
||||
config_get filter "$action_section" filter
|
||||
config_get source_ref "$action_section" source
|
||||
config_get template_ref "$action_section" template
|
||||
|
||||
create_input_section $tag
|
||||
[ -z "$action_name" ] && return
|
||||
[ -z "$source_ref" ] && return
|
||||
|
||||
# read filter section and populate relevant variables
|
||||
# these variables will be used by create_kmsg_input_section
|
||||
# generate_syslog_filter, and generate_pattern_filter functions
|
||||
if [ -n "$filter" ]; then
|
||||
# the only fluentbit filter that is useful for the datamodel is
|
||||
# grep. Also, fluentbit does not seem to handle multiple instances
|
||||
# of FILTER of same kind. Hence, each filter section corresponding
|
||||
# to an action entry in the uci would translate for us into a set of
|
||||
# regex/exclude values instead of individual FILTER section per uci
|
||||
# section filter is a list, treat according
|
||||
create_filter_section $tag
|
||||
|
||||
IFS=" "
|
||||
for finst in $filter; do
|
||||
handle_filter_ref $finst
|
||||
config_foreach handle_filter_conf filter "$finst"
|
||||
done
|
||||
fi
|
||||
|
||||
# handle output, each action can be associated with a out_log and out_syslog
|
||||
# Resolve referenced source sections
|
||||
for source_sec in $source_ref; do
|
||||
config_foreach resolve_source_section source "$source_sec"
|
||||
done
|
||||
|
||||
# build a regex that will match all the sources for this action
|
||||
tag_regex=$(build_match_regex "$source_tag_syslog $source_tag_kmsg")
|
||||
|
||||
if [ -n "$filter" ]; then
|
||||
generate_pattern_filter "$tag_regex" "$match_pattern"
|
||||
generate_syslog_filter
|
||||
fi
|
||||
|
||||
# get the template expression if any is present
|
||||
log_template="$(get_template_expression "$template_ref")"
|
||||
|
||||
# handle output, each action can be associated with an out_log and out_syslog
|
||||
# section so figure out if any out_log or out_syslog section is associated
|
||||
# with this and action and setup output accordingly.
|
||||
config_foreach handle_log_file log_file "$tag"
|
||||
config_foreach handle_log_remote log_remote "$tag"
|
||||
config_foreach handle_log_file log_file "$action_name" "$tag_regex" "$log_template"
|
||||
config_foreach handle_log_remote log_remote "$action_name" "$tag_regex"
|
||||
}
|
||||
|
||||
handle_action_section() {
|
||||
@@ -310,13 +512,14 @@ logmngr_init() {
|
||||
|
||||
create_config_file
|
||||
create_service_section
|
||||
create_default_filters
|
||||
handle_action_section
|
||||
|
||||
if [ -f /lib/logmngr/logrotate.sh ]; then
|
||||
logrotate_init
|
||||
fi
|
||||
|
||||
if [ "$enabled" == "0" ]; then
|
||||
if [ "$enabled" = "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
@@ -330,9 +533,4 @@ logmngr_init() {
|
||||
fi
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
|
||||
procd_open_instance klogd
|
||||
procd_set_param command /usr/libexec/logmngr-klogd
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -4,11 +4,14 @@
|
||||
|
||||
LOGROTATE_FILE=/etc/logrotate.conf
|
||||
LOGROTATE_TMP_FILE=/tmp/logrotate/logrotate.conf
|
||||
CONF_DIR=/etc/logrotate.d
|
||||
|
||||
create_logrotate_file() {
|
||||
mkdir -p /tmp/logrotate
|
||||
rm -f ${LOGROTATE_TMP_FILE}
|
||||
touch ${LOGROTATE_TMP_FILE}
|
||||
echo -e "include ${CONF_DIR}" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "" >> ${LOGROTATE_TMP_FILE}
|
||||
}
|
||||
|
||||
handle_logrotate() {
|
||||
|
||||
@@ -1,7 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
until [ -S /dev/log ]; do
|
||||
sleep 1
|
||||
done
|
||||
|
||||
exec /sbin/klogd -n
|
||||
@@ -55,12 +55,20 @@ config AGENT_OPER_CHANNEL_CHANGE_RELAY_MCAST
|
||||
config AGENT_USE_LIBDPP
|
||||
bool "Depend on libdpp for DPP EasyConnect"
|
||||
|
||||
config AGENT_ZEROTOUCH_DPP
|
||||
bool "Enable Zero-touch DPP bootstrapping. Depends on libztdpp.so"
|
||||
default n
|
||||
|
||||
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"
|
||||
|
||||
@@ -1,13 +1,14 @@
|
||||
#
|
||||
# Copyright (C) 2020-2023 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2020-2024 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2025 Genexis Sweden AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-agent
|
||||
PKG_VERSION:=6.3.5.3
|
||||
PKG_VERSION:=6.5.0.9
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=a2cc8dde8da330c2e78e186174db45ba36681b6a
|
||||
PKG_SOURCE_VERSION:=f4d201acde3320b1019c1831315e58a8ecb0290c
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@iopsys.eu>
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
@@ -26,7 +27,7 @@ include $(INCLUDE_DIR)/package.mk
|
||||
define Package/map-agent
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=WiFi multi-AP Agent (EasyMesh R2)
|
||||
TITLE:=Wi-Fi Multi-AP Agent (EasyMesh R6)
|
||||
DEPENDS:=+libwifi +libuci +libubox +ubus +libeasy +libieee1905 +ieee1905 \
|
||||
+ieee1905-map-plugin +ip-bridge +AGENT_USE_LIBDPP:libdpp \
|
||||
+uuidgen +openssl-util +!TARGET_brcmbca:ebtables-legacy \
|
||||
@@ -37,21 +38,12 @@ 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
|
||||
|
||||
define Package/map-agent/description
|
||||
This package implements EasyMesh R2 compliant WiFi Agent.
|
||||
endef
|
||||
|
||||
define Package/dynbhd/description
|
||||
Dyanmic LAN/WAN port detection and loop avoidance.
|
||||
This package provides EasyMesh R6 compliant Wi-Fi Multi-AP Agent.
|
||||
endef
|
||||
|
||||
define Package/map-agent/config
|
||||
@@ -111,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
|
||||
|
||||
@@ -124,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
|
||||
@@ -131,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
|
||||
@@ -148,4 +139,3 @@ endef
|
||||
endif
|
||||
|
||||
$(eval $(call BuildPackage,map-agent))
|
||||
$(eval $(call BuildPackage,dynbhd))
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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)"
|
||||
@@ -61,6 +56,14 @@ remove_from_bridge() {
|
||||
[ -n "$ifname" ] && brctl delif ${al_bridge} ${ifname}
|
||||
}
|
||||
|
||||
get_network_id() {
|
||||
local ifname=$1
|
||||
|
||||
[ -n "$ifname" ] || return
|
||||
network_id=$(wpa_cli -i $ifname list_n|tail -n 1 | awk '{print $1}')
|
||||
echo ${network_id}
|
||||
}
|
||||
|
||||
update_bstas() {
|
||||
section="$1"
|
||||
action="$2"
|
||||
@@ -68,14 +71,15 @@ update_bstas() {
|
||||
config_get ifname "$section" ifname
|
||||
config_get_bool enabled "$section" enabled 0
|
||||
|
||||
network_id=$(get_network_id $ifname)
|
||||
if [ "$action" = "down" ]; then
|
||||
wpa_cli -i "$ifname" disconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" disable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" disable_network $network_id > /dev/null 2>&1
|
||||
# wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
elif [ "$action" = "up" ]; then
|
||||
[ "$enabled" -eq 0 ] && return
|
||||
wpa_cli -i "$ifname" reconnect > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" enable_network 0 > /dev/null 2>&1
|
||||
wpa_cli -i "$ifname" enable_network $network_id > /dev/null 2>&1
|
||||
# wpa_cli -i "$ifname" save_config > /dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
@@ -86,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"
|
||||
|
||||
@@ -1,26 +1,12 @@
|
||||
#!/bin/sh /etc/rc.common
|
||||
|
||||
START=98
|
||||
START=97
|
||||
STOP=20
|
||||
|
||||
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;
|
||||
|
||||
@@ -203,7 +178,7 @@ start_service() {
|
||||
|
||||
procd_open_instance
|
||||
create_dir
|
||||
procd_set_param command "/usr/sbin/mapagent" "-d"
|
||||
procd_set_param command "/usr/sbin/mapagent" "-d" "-o" "/tmp/mapagent.log" "-f"
|
||||
procd_set_param respawn
|
||||
# procd_set_param stdout 1
|
||||
# procd_set_param stderr 1
|
||||
|
||||
15
map-agent/files/etc/uci-defaults/994-map-set-cntlr-sel-mode
Normal file
15
map-agent/files/etc/uci-defaults/994-map-set-cntlr-sel-mode
Normal 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
|
||||
@@ -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
|
||||
@@ -44,19 +49,16 @@ generate_multiap_config() {
|
||||
2g)
|
||||
mode_band=2
|
||||
priority=2
|
||||
dpp_chan="81/1"
|
||||
channels="1 6 11"
|
||||
;;
|
||||
5g)
|
||||
mode_band=5
|
||||
priority=1
|
||||
dpp_chan="128/36"
|
||||
channels="36-64 100-112"
|
||||
;;
|
||||
6g)
|
||||
mode_band=6
|
||||
priority=0
|
||||
dpp_chan="133/49"
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -67,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
|
||||
@@ -158,13 +160,17 @@ generate_multiap_config() {
|
||||
uci set mapagent.@bsta[-1].band="$mode_band"
|
||||
uci set mapagent.@bsta[-1].priority="$priority"
|
||||
|
||||
#uci add mapagent dpp_uri
|
||||
#uci set mapagent.@dpp_uri[-1].type="qrcode"
|
||||
#uci set mapagent.@dpp_uri[-1].device="$device"
|
||||
#uci set mapagent.@dpp_uri[-1].ifname="$ifname"
|
||||
#uci set mapagent.@dpp_uri[-1].band="$mode_band"
|
||||
#uci set mapagent.@dpp_uri[-1].chirp_interval="10"
|
||||
#uci add_list mapagent.@dpp_uri[-1].dpp_chan="$dpp_chan"
|
||||
# add dpp_chirp section for 2.4GHz bSTA
|
||||
if [ $mode_band -eq 2 ]; then
|
||||
uci add mapagent dpp_chirp
|
||||
uci set mapagent.@dpp_chirp[-1].type="qrcode"
|
||||
uci set mapagent.@dpp_chirp[-1].device="$device"
|
||||
uci set mapagent.@dpp_chirp[-1].ifname="$ifname"
|
||||
uci set mapagent.@dpp_chirp[-1].band="$mode_band"
|
||||
for channel in $channels; do
|
||||
uci add_list mapagent.@dpp_chirp[-1].channel="$channel"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ $generate_wireless_sta_config -eq 1 ]; then
|
||||
secname="default_sta_${device}"
|
||||
@@ -258,6 +264,6 @@ map_genconf () {
|
||||
config_foreach mapcontroller_remove_mld_id ap
|
||||
}
|
||||
fi
|
||||
uci -q commit mapcontroller
|
||||
ubus -t 5 call uci commit '{"config":"mapcontroller"}'
|
||||
fi
|
||||
}
|
||||
|
||||
@@ -39,6 +39,10 @@ config CONTROLLER_EASYMESH_VENDOR_EXT_OUI
|
||||
config CONTROLLER_USE_LIBDPP
|
||||
bool "Depend on libdpp for DPP EasyConnect"
|
||||
|
||||
config CONTROLLER_ZEROTOUCH_DPP
|
||||
bool "Enable Zero-touch DPP bootstrapping via passphrase."
|
||||
default n
|
||||
|
||||
config CONTROLLER_PROPAGATE_PROBE_REQ
|
||||
depends on CONTROLLER_EASYMESH_VENDOR_EXT
|
||||
bool "Enable publishing probe requests vendor specific messages as UBUS events"
|
||||
|
||||
@@ -6,9 +6,9 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-controller
|
||||
PKG_VERSION:=6.3.0.17
|
||||
PKG_VERSION:=6.4.4.16
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=7f55e5705fee1b879d651bbba872ec5d7152d5ab
|
||||
PKG_SOURCE_VERSION:=2f8d2afc604c090637acdb01e630e233cd9aceff
|
||||
PKG_MAINTAINER:=Jakob Olsson <jakob.olsson@genexis.eu>
|
||||
|
||||
LOCAL_DEV=0
|
||||
@@ -36,6 +36,9 @@ ifeq ($(CONFIG_CONTROLLER_USE_LIBDPP),y)
|
||||
TARGET_CFLAGS += -DUSE_LIBDPP
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CONTROLLER_ZEROTOUCH_DPP),y)
|
||||
TARGET_CFLAGS += -DZEROTOUCH_DPP
|
||||
endif
|
||||
|
||||
define Package/map-controller/description
|
||||
This package provides WiFi MultiAP Controller as per the EasyMesh-R2 specs.
|
||||
@@ -74,12 +77,30 @@ ifeq ($(CONFIG_CONTROLLER_PROPAGATE_PROBE_REQ),y)
|
||||
TARGET_CFLAGS += -DPROPAGATE_PROBE_REQ
|
||||
endif
|
||||
|
||||
define Build/InstallDev
|
||||
$(INSTALL_DIR) $(1)/usr/include/map-controller
|
||||
$(INSTALL_DIR) $(1)/usr/include/map-controller/utils
|
||||
$(CP) $(PKG_BUILD_DIR)/src/wifi_dataelements.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/cntlr_commands_impl.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/cntlr_commands.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/cntlr_apis.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/cntlr_plugin.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/wifi_opclass.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/steer_module.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/timer.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/timer_impl.h $(1)/usr/include/map-controller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/utils/debug.h $(1)/usr/include/map-controller/utils
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libcntlr-apis.so $(1)/usr/lib
|
||||
endef
|
||||
|
||||
define Package/map-controller/install
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(CP) ./files/* $(1)/
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/src/mapcontroller $(1)/usr/sbin/
|
||||
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
|
||||
$(CP) $(PKG_BUILD_DIR)/src/libcntlr-apis.so $(1)/usr/lib
|
||||
$(CP) $(PKG_BUILD_DIR)/src/plugins/steer/rcpi/rcpi.so $(1)/usr/lib/mapcontroller/rcpi.so
|
||||
endef
|
||||
|
||||
|
||||
@@ -2,20 +2,18 @@ config controller 'controller'
|
||||
option enabled '1' # may be modified by other package start-up scripts (i.e. map-agent)
|
||||
option profile '3'
|
||||
option registrar '2 5 6'
|
||||
option debug '0'
|
||||
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 allow_bgdfs '0'
|
||||
option stale_sta_timeout '30d'
|
||||
option channel_plan '0'
|
||||
option stale_sta_timeout '20d'
|
||||
option de_collect_interval '60'
|
||||
list plugin 'zerotouch'
|
||||
|
||||
config sta_steering
|
||||
config sta_steering 'sta_steering'
|
||||
option enable_sta_steer '1'
|
||||
option enable_bsta_steer '0'
|
||||
option enable_bsta_steer '1'
|
||||
option rcpi_threshold_2g '70'
|
||||
option rcpi_threshold_5g '86'
|
||||
option rcpi_threshold_6g '86'
|
||||
@@ -25,6 +23,12 @@ config sta_steering
|
||||
option plugins_enabled '1'
|
||||
option plugins_policy 'any'
|
||||
list plugins 'rcpi'
|
||||
list plugins 'rate'
|
||||
list plugins 'bsteer'
|
||||
|
||||
config channel_plan 'channel_plan'
|
||||
option preclear_dfs '0'
|
||||
option acs '0'
|
||||
|
||||
###################
|
||||
# Default AP sections credentials will by updated
|
||||
|
||||
@@ -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' \
|
||||
@@ -71,7 +70,7 @@ validate_ap_section() {
|
||||
'encryption:or("sae", "sae+aes", "psk2",
|
||||
"psk2+aes", "sae-mixed", "sae-mixed+aes",
|
||||
"none", "psk-mixed", "psk-mixed+aes",
|
||||
"psk", "psk+aes")' \
|
||||
"psk", "psk+aes", "wpa", "wpa2", "wpa-mixed")' \
|
||||
'key:string' \
|
||||
'vid:range(1,65535):1' \
|
||||
'type:or("backhaul", "fronthaul", "combined")' \
|
||||
|
||||
@@ -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
|
||||
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
|
||||
cfg=mapcontroller
|
||||
|
||||
# singleton sections
|
||||
sections="channel_plan sta_steering"
|
||||
|
||||
for sec in $sections; do
|
||||
# find unnamed section of given type, only index 0
|
||||
s=$(uci show $cfg | grep -oE "@${sec}\[0\]" | sort -u)
|
||||
[ "$s" = "" ] && continue
|
||||
|
||||
uci rename $cfg.$s=$sec
|
||||
done
|
||||
11
map-plugins/Config.in
Normal file
11
map-plugins/Config.in
Normal file
@@ -0,0 +1,11 @@
|
||||
if (PACKAGE_map-plugins)
|
||||
|
||||
menu "Options"
|
||||
|
||||
config STEER_RATE_PLUGIN
|
||||
bool "STA steering based on estimated throughput of target-AP"
|
||||
default PACKAGE_map-plugins-steer-rate
|
||||
|
||||
endmenu
|
||||
|
||||
endif
|
||||
81
map-plugins/Makefile
Normal file
81
map-plugins/Makefile
Normal file
@@ -0,0 +1,81 @@
|
||||
#
|
||||
# Copyright (C) 2025 Genexis Sweden AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=map-plugins
|
||||
PKG_VERSION:=1.2.7
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=dd873ca4e2cb321302dae1955da24d1be271b2b1
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/map-plugins.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:=PROPRIETARY GENEXIS
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_mapcontroller
|
||||
PKG_BUILD_DEPENDS := map-controller
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
|
||||
include $(wildcard plugins/*.mk)
|
||||
|
||||
TARGET_CFLAGS += \
|
||||
-I$(STAGING_DIR)/usr/include \
|
||||
-I$(STAGING_DIR)/usr/include/libnl3 \
|
||||
-D_GNU_SOURCE
|
||||
|
||||
MAKE_FLAGS += \
|
||||
CFLAGS="$(TARGET_CFLAGS) -Wall"
|
||||
|
||||
plugins := \
|
||||
$(if $(CONFIG_PACKAGE_map-plugins-steer-rate),steer-rate) \
|
||||
$(if $(CONFIG_PACKAGE_map-plugins-bsteer),bsteer) \
|
||||
$(if $(CONFIG_PACKAGE_map-plugins-zero-touch),zero-touch)
|
||||
|
||||
ppkg:=$(patsubst plugins/%.mk,map-plugins-%,$(wildcard plugins/*.mk))
|
||||
|
||||
define Package/map-plugins/Default
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
SUBMENU:=Multi-AP value added services
|
||||
endef
|
||||
|
||||
define Package/map-plugins/config
|
||||
source "$(SOURCE)/Config.in"
|
||||
endef
|
||||
|
||||
define Package/map-plugins
|
||||
$(call Package/map-plugins/Default)
|
||||
TITLE:=Multi-AP plugins modules
|
||||
DEPENDS+=+libeasy +libwifiutils +map-controller
|
||||
endef
|
||||
|
||||
define Package/map-plugins/description
|
||||
Provides extra Multi-AP services viz. steering, channel-planning,
|
||||
self-organizing network, zero-touch onboarding etc.
|
||||
endef
|
||||
|
||||
define Package/map-plugins/install
|
||||
:
|
||||
endef
|
||||
|
||||
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))))
|
||||
20
map-plugins/plugins/bsteer.mk
Normal file
20
map-plugins/plugins/bsteer.mk
Normal file
@@ -0,0 +1,20 @@
|
||||
define Package/map-plugins-bsteer
|
||||
$(call Package/map-plugins/Default)
|
||||
TITLE:=Wi-Fi backhaul steering plugin based on maximizing backhaul throughput
|
||||
DEPENDS= +libubox +libuci +libubus +libeasy +libnl-genl \
|
||||
+libjson-c +libblobmsg-json +map-controller \
|
||||
+map-plugins
|
||||
endef
|
||||
|
||||
define Package/map-plugins-bsteer/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib
|
||||
$(INSTALL_DIR) $(1)/usr/lib/mapcontroller
|
||||
$(CP) $(PKG_BUILD_DIR)/steer/bsteer/bsteer.so $(1)/usr/lib/mapcontroller/bsteer.so
|
||||
endef
|
||||
|
||||
define Build/Compile/map-plugins-bsteer
|
||||
$(MAKE) -C $(PKG_BUILD_DIR)/steer/bsteer \
|
||||
CC="$(TARGET_CC)" \
|
||||
CFLAGS="$(TARGET_CFLAGS)" \
|
||||
LDFLAGS="$(TARGET_LDFLAGS)";
|
||||
endef
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user