mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-20 01:20:35 +08:00
Compare commits
852 Commits
sysmngr_co
...
4a7463b205
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4a7463b205 | ||
|
|
073deb5828 | ||
|
|
5d23c8b5a1 | ||
|
|
288bbbd640 | ||
|
|
4461233f96 | ||
|
|
7784e915bc | ||
|
|
a2cfd3615f | ||
|
|
a84600031a | ||
|
|
781967f4aa | ||
|
|
d34671b1d0 | ||
|
|
ee51171fd8 | ||
|
|
54f08fc89b | ||
|
|
b2d62ee320 | ||
|
|
c68ca0390a | ||
|
|
a564e3bb8d | ||
|
|
1f57adfee5 | ||
|
|
4727a315ca | ||
|
|
8ff6663501 | ||
|
|
8608d4aa01 | ||
|
|
8eff97b281 | ||
|
|
2347dbfaa3 | ||
|
|
ad2c6a17a4 | ||
|
|
e529bc2564 | ||
|
|
27c1022601 | ||
|
|
6002211053 | ||
|
|
9c00a0928b | ||
|
|
7cdeecb7f7 | ||
|
|
6690b29272 | ||
|
|
8a4d122063 | ||
|
|
d39b3ebaa4 | ||
|
|
1606a6bcd1 | ||
|
|
9e5c376576 | ||
|
|
bdc435c392 | ||
|
|
2d5570f6a0 | ||
|
|
09c488c1e6 | ||
|
|
9aa6878efc | ||
|
|
35b7e24278 | ||
|
|
0a00e910ba | ||
|
|
5d9c9d5708 | ||
|
|
401790274c | ||
|
|
4989129f2d | ||
|
|
a55324acc3 | ||
|
|
a9ce2df71a | ||
|
|
22f43092f4 | ||
|
|
6be2d52199 | ||
|
|
0ec72bec22 | ||
|
|
8b17665845 | ||
|
|
d9e9e53361 | ||
|
|
0fb178476f | ||
|
|
9ccae677a6 | ||
|
|
b6a6a37005 | ||
|
|
fe7a0b7d0c | ||
|
|
d9688d0d7b | ||
|
|
e5769f9b33 | ||
|
|
b50c9eb386 | ||
|
|
ab5e3a42b9 | ||
|
|
14609a860e | ||
|
|
d9c18aaf91 | ||
|
|
74f299a687 | ||
|
|
e97d29ed6b | ||
|
|
a9be5ff573 | ||
|
|
3e6eadcbec | ||
|
|
84394e3639 | ||
|
|
24f52886b8 | ||
|
|
9f6550a827 | ||
|
|
a04244942b | ||
|
|
2cc9859309 | ||
|
|
f918829cb7 | ||
|
|
0dac08d363 | ||
|
|
e4e41c837c | ||
|
|
4a61fc9674 | ||
|
|
012c3e1169 | ||
|
|
288dfa9244 | ||
|
|
b9e47162d0 | ||
|
|
1f18545faa | ||
|
|
93e592f583 | ||
|
|
92b0d5aed2 | ||
|
|
466a149107 | ||
|
|
1577a9bf69 | ||
|
|
3e1f65d668 | ||
|
|
08a56514f4 | ||
|
|
34ff04d8bb | ||
|
|
1e0b705c8b | ||
|
|
5b5a9bb231 | ||
|
|
5b6697789b | ||
|
|
172a0066dd | ||
|
|
44cd1ae18e | ||
|
|
37c2358ca5 | ||
|
|
b3d2b111f0 | ||
|
|
4ef899324b | ||
|
|
d39d28e6d8 | ||
|
|
cb48886ceb | ||
|
|
a7bbd943cc | ||
|
|
f74c2041ec | ||
|
|
ae2474d273 | ||
|
|
153b75395d | ||
|
|
3da4280752 | ||
|
|
95c7cb447b | ||
|
|
c9e9ac9a4e | ||
|
|
06921165db | ||
|
|
5c9a63c2a1 | ||
|
|
57530b8838 | ||
|
|
95a1d6899b | ||
|
|
724f456e3c | ||
|
|
9ef41069d6 | ||
|
|
eda55e9d9d | ||
|
|
bdead2797a | ||
|
|
022b138347 | ||
|
|
9f8a8b5591 | ||
|
|
7c8afb8eaf | ||
|
|
56bff31f81 | ||
|
|
59511621c6 | ||
|
|
fe73b36293 | ||
|
|
de85db9fa6 | ||
|
|
607b546317 | ||
|
|
47f964bd0d | ||
|
|
272656caa9 | ||
|
|
3ae1ba4530 | ||
|
|
d5c15c995e | ||
|
|
d73b91bdd3 | ||
|
|
e327dbce29 | ||
|
|
92d5156a9f | ||
|
|
63779cf56e | ||
|
|
96de2ee6c5 | ||
|
|
e768cb4c1d | ||
|
|
c02570e234 | ||
|
|
6750377b0e | ||
|
|
14eeac7c60 | ||
|
|
bfb09c7275 | ||
|
|
12c617822f | ||
|
|
71646ac551 | ||
|
|
740c050cd7 | ||
|
|
bb4069ce9b | ||
|
|
fa994ebd09 | ||
|
|
07efbdd3bd | ||
|
|
d9ef12897c | ||
|
|
7e0520c1d6 | ||
|
|
72bd92c9ea | ||
|
|
dbbc48a93a | ||
|
|
a5c6eb86c4 | ||
|
|
ac0b85f837 | ||
|
|
38d8d01f27 | ||
|
|
2ccfa1da43 | ||
|
|
731bd20943 | ||
|
|
67b71ce206 | ||
|
|
76713ffa40 | ||
|
|
49d18417db | ||
|
|
a39ffe9ebb | ||
|
|
853b5ec8bc | ||
|
|
7baa1ac579 | ||
|
|
1d7df80538 | ||
|
|
2e29c5c777 | ||
|
|
beda74eaaf | ||
|
|
e461b9d1f6 | ||
|
|
4265c3d191 | ||
|
|
9d5099944e | ||
|
|
46a14f82b6 | ||
|
|
f8f8ad7453 | ||
|
|
b74e5bcb6f | ||
|
|
0b3ed4c2f2 | ||
|
|
67a56f09c6 | ||
|
|
0fbb37f4ed | ||
|
|
60d395923d | ||
|
|
53a6bd9304 | ||
|
|
7354b4d971 | ||
|
|
28da651279 | ||
|
|
a582d6d115 | ||
|
|
341a925504 | ||
|
|
82c54d9422 | ||
|
|
660809e83e | ||
|
|
d34205adb1 | ||
|
|
dad2b56c02 | ||
|
|
e6618e200f | ||
|
|
c4f4f3e093 | ||
|
|
d454d20716 | ||
|
|
12d4d23f6e | ||
|
|
c2310ebb25 | ||
|
|
be472781d9 | ||
|
|
e4274b9c15 | ||
|
|
16d94a6628 | ||
|
|
bb090135b2 | ||
|
|
8d7cf1c701 | ||
|
|
9692cf8bc3 | ||
|
|
7fa5c901f9 | ||
|
|
7c2cbc4c1a | ||
|
|
a9bdc41462 | ||
|
|
389485a526 | ||
|
|
8087a16cdf | ||
|
|
4e33db2700 | ||
|
|
e6b7048775 | ||
|
|
23c43898a4 | ||
|
|
abebc40733 | ||
|
|
4823154afb | ||
|
|
936ce9be85 | ||
|
|
996c0b1832 | ||
|
|
8c4e77a96b | ||
|
|
e647ec0990 | ||
|
|
4cfbb3636f | ||
|
|
528ad5cbd2 | ||
|
|
def81d62d5 | ||
|
|
ad3028061c | ||
|
|
2c58ce6912 | ||
|
|
064418e23d | ||
|
|
ba95eec1b5 | ||
|
|
8554ccf3fc | ||
|
|
d6cf506901 | ||
|
|
263723b795 | ||
|
|
21724ac691 | ||
|
|
3422f7fc4d | ||
|
|
19e4b41368 | ||
|
|
db30526f64 | ||
|
|
d4c101f90f | ||
|
|
d90063c7d5 | ||
|
|
09323326f4 | ||
|
|
33b62a44c5 | ||
|
|
9d0f9750dc | ||
|
|
e68abd6288 | ||
|
|
61559073e8 | ||
|
|
ffd8352d38 | ||
|
|
d75d3bc3ed | ||
|
|
86ef800f0d | ||
|
|
130a3e5952 | ||
|
|
0d4b4c5399 | ||
|
|
2240a84adc | ||
|
|
d4dfe767c9 | ||
|
|
58f141573a | ||
|
|
91fac0490a | ||
|
|
a80713423c | ||
|
|
d530ffa4ba | ||
|
|
2da18cbb7d | ||
|
|
c89816ac60 | ||
|
|
03810c0099 | ||
|
|
aad4bd7db5 | ||
|
|
f36ba2dc1f | ||
|
|
91dced7427 | ||
|
|
57ef92af9a | ||
|
|
631122aa04 | ||
|
|
ede7966809 | ||
|
|
9a36c0310f | ||
|
|
2528cde629 | ||
|
|
f317c67aed | ||
|
|
7f14f8634e | ||
|
|
62552e2269 | ||
|
|
5837b73946 | ||
|
|
22bded8f33 | ||
|
|
1fbf254b3a | ||
|
|
3b6f88daed | ||
|
|
f8ceb6293d | ||
|
|
d5375c89b1 | ||
|
|
1301adc7c6 | ||
|
|
85d7715db7 | ||
|
|
25cb059235 | ||
|
|
a87b85eba5 | ||
|
|
49a83e17cb | ||
|
|
2ec059a373 | ||
|
|
7193985d39 | ||
|
|
74372dab99 | ||
|
|
6bc7842b0d | ||
|
|
87c2d0bb10 | ||
|
|
1e2f6161d6 | ||
|
|
bbb3df8c17 | ||
|
|
945d95b518 | ||
|
|
9eee6a59f8 | ||
|
|
1c6e8aaec8 | ||
|
|
aa7ad2dfe9 | ||
|
|
dd637db803 | ||
|
|
04b74dca49 | ||
|
|
5ab49f8ff4 | ||
|
|
4ac917a191 | ||
|
|
37d313ccc5 | ||
|
|
a225cc2e3f | ||
|
|
6df061de8e | ||
|
|
c6d3cac61e | ||
|
|
f1ac19b604 | ||
|
|
27bd279333 | ||
|
|
f7d845beaa | ||
|
|
41c39445bc | ||
|
|
f1c7fc9e1e | ||
|
|
426ddd0f30 | ||
|
|
9c26dc269e | ||
|
|
775c7bf9b9 | ||
|
|
154532348b | ||
|
|
ed638f3913 | ||
|
|
a3298e14cc | ||
|
|
0c72ad488c | ||
|
|
d39b258091 | ||
|
|
d4398bc4a7 | ||
|
|
4f479680b0 | ||
|
|
888b1c186a | ||
|
|
5ebb2552ac | ||
|
|
e7f26ec647 | ||
|
|
f4350eba32 | ||
|
|
e781b0c1cc | ||
|
|
075280c30b | ||
|
|
bd984a6f1c | ||
|
|
f017ef0b41 | ||
|
|
daf540bf4d | ||
|
|
9177090e7c | ||
|
|
8001d9d14b | ||
|
|
28c22277cd | ||
|
|
a82c3562f2 | ||
|
|
d6e6747380 | ||
|
|
9cf65109e8 | ||
|
|
819b9e3e97 | ||
|
|
05cf17b007 | ||
|
|
4538e26d87 | ||
|
|
c45695ce93 | ||
|
|
e8124555bb | ||
|
|
596df801e6 | ||
|
|
b713b68045 | ||
|
|
869d482198 | ||
|
|
e5c59ebfcd | ||
|
|
fd0c7e93ef | ||
|
|
862a278fbe | ||
|
|
87aa6ea898 | ||
|
|
64c6ff7787 | ||
|
|
ab66957fad | ||
|
|
e590fc7894 | ||
|
|
785f2e9db2 | ||
|
|
35cb886b3e | ||
|
|
a1e8a8a464 | ||
|
|
98c35bf25f | ||
|
|
7cc2e3eac9 | ||
|
|
f6aff4ba81 | ||
|
|
cbd0b5b6bb | ||
|
|
d2df0e5633 | ||
|
|
43be3d334c | ||
|
|
900c221ef8 | ||
|
|
1b88e03e43 | ||
|
|
b9e40818a3 | ||
|
|
af272291d2 | ||
|
|
e7e49350b1 | ||
|
|
40056f3e65 | ||
|
|
110589b1e2 | ||
|
|
a3352224c2 | ||
|
|
9e3cbbc1f7 | ||
|
|
dd18f6f9ed | ||
|
|
e69fba300a | ||
|
|
0bd3c5e020 | ||
|
|
bd115c48bf | ||
|
|
6241dc0500 | ||
|
|
5986d9ad3f | ||
|
|
e1d1b37edf | ||
|
|
ac6c0c3e60 | ||
|
|
ee13ac5774 | ||
|
|
f4fa5821e5 | ||
|
|
324f482548 | ||
|
|
a794e51f56 | ||
|
|
8bdc47344a | ||
|
|
544b0346d7 | ||
|
|
b95714fcb9 | ||
|
|
19ff37bd9b | ||
|
|
95f47e28a1 | ||
|
|
4edd2e5cbf | ||
|
|
3d54e83e0d | ||
|
|
ead2de7ad1 | ||
|
|
8e21d2d702 | ||
|
|
a2627faef1 | ||
|
|
10a0fa34c3 | ||
|
|
6e8c83eafd | ||
|
|
53cea83a61 | ||
|
|
69ff8452e2 | ||
|
|
f7c39b5fef | ||
|
|
7765b3de9c | ||
|
|
a51d5e6616 | ||
|
|
971392a796 | ||
|
|
291cd43b10 | ||
|
|
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 | ||
|
|
499f77d498 | ||
|
|
480c954677 | ||
|
|
9a5564bca4 | ||
|
|
67ee062946 | ||
|
|
7ecdc3ccb4 | ||
|
|
36490a7cda | ||
|
|
1d31c5f795 | ||
|
|
9a934269ae | ||
|
|
82e8c63c88 | ||
|
|
4fe71d66d3 | ||
|
|
74eac091ff | ||
|
|
94cf651a6c | ||
|
|
08f909388c | ||
|
|
148d25caf0 | ||
|
|
8d8cc94cdf | ||
|
|
0d6c7b2f70 | ||
|
|
0623e7017f | ||
|
|
013f820b12 | ||
|
|
9fd4584cdb | ||
|
|
3b3035441e | ||
|
|
38f36f3bdf | ||
|
|
b27646211b | ||
|
|
70b5c78d22 | ||
|
|
2356ed6075 | ||
|
|
39d484817e | ||
|
|
a73c089c2a | ||
|
|
22d9f90528 | ||
|
|
ac93499202 | ||
|
|
4dfc3455fb | ||
|
|
5bc00d53fd | ||
|
|
6ec25f158c | ||
|
|
9817ca11b5 | ||
|
|
ca49dfac97 | ||
|
|
44238e2033 | ||
|
|
e1d4bddbcf | ||
|
|
c6a739ddc0 | ||
|
|
38f657fa84 | ||
|
|
f5488143cd | ||
|
|
cebbf0f860 | ||
|
|
dcac2bd261 | ||
|
|
82c6cca440 | ||
|
|
2a952644c5 | ||
|
|
fac25dc016 | ||
|
|
623e1dc34e | ||
|
|
ed30787ca4 | ||
|
|
d68e0847c4 | ||
|
|
08cb598de4 | ||
|
|
2763ba7656 | ||
|
|
2591116be3 | ||
|
|
06876807c1 | ||
|
|
65344ebdc5 | ||
|
|
7dc743630c | ||
|
|
a8d7adbd1f | ||
|
|
ba215d1d6f | ||
|
|
fdfa1526b8 | ||
|
|
a93bde6fb5 | ||
|
|
4135fbe369 | ||
|
|
e4e63ba991 | ||
|
|
832947703c | ||
|
|
14e5601aed | ||
|
|
d3b2d4d9bf | ||
|
|
8741d7d82e | ||
|
|
910538aad7 | ||
|
|
5f36441b11 | ||
|
|
075728ce3e | ||
|
|
21687b6dc9 | ||
|
|
b5c2667d68 | ||
|
|
589c856cb7 | ||
|
|
e819a32cd7 | ||
|
|
bc8c70f7d0 | ||
|
|
fb17c3f51b | ||
|
|
0dfd361033 | ||
|
|
6d31feaa00 | ||
|
|
9df2d4b15e | ||
|
|
b91ae7f7f0 | ||
|
|
6df1768244 | ||
|
|
0a7245d2f9 | ||
|
|
6166ba0041 | ||
|
|
02577401c7 | ||
|
|
eccfd8970a | ||
|
|
7097827eb8 | ||
|
|
29e9ba389a | ||
|
|
4c6f70342a | ||
|
|
4708da4734 | ||
|
|
55aba515ff | ||
|
|
b1c9ce0d25 | ||
|
|
d3ae8b5020 | ||
|
|
ca962744b8 | ||
|
|
31c7500042 | ||
|
|
e71ee20840 | ||
|
|
38763bfc0d | ||
|
|
a43e3530c9 | ||
|
|
86ede4ab6b | ||
|
|
d234e7adcc | ||
|
|
e7e5ede6b9 | ||
|
|
476aee97a6 | ||
|
|
784c6553d8 | ||
|
|
e2883f0f45 | ||
|
|
30d01926a8 | ||
|
|
f6510849d6 | ||
|
|
d49e72be07 | ||
|
|
35e9ed9b1b | ||
|
|
e66516242a | ||
|
|
4affd50d2c | ||
|
|
06dec89452 | ||
|
|
130dbeacd5 | ||
|
|
d576d81b1f | ||
|
|
ee6edfa5a9 | ||
|
|
2f8c5e3f53 | ||
|
|
5c0010edf8 | ||
|
|
001eb7e0a3 | ||
|
|
a2209f555b | ||
|
|
8c09e8658e | ||
|
|
1d85f324a4 | ||
|
|
65926415ad | ||
|
|
50e865df53 | ||
|
|
cf352e9990 | ||
|
|
ecec95ca57 | ||
|
|
9a051abbf1 | ||
|
|
d3b5d8d598 | ||
|
|
3c4bbfb6d6 | ||
|
|
0122493c01 | ||
|
|
6098c3ab56 | ||
|
|
252c98c4ef | ||
|
|
5ea17980c8 | ||
|
|
3ba06fa10f | ||
|
|
013086f558 | ||
|
|
3a8f8d604f | ||
|
|
8612f5d4f6 | ||
|
|
6aef37d406 | ||
|
|
753dc05320 | ||
|
|
74878254b7 | ||
|
|
4f2697217a | ||
|
|
e36a9bc381 | ||
|
|
a52d654c4f | ||
|
|
6cf5641ea7 | ||
|
|
bce378a665 | ||
|
|
9952f6e580 | ||
|
|
7d0b38b9a7 | ||
|
|
3a503ea955 | ||
|
|
13cac21c60 | ||
|
|
f251701534 | ||
|
|
5b882870c9 | ||
|
|
25f3acf2fd | ||
|
|
c1fe6b05a6 | ||
|
|
4ee9169771 | ||
|
|
7172201515 | ||
|
|
c366451def | ||
|
|
5874a005c6 | ||
|
|
ffab63b86f | ||
|
|
929dd55d21 | ||
|
|
3636e217a6 | ||
|
|
b99d4413dc | ||
|
|
f2f6f6b787 | ||
|
|
f2ea1049e0 | ||
|
|
ba837ff98a | ||
|
|
324244d26b | ||
|
|
0cded2b974 | ||
|
|
27f0f7454f | ||
|
|
3ff559907b | ||
|
|
d73f8975cf | ||
|
|
3ddf258a74 | ||
|
|
cd2c817223 | ||
|
|
370c5938aa | ||
|
|
ddd88a894c | ||
|
|
459f2571ec | ||
|
|
c555b48d16 | ||
|
|
6a0f353c93 | ||
|
|
21e742d9f7 | ||
|
|
f4654e78c5 | ||
|
|
72c3e3c8ce | ||
|
|
1adf7b669f | ||
|
|
39ec8635c3 | ||
|
|
5a3fbb7902 | ||
|
|
5ecc3945f9 | ||
|
|
8a52715ad1 | ||
|
|
8333a499d0 | ||
|
|
941a46dae6 | ||
|
|
86d7bf8c67 | ||
|
|
4ef5d86feb | ||
|
|
c97637fd5f | ||
|
|
033613f999 | ||
|
|
b18f6dc39c | ||
|
|
5f5b171d5a | ||
|
|
469e9d1196 | ||
|
|
53b824d2e0 | ||
|
|
4df9b5ab94 | ||
|
|
130cf8fd53 | ||
|
|
bfd327ca02 | ||
|
|
bcea816742 | ||
|
|
ee6a27dc76 | ||
|
|
78eb76e913 | ||
|
|
21c3354b31 | ||
|
|
dcfa48d1f7 | ||
|
|
56d352fc83 | ||
|
|
56093ef532 | ||
|
|
60f1d0edbf | ||
|
|
c2021e765a | ||
|
|
83c31acbc7 | ||
|
|
9380411fa6 | ||
|
|
2a47619b32 | ||
|
|
f2c665a0cf | ||
|
|
1dca89c130 | ||
|
|
63d3ca365b | ||
|
|
fa4f08aa29 | ||
|
|
858dd78ff7 | ||
|
|
eb0e19355d | ||
|
|
4015982a87 | ||
|
|
0b6e35e36b | ||
|
|
cca03dc995 | ||
|
|
3d69811bf4 | ||
|
|
5a7e44cd04 | ||
|
|
b883f2b310 | ||
|
|
97a845fda2 | ||
|
|
21cdf07e54 | ||
|
|
13094c3a1b | ||
|
|
d3cb6a70da | ||
|
|
19570e553d | ||
|
|
50e2add3ab | ||
|
|
e33340ea8d | ||
|
|
6b882610c2 | ||
|
|
383dedb443 | ||
|
|
a8a2066675 | ||
|
|
73dfc49647 | ||
|
|
083cbd7b56 | ||
|
|
e87bcbb819 | ||
|
|
f8561996ab | ||
|
|
01d320300e | ||
|
|
3faecd3979 | ||
|
|
984962e34e | ||
|
|
6140bfa09c | ||
|
|
2cbb433cbd | ||
|
|
c676cde1fb | ||
|
|
363c2ff155 | ||
|
|
2a2650b43e | ||
|
|
a5c13c4ae7 | ||
|
|
bf40d37745 | ||
|
|
8889d06568 | ||
|
|
e7d2f54bda | ||
|
|
1e31d2accd | ||
|
|
1e08854dce | ||
|
|
cb27d96fe6 | ||
|
|
943667adc6 | ||
|
|
89b2c6ab19 | ||
|
|
760cd38113 | ||
|
|
1abc312d2c | ||
|
|
09abf6d6b1 | ||
|
|
fa203d73e0 | ||
|
|
880741d8c3 | ||
|
|
42bd6390b5 | ||
|
|
c9856f2a5b | ||
|
|
c086f72400 | ||
|
|
a50c380722 | ||
|
|
2755d6be1c | ||
|
|
359db9ddc3 | ||
|
|
e4f3daf1ed | ||
|
|
557ea195ba | ||
|
|
1c14d9f652 | ||
|
|
b8ebda638c | ||
|
|
db089a3920 | ||
|
|
4110c22f64 | ||
|
|
5b07fcce33 | ||
|
|
2219f2efba | ||
|
|
ba3b00c784 | ||
|
|
9598258993 | ||
|
|
32ab2eb2cc | ||
|
|
63c27601e5 | ||
|
|
f2d4b6ff7d | ||
|
|
e945226956 | ||
|
|
9a7ff0bbf2 | ||
|
|
97830621a6 | ||
|
|
1c77fb2e76 | ||
|
|
67c4a3c317 | ||
|
|
7f17359913 | ||
|
|
b6212b90d8 | ||
|
|
74cbe1062a | ||
|
|
2be4eeebb7 | ||
|
|
a49407ad79 | ||
|
|
24737321b0 | ||
|
|
3a72a7ee61 | ||
|
|
d9b6136916 | ||
|
|
537e1758c3 | ||
|
|
c6bbe14c6f | ||
|
|
8af265a689 | ||
|
|
193a6cf502 | ||
|
|
d6c148f7e3 | ||
|
|
afdc0006b5 | ||
|
|
2cb0f6e159 | ||
|
|
db72ee376e | ||
|
|
2bbeb83eb2 | ||
|
|
f718adf692 | ||
|
|
2aaf56ac6d | ||
|
|
426cc077e0 | ||
|
|
879e549581 | ||
|
|
78f6198d0a | ||
|
|
6ddaa150b4 | ||
|
|
9188a99c99 | ||
|
|
352a56448e | ||
|
|
5c7fea694f | ||
|
|
5474007dcf | ||
|
|
320d155a96 | ||
|
|
73f91e09db | ||
|
|
36d2b24bae | ||
|
|
f9010d9ef1 | ||
|
|
aeda3280b3 | ||
|
|
5e3b30daa8 | ||
|
|
ee2165b184 | ||
|
|
1b7fa8ba15 | ||
|
|
052dc52801 | ||
|
|
4373ec21aa | ||
|
|
892e0f3599 | ||
|
|
d9a742b734 | ||
|
|
9e1a8de1bd | ||
|
|
73c8e7eb75 | ||
|
|
41ba4fcedc | ||
|
|
b673daf265 | ||
|
|
06b9f7eb00 | ||
|
|
092026794e | ||
|
|
0bc9dd365f | ||
|
|
f4eb3ec090 | ||
|
|
7596b3b4f4 | ||
|
|
d546e1699f | ||
|
|
fe4a859af6 |
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bbfdm
|
||||
PKG_VERSION:=1.15.4
|
||||
PKG_VERSION:=1.16.6.6
|
||||
|
||||
USE_LOCAL:=0
|
||||
ifneq ($(USE_LOCAL),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bbfdm.git
|
||||
PKG_SOURCE_VERSION:=1c417534a8a72d5370414f74b693e226ce96af0f
|
||||
PKG_SOURCE_VERSION:=6317266bdfb0180d75ed2dd830e108f09fe2526a
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -70,6 +70,15 @@ define Package/bbfdmd/config
|
||||
source "$(SOURCE)/Config_bbfdmd.in"
|
||||
endef
|
||||
|
||||
# Below config is a hack to force-recompile dependent micro-services
|
||||
define Package/libbbfdm-api/config
|
||||
if PACKAGE_bbfdmd
|
||||
config BBF_LIBBBFDM_VERSION
|
||||
string "Internal config variable to force recompile"
|
||||
default "v${PKG_VERSION}"
|
||||
endif
|
||||
endef
|
||||
|
||||
define Package/libbbfdm-api/description
|
||||
Library contains the API(UCI, UBUS, JSON, CLI and Browse) of libbbfdm
|
||||
endef
|
||||
@@ -98,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" \
|
||||
|
||||
|
||||
@@ -146,6 +155,10 @@ define Package/bbfdmd/install
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/91-fix-bbfdmd-enabled-option $(1)/etc/uci-defaults/
|
||||
$(INSTALL_BIN) ./files/etc/uci-defaults/ruleng.bbfdm $(1)/etc/uci-defaults
|
||||
|
||||
$(INSTALL_DIR) $(1)/etc/ruleng
|
||||
$(INSTALL_BIN) ./files/etc/ruleng/bbfdm.json $(1)/etc/ruleng
|
||||
endef
|
||||
|
||||
define Package/dm-service/install
|
||||
|
||||
@@ -6,6 +6,7 @@ BBFDM_BASE_DM_PATH=/usr/share/bbfdm
|
||||
BBFDM_INPUT_PATH=/etc/bbfdm/micro_services
|
||||
BBFDM_DIR:=$(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
||||
|
||||
PKG_CONFIG_DEPENDS += CONFIG_BBF_LIBBBFDM_VERSION
|
||||
#BBFDM_VERSION:=$(shell grep -oP '(?<=^PKG_VERSION:=).*' ${BBFDM_DIR}/Makefile)
|
||||
#BBFDM_TOOLS:=$(BUILD_DIR)/bbfdm-$(BBFDM_VERSION)/tools
|
||||
|
||||
|
||||
@@ -8,15 +8,16 @@
|
||||
"ieee1905",
|
||||
"mapcontroller",
|
||||
"mosquitto",
|
||||
"nginx"
|
||||
"nginx",
|
||||
"netmode"
|
||||
],
|
||||
"cwmp": [
|
||||
"firewall",
|
||||
"network",
|
||||
"dhcp",
|
||||
"stunc",
|
||||
"xmpp",
|
||||
"mapcontroller",
|
||||
"wireless",
|
||||
"time"
|
||||
"time",
|
||||
"netmode"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
config bbfdmd 'bbfdmd'
|
||||
option enable '1'
|
||||
option debug '0'
|
||||
option loglevel '4'
|
||||
option loglevel '3'
|
||||
|
||||
config micro_services 'micro_services'
|
||||
option enable '1'
|
||||
|
||||
66
bbfdm/files/etc/ruleng/bbfdm.json
Normal file
66
bbfdm/files/etc/ruleng/bbfdm.json
Normal file
@@ -0,0 +1,66 @@
|
||||
{
|
||||
"hosts_refresh": {
|
||||
"if" : [
|
||||
{
|
||||
"event": "host"
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"object": "bbfdm.hostmngr",
|
||||
"method":"refresh_references_db",
|
||||
"args" : {},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"dhcp_refresh": {
|
||||
"if_operator": "OR",
|
||||
"if" : [
|
||||
{
|
||||
"event": "host"
|
||||
},
|
||||
{
|
||||
"event": "wifi.dataelements.Associated"
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"object": "bbfdm.dhcpmngr",
|
||||
"method":"refresh_references_db",
|
||||
"args" : {},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"ieee1905_refresh_add": {
|
||||
"if" : [
|
||||
{
|
||||
"event": "ieee1905.neighbor.add"
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"object": "bbfdm.ieee1905",
|
||||
"method":"refresh_references_db",
|
||||
"args" : {},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
},
|
||||
"ieee1905_refresh_del": {
|
||||
"if" : [
|
||||
{
|
||||
"event": "ieee1905.neighbor.del"
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"object": "bbfdm.ieee1905",
|
||||
"method":"refresh_references_db",
|
||||
"args" : {},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -51,10 +51,6 @@ parse_bbfdm_sysctl_conf_file() {
|
||||
|
||||
# Replace the original file with the modified content
|
||||
mv "$tmpfile" "${bbfdm_sysctl_conf}"
|
||||
|
||||
# Apply the changes
|
||||
uci commit network
|
||||
sysctl -e -p "${bbfdm_sysctl_conf}" >&-
|
||||
}
|
||||
|
||||
parse_bbfdm_sysctl_conf_file
|
||||
|
||||
2
bbfdm/files/etc/uci-defaults/ruleng.bbfdm
Normal file
2
bbfdm/files/etc/uci-defaults/ruleng.bbfdm
Normal file
@@ -0,0 +1,2 @@
|
||||
uci -q set ruleng.bbfdm=rule
|
||||
uci -q set ruleng.bbfdm.recipe='/etc/ruleng/bbfdm.json'
|
||||
@@ -12,6 +12,7 @@ DEST=""
|
||||
VENDOR_EXTN=""
|
||||
TOOLS="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
SRC=""
|
||||
EXTRA_DATA=""
|
||||
|
||||
while getopts ":mpsdtv:" opt; do
|
||||
case ${opt} in
|
||||
@@ -46,6 +47,9 @@ shift
|
||||
DEST="${1}"
|
||||
shift
|
||||
DATA="${1}"
|
||||
shift
|
||||
EXTRA_DATA="${1}"
|
||||
|
||||
|
||||
install_bin() {
|
||||
if ! install -m0755 ${1} ${2}; then
|
||||
@@ -144,8 +148,9 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${DATA}" ]; then
|
||||
echo "# Package name not provided ...."
|
||||
service_name="$(cat ${SRC}|jq -r '.daemon.service_name')"
|
||||
if [ -z "${service_name}" ]; then
|
||||
echo "# service_name not defined in service json ...."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -156,7 +161,7 @@ if [ "${INPUT_FILE}" -eq "1" ]; then
|
||||
fi
|
||||
|
||||
install_dir ${DEST}/etc/bbfdm/services
|
||||
install_data ${tempfile} ${DEST}/etc/bbfdm/services/${DATA}.json
|
||||
install_data ${tempfile} ${DEST}/etc/bbfdm/services/${service_name}.json
|
||||
|
||||
if [ -f "${tempfile}" ]; then
|
||||
rm ${tempfile}
|
||||
@@ -176,7 +181,7 @@ if [ "${MICRO_SERVICE}" -eq "1" ]; then
|
||||
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}.${extn##*.}
|
||||
else
|
||||
install_dir ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}
|
||||
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(basename ${SRC})
|
||||
bbfdm_install_dm ${SRC} ${DEST}/${BBFDM_BASE_DM_PATH}/micro_services/${DATA}/$(printf "%02d" ${EXTRA_DATA})$(basename ${SRC})
|
||||
fi
|
||||
else
|
||||
if [ "${PLUGIN}" -eq "1" ]; then
|
||||
|
||||
@@ -5,14 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bridgemngr
|
||||
PKG_VERSION:=1.0.11
|
||||
PKG_VERSION:=1.0.18.2
|
||||
|
||||
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:=18c2921a1cf5bfa027c11c5e6ca605ef69fd1168
|
||||
PKG_SOURCE_VERSION:=71ed529be038392071b0399bcfe9d46e89d3cb46
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -59,8 +58,8 @@ define Package/bridgemngr/install
|
||||
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libbridgemngr.so $(1) $(PKG_NAME)
|
||||
ifeq ($(CONFIG_BRIDGEMNGR_BRIDGE_VENDOR_EXT), y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libbridgeext.so $(1) $(PKG_NAME) 10
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) -v ${VENDOR_PREFIX} ./files/VLAN_Filtering_Extension.json $(1) $(PKG_NAME) 11
|
||||
endif
|
||||
|
||||
$(INSTALL_BIN) ./files/etc/init.d/bridging $(1)/etc/init.d/
|
||||
|
||||
@@ -7,13 +7,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bulkdata
|
||||
PKG_VERSION:=2.1.19
|
||||
PKG_VERSION:=2.1.20
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/bulkdata.git
|
||||
PKG_SOURCE_VERSION:=628525b02ae9ccd39f4bc85cf616ed4a102bca48
|
||||
PKG_SOURCE_VERSION:=a5e57962938ca143ede65d92be90b6e9fce66e15
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -3,11 +3,11 @@
|
||||
"enable": "1",
|
||||
"service_name": "bulkdata",
|
||||
"unified_daemon": true,
|
||||
"proto": "cwmp",
|
||||
"services": [
|
||||
{
|
||||
"parent_dm": "Device.",
|
||||
"object": "BulkData",
|
||||
"proto": "cwmp"
|
||||
"object": "BulkData"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ddnsmngr
|
||||
PKG_VERSION:=1.0.10
|
||||
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:=5144e73fad92d23ae706894a4357436c3fe89355
|
||||
PKG_SOURCE_VERSION:=44af9a7b3fec3929f8554af9633a5b8068189b48
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
#
|
||||
# Copyright (C) 2021-2023 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2021-2024 IOPSYS Software Solutions AB
|
||||
# Copyright (C) 2025 Genexis AB
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=decollector
|
||||
PKG_VERSION:=6.2.0.1
|
||||
PKG_VERSION:=6.2.1.14
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=575ecfff3779aadcea83d890ba975109c0f7d6a3
|
||||
PKG_SOURCE_VERSION:=d9ff69760bc34dd3928fa784dfb3116bfe3f95af
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/multi-ap/decollector.git
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@genexis.eu>
|
||||
|
||||
|
||||
PKG_LICENSE:=BSD-3-Clause
|
||||
|
||||
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=dectmngr
|
||||
PKG_RELEASE:=3
|
||||
PKG_VERSION:=3.7.3
|
||||
PKG_VERSION:=3.7.10
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/dectmngr.git
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=393dfd7637fdeccc24ef286c3daec9a232896b98
|
||||
PKG_SOURCE_VERSION:=1f851980a6ba616df54f79930225f8bcd563b711
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -56,11 +56,14 @@ endif
|
||||
|
||||
define Package/$(PKG_NAME)/install
|
||||
$(INSTALL_DIR) $(1)/usr/sbin
|
||||
$(INSTALL_DIR) $(1)/etc
|
||||
$(INSTALL_DIR) $(1)/etc/dspg
|
||||
$(INSTALL_DIR) $(1)/lib/upgrade/keep.d
|
||||
|
||||
$(INSTALL_BIN) $(PKG_BUILD_DIR)/app/dectmngr $(1)/usr/sbin/
|
||||
$(STRIP) $(1)/usr/sbin/dectmngr
|
||||
ifeq ($(CONFIG_TARGET_airoha),)
|
||||
$(CP) ./firmware/common/* $(1)/etc/dspg/
|
||||
endif
|
||||
$(CP) ./files/etc/* $(1)/etc/
|
||||
$(INSTALL_DATA) ./files/lib/upgrade/keep.d/dect $(1)/lib/upgrade/keep.d/dect
|
||||
endef
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
config dect 'global'
|
||||
option log_dect_cmbs 'syslog'
|
||||
option log_level 'realtime,warning,error'
|
||||
option log_dect_cmbs 'syslog'
|
||||
option log_level 'realtime,warning,error'
|
||||
|
||||
config dect 'base'
|
||||
option enable '1'
|
||||
|
||||
@@ -11,6 +11,25 @@ LOG_PATH=/var/log/dectmngr
|
||||
DB_PATH=/etc/dect
|
||||
DCX81_UART_DT_ALIAS=/proc/device-tree/aliases/dcx81-uart
|
||||
|
||||
get_extension_shift() {
|
||||
local dect_exts
|
||||
|
||||
get_dect_extension() {
|
||||
local ext=$1
|
||||
local type
|
||||
|
||||
config_get type $ext type
|
||||
|
||||
[ "$type" == "dect" ] && echo $ext
|
||||
}
|
||||
|
||||
config_load "asterisk"
|
||||
|
||||
dect_exts=$(config_foreach get_dect_extension "extension" |sort |head -n1)
|
||||
|
||||
echo "${dect_exts#extension}"
|
||||
}
|
||||
|
||||
# Ask dectmngr to exit nicely and wait for it to clean up, which is a slow process.
|
||||
stop_and_wait_dectmngr() {
|
||||
dect_pid=$(pidof $PROG)
|
||||
@@ -38,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=
|
||||
@@ -59,9 +118,13 @@ start_service() {
|
||||
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"
|
||||
|
||||
@@ -77,24 +140,27 @@ start_service() {
|
||||
|
||||
config_load dect
|
||||
config_get log_dect_cmbs global log_dect_cmbs syslog
|
||||
config_get pcm_slot_start global pcm_slot_start
|
||||
config_get pcm_fsync global pcm_fsync
|
||||
|
||||
[ -n "$pcm_fsync" ] && opt_ext="$opt_ext -sync $pcm_fsync"
|
||||
[ -n "$pcm_slot_start" ] && opt_ext="$opt_ext -slotsShift $pcm_slot_start"
|
||||
|
||||
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.5
|
||||
PKG_VERSION:=1.0.10
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/network/dhcpmngr.git
|
||||
PKG_SOURCE_VERSION:=2a517188211849bcc324a9f9727eeb34d076c032
|
||||
PKG_SOURCE_VERSION:=e238e47fa13153c5b1890056b0d09c65879de8c5
|
||||
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)/
|
||||
|
||||
@@ -10,7 +10,6 @@ uci -q get dhcp.odhcpd >/dev/null 2>&1 && {
|
||||
[ -e /usr/lib/unbound/odhcpd.sh ] && [ -e /usr/sbin/unbound ] && {
|
||||
# then set unbound script as leasetrigger in dhcp UCI
|
||||
uci -q set dhcp.odhcpd.leasetrigger='/usr/lib/unbound/odhcpd.sh'
|
||||
uci commit dhcp
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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
|
||||
75
dmcli/Makefile
Normal file
75
dmcli/Makefile
Normal file
@@ -0,0 +1,75 @@
|
||||
#
|
||||
# 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.4
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/gnx/dmcli.git
|
||||
PKG_SOURCE_VERSION:=2139e81d0faca09fe1832c503297ef75ea76d6eb
|
||||
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.15
|
||||
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:=32bd2501fca8a4f45ba13ee0e4762756c60fe721
|
||||
PKG_SOURCE_VERSION:=448d278734a824f9d4ad1e7a55acd16c222d4c7e
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -72,7 +72,7 @@ define Package/dnsmngr/install
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/libdnsmngr.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_SCRIPT) -d $(PKG_BUILD_DIR)/scripts/nslookup $(1)
|
||||
ifeq ($(CONFIG_DNSMNGR_DNS_SD),y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libdns_sd.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/libdns_sd.so $(1) $(PKG_NAME) 10
|
||||
endif
|
||||
endef
|
||||
|
||||
|
||||
@@ -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,14 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ethmngr
|
||||
PKG_VERSION:=3.0.5
|
||||
PKG_VERSION:=3.0.9
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/hal/ethmngr.git
|
||||
PKG_SOURCE_VERSION:=01e1c5f6642a8fa79fc445c71558ad02bda40eb5
|
||||
PKG_MAINTAINER:=Rahul Thakur <rahul.thakur@iopsys.eu>
|
||||
PKG_SOURCE_VERSION:=0bcfd98d64b5bd8d3162944e2abd5740f9bf4b92
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -1,23 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ -n "$PORT" -a -n "$LINK" ] || exit 0
|
||||
|
||||
case "$PORT" in
|
||||
# do not generate ethport ubus event
|
||||
# for wifi, dsl and brige devices
|
||||
wl*|wds*|atm*|ptm*|br-*)
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
||||
speed=0
|
||||
duplex=full
|
||||
|
||||
if [ "$LINK" = "up" ]; then
|
||||
devspeed="$(ubus -t 2 call network.device status "{\"name\":\"$PORT\"}" | jsonfilter -e @.speed)"
|
||||
speed=${devspeed:0:-1}
|
||||
duplex=${devspeed:0-1}
|
||||
[ "$duplex" == "H" ] && duplex="half" || duplex="full"
|
||||
fi
|
||||
|
||||
ubus send ethport "{\"ifname\":\"$PORT\",\"link\":\"$LINK\",\"speed\":\"$speed\",\"duplex\":\"$duplex\"}"
|
||||
23
ethmngr/files/etc/ruleng/ethport.json
Normal file
23
ethmngr/files/etc/ruleng/ethport.json
Normal file
@@ -0,0 +1,23 @@
|
||||
{
|
||||
"ethport_update": {
|
||||
"if" : [
|
||||
{
|
||||
"event": "network.device",
|
||||
"match": {
|
||||
"wireless": false
|
||||
}
|
||||
}
|
||||
],
|
||||
"then" : [
|
||||
{
|
||||
"cli": "/sbin/hotplug-call ethernet",
|
||||
"envs": {
|
||||
"PORT": "&network.device->ifname",
|
||||
"LINK": "&network.device->link"
|
||||
},
|
||||
"timeout": 1
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
|
||||
2
ethmngr/files/etc/uci-defaults/ruleng.ethport
Normal file
2
ethmngr/files/etc/uci-defaults/ruleng.ethport
Normal file
@@ -0,0 +1,2 @@
|
||||
uci -q set ruleng.ethport=rule
|
||||
uci -q set ruleng.ethport.recipe='/etc/ruleng/ethport.json'
|
||||
@@ -8,5 +8,11 @@ config FIREWALLMNGR_PORT_TRIGGER
|
||||
help
|
||||
Set this option to include support for PortTrigger object.
|
||||
|
||||
config FIREWALLMNGR_NAT_INTERFACE_SETTING
|
||||
bool "Include Device.NAT.InterfaceSetting"
|
||||
default y
|
||||
help
|
||||
Set this option to include support for NAT InterfaceSetting object.
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=firewallmngr
|
||||
PKG_VERSION:=1.0.9
|
||||
PKG_VERSION:=1.0.9.5
|
||||
|
||||
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:=02dc90c48d996148b68d02632bac13a28d75cf25
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -52,6 +52,10 @@ ifeq ($(CONFIG_FIREWALLMNGR_PORT_TRIGGER),y)
|
||||
TARGET_CFLAGS += -DINCLUDE_PORT_TRIGGER
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_FIREWALLMNGR_NAT_INTERFACE_SETTING),y)
|
||||
TARGET_CFLAGS += -DINCLUDE_NAT_IF_SETTING
|
||||
endif
|
||||
|
||||
define Package/firewallmngr/install
|
||||
$(INSTALL_DIR) $(1)/etc/config
|
||||
$(INSTALL_DIR) $(1)/etc/uci-defaults
|
||||
|
||||
@@ -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}"
|
||||
|
||||
@@ -7,7 +7,11 @@ USE_PROCD=1
|
||||
. /lib/port-trigger/port_trigger.sh
|
||||
|
||||
start_service() {
|
||||
port_trigger_handling
|
||||
port_trigger_add
|
||||
}
|
||||
|
||||
stop_service() {
|
||||
port_trigger_clean
|
||||
}
|
||||
|
||||
service_triggers()
|
||||
@@ -17,5 +21,6 @@ service_triggers()
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
stop
|
||||
start
|
||||
}
|
||||
|
||||
@@ -119,18 +119,12 @@ process_port_trigger() {
|
||||
fi
|
||||
}
|
||||
|
||||
port_trigger_handling() {
|
||||
port_trigger_add() {
|
||||
rm /tmp/port_trigger_iptables 2> /dev/null
|
||||
rm /tmp/port_trigger_ip6tables 2> /dev/null
|
||||
touch /tmp/port_trigger_iptables
|
||||
touch /tmp/port_trigger_ip6tables
|
||||
|
||||
echo "iptables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
echo "iptables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
echo "iptables -w -t nat -F prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
echo "ip6tables -w -t nat -F prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
|
||||
echo "ip6tables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
|
||||
|
||||
echo "iptables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && echo "iptables -w -t nat -I PREROUTING -j prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
@@ -139,7 +133,7 @@ port_trigger_handling() {
|
||||
[ $ret -eq 0 ] && echo "iptables -w -t filter -I forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
echo "iptables -w -t nat -N prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
ret=$?
|
||||
[ $ret -eq 0 ] && echo "iptables -w -t nat -I prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
[ $ret -eq 0 ] && echo "iptables -w -t nat -A prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null">>/tmp/port_trigger_iptables
|
||||
|
||||
echo "ip6tables -w -t nat -N prerouting_porttrigger 2> /dev/null">>/tmp/port_trigger_ip6tables
|
||||
ret=$?
|
||||
@@ -155,3 +149,21 @@ port_trigger_handling() {
|
||||
sh /tmp/port_trigger_iptables
|
||||
sh /tmp/port_trigger_ip6tables
|
||||
}
|
||||
|
||||
port_trigger_clean() {
|
||||
iptables -w -t nat -D PREROUTING -j prerouting_porttrigger 2> /dev/null
|
||||
iptables -w -t nat -F prerouting_porttrigger 2> /dev/null
|
||||
iptables -w -t nat -X prerouting_porttrigger 2> /dev/null
|
||||
iptables -w -t nat -D prerouting_wan_rule -j prerouting_wan_porttrigger 2> /dev/null
|
||||
iptables -w -t nat -F prerouting_wan_porttrigger 2> /dev/null
|
||||
iptables -w -t nat -X prerouting_wan_porttrigger 2> /dev/null
|
||||
iptables -w -t filter -D forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null
|
||||
iptables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null
|
||||
iptables -w -t filter -X forwarding_wan_porttrigger 2> /dev/null
|
||||
ip6tables -w -t nat -D PREROUTING -j prerouting_porttrigger 2> /dev/null
|
||||
ip6tables -w -t nat -F prerouting_porttrigger 2> /dev/null
|
||||
ip6tables -w -t nat -X prerouting_porttrigger 2> /dev/null
|
||||
ip6tables -w -t filter -D forwarding_wan_rule -j forwarding_wan_porttrigger 2> /dev/null
|
||||
ip6tables -w -t filter -F forwarding_wan_porttrigger 2> /dev/null
|
||||
ip6tables -w -t filter -X forwarding_wan_porttrigger 2> /dev/null
|
||||
}
|
||||
|
||||
@@ -1,18 +1,20 @@
|
||||
#
|
||||
# Copyright (C) 2024 IOPSYS
|
||||
# Copyright (C) 2024-2025 IOPSYS
|
||||
#
|
||||
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=fluent-bit
|
||||
PKG_VERSION:=3.1.0
|
||||
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:=https://github.com/fluent/fluent-bit/archive/v$(PKG_VERSION)
|
||||
PKG_HASH:=7a49e110cf3050b6c29c911063494b8081f3c743274d1d95e52562d0476ba1eb
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
PKG_LICENSE:=Apache-2.0
|
||||
@@ -23,7 +25,7 @@ include $(INCLUDE_DIR)/cmake.mk
|
||||
|
||||
define Package/fluent-bit
|
||||
CATEGORY:=Utilities
|
||||
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison
|
||||
DEPENDS:= +libyaml +libopenssl +libcurl +libatomic +musl-fts +flex +bison +libstdcpp +@OPENSSL_WITH_NPN
|
||||
TITLE:=Fluent-Bit
|
||||
URL:=https://fluentbit.io/
|
||||
endef
|
||||
@@ -45,13 +47,14 @@ CMAKE_OPTIONS+= \
|
||||
-DFLB_RELEASE=Yes \
|
||||
-DFLB_SMALL=No \
|
||||
-DEXCLUDE_FROM_ALL=true \
|
||||
-DFLB_SHARED_LIBS=Yes \
|
||||
-DFLB_SHARED_LIB=Yes \
|
||||
-DFLB_DEBUG=Yes \
|
||||
-DFLB_ALL=No \
|
||||
-DFLB_JEMALLOC=No \
|
||||
-DFLB_EXAMPLES=No \
|
||||
-DFLB_CHUNK_TRACE=No \
|
||||
-DFLB_BACKTRACE=No \
|
||||
-DFLB_KAFKA=No \
|
||||
-DFLB_WASM=No \
|
||||
-DFLB_LUAJIT=No
|
||||
|
||||
@@ -63,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 \
|
||||
@@ -100,7 +103,7 @@ CMAKE_OPTIONS += \
|
||||
|
||||
|
||||
# Filter options
|
||||
CMAKE_OPTIONS +=
|
||||
CMAKE_OPTIONS += \
|
||||
-DFLB_FILTER_AWS=No \
|
||||
-DFLB_FILTER_ECS=No \
|
||||
-DFLB_FILTER_KUBERNETES=No \
|
||||
@@ -138,6 +141,7 @@ CMAKE_OPTIONS += \
|
||||
-DFLB_OUT_ES=No \
|
||||
-DFLB_OUT_GELF=No \
|
||||
-DFLB_OUT_INFLUXDB=No \
|
||||
-DFLB_OUT_KAFKA=No \
|
||||
-DFLB_OUT_NRLOGS=No \
|
||||
-DFLB_OUT_OPENSEARCH=No \
|
||||
-DFLB_OUT_TD=No \
|
||||
@@ -167,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;
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=gateway-info
|
||||
PKG_VERSION:=1.0.0
|
||||
PKG_VERSION:=1.0.2
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/gateway-info.git
|
||||
PKG_SOURCE_VERSION:=26e407a25b156da75e3941d54ddd74294cd9eae8
|
||||
PKG_SOURCE_VERSION:=dd15893a8291e556a8c49ff9e143c763db0379b5
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,8 +28,8 @@ include ../bbfdm/bbfdm.mk
|
||||
define Package/gateway-info
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=GatewayInfo Data Model Support
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
DEPENDS:=+libuci +libubox +libubus +libblobmsg-json +umdns
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service +iputils-arping
|
||||
endef
|
||||
|
||||
define Package/gateway-info/description
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
config global 'global'
|
||||
option enable '1'
|
||||
option wan_interface 'wan'
|
||||
option lan_interface 'lan'
|
||||
|
||||
@@ -210,7 +210,6 @@ enable_dhcp_option125() {
|
||||
local newsendopts=""
|
||||
local req125_present=0
|
||||
local send125_present=0
|
||||
local network_uci_update=0
|
||||
local opt125="125:"
|
||||
|
||||
for ropt in $reqopts; do
|
||||
@@ -231,18 +230,12 @@ enable_dhcp_option125() {
|
||||
if [ ${req125_present} -eq 0 ]; then
|
||||
newreqopts="$reqopts 125"
|
||||
uci -q set network."${wan}".reqopts="$newreqopts"
|
||||
network_uci_update=1
|
||||
fi
|
||||
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
configure_send_op125 "${sendopts}" "${wan}" "network"
|
||||
network_uci_update=1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ ${network_uci_update} -eq 1 ]; then
|
||||
uci commit network
|
||||
fi
|
||||
}
|
||||
|
||||
enable_dnsmasq_option125() {
|
||||
@@ -266,7 +259,6 @@ enable_dnsmasq_option125() {
|
||||
if [ ${send125_present} -eq 0 ]; then
|
||||
uci -q del_list dhcp."${lan}".dhcp_option="${base_opt}"
|
||||
configure_send_op125 "${base_opt}" "${lan}" "dhcp"
|
||||
uci commit dhcp
|
||||
fi
|
||||
fi
|
||||
}
|
||||
@@ -276,9 +268,14 @@ configure_gateway_device_info() {
|
||||
lan_intf=""
|
||||
|
||||
config_load gateway
|
||||
config_get_bool enable global enable '1'
|
||||
config_get wan_intf global wan_interface "wan"
|
||||
config_get lan_intf global lan_interface "lan"
|
||||
|
||||
if [ "${enable}" -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
# Set dhcp_option 125 for device info if not already configured
|
||||
enable_dhcp_option125 "${wan_intf}"
|
||||
|
||||
|
||||
@@ -1,10 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /lib/functions.sh
|
||||
. /usr/share/libubox/jshn.sh
|
||||
|
||||
CLASS=""
|
||||
OUI=""
|
||||
SERIAL=""
|
||||
GW_DISCOVERED=0
|
||||
_json_no_warning=1
|
||||
|
||||
get_vivsoi() {
|
||||
# opt125 environment variable has data in below format
|
||||
@@ -86,11 +89,17 @@ get_vivsoi() {
|
||||
|
||||
# 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 '')
|
||||
"4")
|
||||
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 '')
|
||||
"5")
|
||||
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 '')
|
||||
"6")
|
||||
CLASS=$(echo -n $sub_opt_val | sed 's/\([0-9A-F]\{2\}\)/\\\\\\x\1/gI' | xargs printf && echo '')
|
||||
GW_DISCOVERED=1
|
||||
;;
|
||||
esac
|
||||
|
||||
@@ -110,15 +119,192 @@ get_vivsoi() {
|
||||
done
|
||||
}
|
||||
|
||||
send_host_query() {
|
||||
intf="${1}"
|
||||
resp=1
|
||||
loop=3
|
||||
usp_serv_found=0
|
||||
sent_host=" "
|
||||
|
||||
ubus call umdns update
|
||||
while [ "${loop}" -ne 0 ]; do
|
||||
sleep 5
|
||||
|
||||
json_load "$(ubus call umdns browse)"
|
||||
json_select discovered_services
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
json_cleanup
|
||||
loop=$(( loop - 1 ))
|
||||
continue
|
||||
fi
|
||||
|
||||
json_select _usp-agt-mqtt._tcp
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
json_cleanup
|
||||
loop=$(( loop - 1 ))
|
||||
continue
|
||||
fi
|
||||
|
||||
usp_serv_found=1
|
||||
break
|
||||
done
|
||||
|
||||
if [ "${usp_serv_found}" -eq 0 ]; then
|
||||
echo "${resp}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_get_keys keys
|
||||
for key in $keys; do
|
||||
json_select $key
|
||||
json_get_var _host host ""
|
||||
|
||||
if [ -z "${_host}" ] || [[ "${sent_host}" =~ " ${_host}" ]]; then
|
||||
json_select ..
|
||||
continue
|
||||
fi
|
||||
|
||||
sent_host="${sent_host} ${_host}"
|
||||
cmd="ubus call umdns query '{\"question\":\"$_host\",\"interface\":\"$intf\"}'"
|
||||
eval $cmd
|
||||
resp=0
|
||||
json_select ..
|
||||
done
|
||||
|
||||
json_cleanup
|
||||
echo "${resp}"
|
||||
}
|
||||
|
||||
get_usp_agent_id() {
|
||||
dhcp_ip="${1}"
|
||||
family="ipv4"
|
||||
ID=""
|
||||
|
||||
if [[ "${dhcp_ip}" =~ ":" ]]; then
|
||||
family="ipv6"
|
||||
fi
|
||||
|
||||
json_load "$(ubus call umdns browse)"
|
||||
json_select discovered_services
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
json_cleanup
|
||||
echo ${ID}
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_select _usp-agt-mqtt._tcp
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
json_cleanup
|
||||
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 ..
|
||||
continue
|
||||
fi
|
||||
|
||||
json_get_keys ips
|
||||
for ip in $ips; do
|
||||
json_get_var ip_val $ip
|
||||
if [ "${ip_val}" != "${dhcp_ip}" ]; then
|
||||
continue
|
||||
fi
|
||||
|
||||
json_select ..
|
||||
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
|
||||
ID="${text_val:3}"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
break
|
||||
done
|
||||
|
||||
json_select ..
|
||||
json_select ..
|
||||
|
||||
if [ -n "${ID}" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
json_cleanup
|
||||
echo ${ID}
|
||||
}
|
||||
|
||||
get_mac_address() {
|
||||
ip="${1}"
|
||||
device="${2}"
|
||||
|
||||
mac="$(cat /proc/net/arp | grep $ip | awk '{print $4}')"
|
||||
if [ -z "${mac}" ]; then
|
||||
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
|
||||
fi
|
||||
|
||||
echo "${mac}"
|
||||
}
|
||||
|
||||
send_unknown_gw_event() {
|
||||
mac="${1}"
|
||||
|
||||
cmd="ubus -t 5 send gateway-info.gateway.unknown '{\"hwaddr\":\"$mac\"}'"
|
||||
eval $cmd
|
||||
}
|
||||
|
||||
send_cwmp_gw_event() {
|
||||
oui="${1}"
|
||||
class="${2}"
|
||||
serial="${3}"
|
||||
|
||||
cmd="ubus -t 5 send gateway-info.gateway.cwmp '{\"oui\":\"$oui\",\"class\":\"$class\",\"serial\":\"$serial\"}'"
|
||||
eval $cmd
|
||||
}
|
||||
|
||||
send_usp_gw_event() {
|
||||
endpoint="${1}"
|
||||
|
||||
cmd="ubus -t 5 send gateway-info.gateway.usp '{\"endpoint\":\"$endpoint\"}'"
|
||||
eval $cmd
|
||||
}
|
||||
|
||||
config_load gateway
|
||||
config_get_bool enable global enable '1'
|
||||
config_get wan_intf global wan_interface "wan"
|
||||
|
||||
if [ "${enable}" -eq 0 ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
if [ "${wan_intf}" == "${INTERFACE}" ]; then
|
||||
if [ -n "$opt125" ]; then
|
||||
len=$(printf "$opt125"|wc -c)
|
||||
get_vivsoi "$opt125" "$len"
|
||||
if [ "${1}" == "deconfig" ]; then
|
||||
rm -rf /var/state/gwinfo
|
||||
return 0
|
||||
fi
|
||||
|
||||
json_load "$(ifstatus ${INTERFACE})"
|
||||
json_get_var dev_name device ""
|
||||
json_select data
|
||||
json_get_var dhcp_ip dhcpserver ""
|
||||
json_cleanup
|
||||
|
||||
if [ -z "${dhcp_ip}" ] || [ -z "${dev_name}" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
MAC="$(get_mac_address $dhcp_ip $dev_name)"
|
||||
|
||||
mkdir -p /var/state
|
||||
touch /var/state/gwinfo
|
||||
sec=$(uci -q -c /var/state get gwinfo.gatewayinfo)
|
||||
@@ -127,8 +313,55 @@ if [ "${wan_intf}" == "${INTERFACE}" ]; then
|
||||
uci -q -c /var/state rename gwinfo."${sec}"="gatewayinfo"
|
||||
fi
|
||||
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.hwaddr="$MAC"
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.endpoint=""
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.class=""
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.oui=""
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.serial=""
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.proto=""
|
||||
uci -q -c /var/state commit gwinfo
|
||||
|
||||
if [ -z "$opt125" ]; then
|
||||
send_unknown_gw_event "${MAC}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
len=$(printf "$opt125"|wc -c)
|
||||
get_vivsoi "$opt125" "$len"
|
||||
|
||||
if [ "${GW_DISCOVERED}" -eq 0 ]; then
|
||||
send_unknown_gw_event "${MAC}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.class="$CLASS"
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.oui="$OUI"
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.serial="$SERIAL"
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.proto="CWMP"
|
||||
uci -q -c /var/state commit gwinfo
|
||||
|
||||
# Check for USP parameters
|
||||
ubus -t 15 wait_for umdns
|
||||
if [ "${?}" -ne 0 ]; then
|
||||
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
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)"
|
||||
if [ -z "${ID}" ]; then
|
||||
send_cwmp_gw_event "${OUI}" "${CLASS}" "${SERIAL}"
|
||||
return 0
|
||||
fi
|
||||
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.endpoint="$ID"
|
||||
uci -q -c /var/state set gwinfo.gatewayinfo.proto="USP"
|
||||
uci -q -c /var/state commit gwinfo
|
||||
|
||||
send_usp_gw_event "${ID}"
|
||||
fi
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=hostmngr
|
||||
PKG_VERSION:=1.2.15
|
||||
PKG_VERSION:=1.3.6
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=3b50823da3f2904191332634c1e45d46090def1d
|
||||
PKG_SOURCE_VERSION:=624fee52af9cce08c6c69a5f7dd2191691d61aa8
|
||||
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
|
||||
@@ -77,7 +77,7 @@ define Package/hostmngr/install
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostmngr.so $(1) $(PKG_NAME)
|
||||
|
||||
ifeq ($(CONFIG_HOSTMNGR_DATAMODEL_EXT),y)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostext.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/src/bbf_plugin/libhostext.so $(1) $(PKG_NAME) 10
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
@@ -7,4 +7,16 @@ config ICWMP_MGMT_FROM_USP
|
||||
config ICWMP_BACKUP_EVENTS
|
||||
bool "Create backup of session events to persistent storage after each successful session"
|
||||
default y
|
||||
|
||||
config ICWMP_ENABLE_VENDOR_EXTN
|
||||
bool "Enable datamodel vendor extension"
|
||||
default y
|
||||
|
||||
config ICWMP_VENDOR_PREFIX
|
||||
string "Package specific datamodel Vendor Prefix for TR181 extensions"
|
||||
default ""
|
||||
|
||||
config ICWMP_ENABLE_SMM_SUPPORT
|
||||
bool "Enable software module management support"
|
||||
default n
|
||||
endmenu
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=icwmp
|
||||
PKG_VERSION:=9.8.33
|
||||
PKG_VERSION:=9.9.9.8
|
||||
|
||||
LOCAL_DEV:=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/bbf/icwmp.git
|
||||
PKG_SOURCE_VERSION:=6e80cefd0056f2d13122ad22b73895ea7fb5e438
|
||||
PKG_SOURCE_VERSION:=cef78dc528690386caac5a7ff6c1afca6dd3d315
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -52,6 +52,21 @@ ifeq ($(CONFIG_ICWMP_BACKUP_EVENTS),y)
|
||||
EXTRA_CFLAGS += -DPERSIST_BACKUP_SESSION_EVENTS
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ICWMP_ENABLE_VENDOR_EXTN),y)
|
||||
EXTRA_CFLAGS += -DICWMP_ENABLE_VENDOR_EXTN
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ICWMP_ENABLE_SMM_SUPPORT),y)
|
||||
EXTRA_CFLAGS += -DICWMP_ENABLE_SMM_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_ICWMP_VENDOR_PREFIX),"")
|
||||
CMAKE_OPTIONS += -DBBF_VENDOR_PREFIX:String="$(CONFIG_BBF_VENDOR_PREFIX)"
|
||||
else
|
||||
CMAKE_OPTIONS += -DBBF_VENDOR_PREFIX:String="$(CONFIG_ICWMP_VENDOR_PREFIX)"
|
||||
endif
|
||||
|
||||
|
||||
ifeq ($(LOCAL_DEV),1)
|
||||
define Build/Prepare
|
||||
$(CP) -rf ~/git/icwmp/* $(PKG_BUILD_DIR)/
|
||||
@@ -69,16 +84,19 @@ 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
|
||||
$(INSTALL_BIN) ./files/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user $(1)/etc/udhcpc.user.d/udhcpc_icwmp_opt43.user
|
||||
$(BBFDM_REGISTER_SERVICES) ./bbfdm_service.json $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_DM) $(PKG_BUILD_DIR)/libcwmpdm.so $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME)
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) ./files/etc/bbfdm/json/CWMPManagementServer.json $(1) $(PKG_NAME) 20
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,icwmp))
|
||||
|
||||
@@ -15,7 +15,8 @@
|
||||
},
|
||||
{
|
||||
"parent_dm": "Device.",
|
||||
"object": "XMPP"
|
||||
"object": "XMPP",
|
||||
"proto": "cwmp"
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
config acs 'acs'
|
||||
option userid '' #$OUI-$SER
|
||||
option passwd 'iopsys'
|
||||
option passwd ''
|
||||
option periodic_inform_enable 'true'
|
||||
option periodic_inform_interval '1800'
|
||||
option periodic_inform_time '0001-01-01T00:00:00Z'
|
||||
@@ -14,19 +14,23 @@ config acs 'acs'
|
||||
option retry_interval_multiplier '2000'
|
||||
option skip_dhcp_boot_options '0'
|
||||
option insecure_enable '0'
|
||||
option get_rpc_methods '0'
|
||||
|
||||
config cpe 'cpe'
|
||||
option enable '1'
|
||||
option default_wan_interface 'wan'
|
||||
option default_lan_interface 'lan'
|
||||
#option client_cert_path '/etc/icwmpd/client.pem'
|
||||
#option client_key_path '/etc/icwmpd/client.key'
|
||||
option log_to_console 'disable'
|
||||
option log_to_file 'disable'
|
||||
# log_severity possible configs: EMERG, ALERT, CRITIC ,ERROR, WARNING, NOTICE, INFO, DEBUG
|
||||
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 'iopsys'
|
||||
option passwd ''
|
||||
option port '7547'
|
||||
option provisioning_code ''
|
||||
option amd_version '5'
|
||||
@@ -39,10 +43,12 @@ config cpe 'cpe'
|
||||
option periodic_notify_interval '10'
|
||||
option incoming_rule 'Port_Only'
|
||||
option active_notif_throttle '0'
|
||||
option disable_gatewayinfo '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'
|
||||
|
||||
config lwn 'lwn'
|
||||
option enable '0'
|
||||
|
||||
@@ -1,24 +1,59 @@
|
||||
#!/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
|
||||
}
|
||||
|
||||
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"
|
||||
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
|
||||
}
|
||||
|
||||
cleanup_exiting_rules() {
|
||||
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
|
||||
load_zone_names() {
|
||||
rm -f "${ZONE_NAME_FILE}"
|
||||
config_load firewall
|
||||
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}"
|
||||
}
|
||||
|
||||
cleanup_upstream_rules() {
|
||||
if [ -z "${1}" ]; then
|
||||
log "Rule can not be cleaned without zone name"
|
||||
return
|
||||
fi
|
||||
|
||||
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
|
||||
rule_num="$(iptables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Open_ACS_port" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
iptables -w 1 -D zone_"${1}"_input "${rule_num}";
|
||||
fi
|
||||
done
|
||||
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
|
||||
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Open_ACS_port"; do
|
||||
rule_num="$(ip6tables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Open_ACS_port" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
ip6tables -w 1 -D zone_"${1}"_input "${rule_num}";
|
||||
@@ -26,76 +61,144 @@ cleanup_exiting_rules() {
|
||||
done
|
||||
}
|
||||
|
||||
enable="$(uci -q get cwmp.cpe.enable)"
|
||||
enable="${enable:-1}"
|
||||
|
||||
if [ "$enable" -eq 0 ]; then
|
||||
log "CWMP not enabled"
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
wan="$(uci -q get cwmp.cpe.default_wan_interface)"
|
||||
wan="${wan:-wan}"
|
||||
|
||||
zone_name="$(get_firewall_zone $wan)"
|
||||
|
||||
port=$(uci -q get cwmp.cpe.port)
|
||||
port="${port:-7547}"
|
||||
|
||||
incoming_rule=$(uci -q get cwmp.cpe.incoming_rule|awk '{print tolower($0)}')
|
||||
incoming_rule="${incoming_rule:-port_only}"
|
||||
|
||||
ipaddr=$(uci -c /var/state -q get icwmp.acs.ip)
|
||||
ip6addr=$(uci -c /var/state -q get icwmp.acs.ip6)
|
||||
|
||||
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp"
|
||||
cmd6="ip6tables -w 1 -I zone_${zone_name}_input -p tcp"
|
||||
|
||||
# default incoming rule is Port only
|
||||
if [ "${incoming_rule}" = "ip_only" ]; then
|
||||
if [ -n "${ipaddr}" ]; then
|
||||
cmd="${cmd} -s ${ipaddr}"
|
||||
fi
|
||||
if [ -n "${ip6addr}" ]; then
|
||||
cmd6="${cmd6} -s ${ip6addr}"
|
||||
fi
|
||||
elif [ "${incoming_rule}" = "port_only" ]; then
|
||||
if [ -n "${port}" ]; then
|
||||
cmd="${cmd} --dport ${port}"
|
||||
cmd6="${cmd6} --dport ${port}"
|
||||
fi
|
||||
else
|
||||
if [ -n "${ipaddr}" ]; then
|
||||
cmd="${cmd} -s ${ipaddr}"
|
||||
cleanup_downstream_rules() {
|
||||
if [ -z "${1}" ]; then
|
||||
log "Rule can not be cleaned without zone name"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -n "${ip6addr}" ]; then
|
||||
cmd6="${cmd6} -s ${ip6addr}"
|
||||
while iptables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Close_ACS_port"; do
|
||||
rule_num="$(iptables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Close_ACS_port" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
iptables -w 1 -D zone_"${1}"_input "${rule_num}";
|
||||
fi
|
||||
done
|
||||
while ip6tables -w 1 -nL zone_"${1}"_input --line-numbers 2>/dev/null | grep "Close_ACS_port"; do
|
||||
rule_num="$(ip6tables -w 1 -nL zone_"${1}"_input --line-numbers | grep "Close_ACS_port" | head -1|awk '{print $1}')"
|
||||
if [ -n "${rule_num}" ]; then
|
||||
ip6tables -w 1 -D zone_"${1}"_input "${rule_num}";
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
close_downstream_acs_port() {
|
||||
lan="${1}"
|
||||
port="${2}"
|
||||
zone_name="$(get_firewall_zone $lan)"
|
||||
|
||||
if [ -z "${zone_name}" ]; then
|
||||
log "Rule can not be added without zone name"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ -n "${port}" ]; then
|
||||
cmd="${cmd} --dport ${port}"
|
||||
cmd6="${cmd6} --dport ${port}"
|
||||
fi
|
||||
fi
|
||||
|
||||
cleanup_exiting_rules "${zone_name}"
|
||||
|
||||
echo "${cmd}"|grep -q "\-\-dport \|\-s "
|
||||
if [ "$?" -eq 0 ]; then
|
||||
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
|
||||
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp --dport ${port} -j DROP -m comment --comment=Close_ACS_port"
|
||||
${cmd}
|
||||
log "Applied [${cmd}]"
|
||||
fi
|
||||
|
||||
echo "${cmd6}"|grep -q "\-\-dport \|\-s "
|
||||
if [ "$?" -eq 0 ]; then
|
||||
cmd6="${cmd6} -j ACCEPT -m comment --comment=Open_ACS_port"
|
||||
${cmd6}
|
||||
log "Applied [${cmd6}]"
|
||||
fi
|
||||
cmd="ip6tables -w 1 -I zone_${zone_name}_input -p tcp --dport ${port} -j DROP -m comment --comment=Close_ACS_port"
|
||||
${cmd}
|
||||
log "Applied [${cmd}]"
|
||||
}
|
||||
|
||||
if [ -f "/var/state/icwmp" ]; then
|
||||
uci -c /var/state -q set icwmp.cpe.firewall_restart="init"
|
||||
uci -c /var/state -q commit icwmp
|
||||
fi
|
||||
add_firewall_rule() {
|
||||
version="${1}"
|
||||
ipaddr="${2}"
|
||||
port="${3}"
|
||||
zone_name="${4}"
|
||||
cmd=""
|
||||
|
||||
if [ -z "${zone_name}" ]; then
|
||||
log "Rule can not be added without zone name"
|
||||
return
|
||||
fi
|
||||
|
||||
if [ "${version}" = "ipv6" ]; then
|
||||
cmd="ip6tables -w 1 -I zone_${zone_name}_input -p tcp"
|
||||
else
|
||||
cmd="iptables -w 1 -I zone_${zone_name}_input -p tcp"
|
||||
fi
|
||||
|
||||
if [ -n "${ipaddr}" ]; then
|
||||
cmd="${cmd} -s ${ipaddr}"
|
||||
fi
|
||||
|
||||
if [ -n "${port}" ]; then
|
||||
cmd="${cmd} --dport ${port}"
|
||||
fi
|
||||
|
||||
if echo "${cmd}"|grep -q "\-\-dport \|\-s "; then
|
||||
cmd="${cmd} -j ACCEPT -m comment --comment=Open_ACS_port"
|
||||
${cmd}
|
||||
log "Applied [${cmd}]"
|
||||
fi
|
||||
}
|
||||
|
||||
configure_connection_req_rules() {
|
||||
app="${1}"
|
||||
|
||||
wan="$(uci -q get cwmp.cpe.default_wan_interface)"
|
||||
wan="${wan:-wan}"
|
||||
|
||||
wan_zone_name="$(get_firewall_zone $wan)"
|
||||
|
||||
cleanup_upstream_rules "${wan_zone_name}"
|
||||
|
||||
lan="$(uci -q get cwmp.cpe.default_lan_interface)"
|
||||
lan="${lan:-lan}"
|
||||
|
||||
if [ "${lan}" != "${wan}" ]; then
|
||||
lan_zone_name="$(get_firewall_zone $lan)"
|
||||
cleanup_downstream_rules "${lan_zone_name}"
|
||||
fi
|
||||
|
||||
enable="$(uci -q get cwmp.cpe.enable)"
|
||||
enable="${enable:-1}"
|
||||
|
||||
if [ "$enable" -eq 0 ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
url="$(uci -q get cwmp.acs.url)"
|
||||
if [ -z "${url}" ]; then
|
||||
url="$(uci -q get cwmp.acs.dhcp_url)"
|
||||
fi
|
||||
|
||||
# no need to apply firewall rule, acs url not configured
|
||||
if [ -z "${url}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ -z "${app}" ]; then
|
||||
if ! ubus -t 1 list tr069 2>/dev/null; then
|
||||
log "cwmp client not running"
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
port=$(uci -q get cwmp.cpe.port)
|
||||
port="${port:-7547}"
|
||||
|
||||
ipaddr=$(uci -q get cwmp.cpe.allowed_cr_ip)
|
||||
if [ -n "${ipaddr}" ]; then
|
||||
for ip in $ipaddr; do
|
||||
if echo "${ip}" | grep -q ":"; then
|
||||
add_firewall_rule "ipv6" "${ip}" "${port}" "${wan_zone_name}"
|
||||
else
|
||||
add_firewall_rule "ipv4" "${ip}" "${port}" "${wan_zone_name}"
|
||||
fi
|
||||
done
|
||||
else
|
||||
# Port-only
|
||||
add_firewall_rule "ipv6" "" "${port}" "${wan_zone_name}"
|
||||
add_firewall_rule "ipv4" "" "${port}" "${wan_zone_name}"
|
||||
fi
|
||||
|
||||
if [ "${lan}" != "${wan}" ]; then
|
||||
# Close the ACS port at Lan side
|
||||
close_downstream_acs_port "${lan}" "${port}"
|
||||
fi
|
||||
}
|
||||
|
||||
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,7 +170,22 @@ start_service() {
|
||||
|
||||
stop_service()
|
||||
{
|
||||
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 [ "$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
|
||||
}
|
||||
|
||||
reload_service() {
|
||||
|
||||
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
|
||||
@@ -4,6 +4,10 @@
|
||||
# Copy defaults by the factory to the cwmp UCI user section.
|
||||
config_load cwmp
|
||||
|
||||
if [ -f "/lib/functions/iopsys-environment.sh" ]; then
|
||||
. /lib/functions/iopsys-environment.sh
|
||||
fi
|
||||
|
||||
# Get Manufacturer OUI.
|
||||
config_get oui cpe manufacturer_oui ""
|
||||
if [ -z "${oui}" ]; then
|
||||
@@ -38,4 +42,14 @@ if [ -z "${enable_cwmp}" ]; then
|
||||
uci -q set cwmp.cpe.enable="1"
|
||||
fi
|
||||
|
||||
default_password="$(get_acs_password)"
|
||||
config_get pass cpe passwd ""
|
||||
if [ -z "${pass}" ]; then
|
||||
uci -q set cwmp.cpe.passwd="${default_password:-iopsys}"
|
||||
fi
|
||||
|
||||
config_get pass acs passwd ""
|
||||
if [ -z "${pass}" ]; then
|
||||
uci -q set cwmp.acs.passwd="${default_password:-iopsys}"
|
||||
fi
|
||||
# No need for commit here, it is done by uci_apply_defaults().
|
||||
|
||||
14
icwmp/files/etc/uci-defaults/85-migrate-gw-info
Normal file
14
icwmp/files/etc/uci-defaults/85-migrate-gw-info
Normal file
@@ -0,0 +1,14 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Script to migrate gateway-info options to gateway uci
|
||||
if [ ! -f "/etc/config/cwmp" ] && [ ! -f "/etc/config/gateway" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
val="$(uci -q get cwmp.cpe.disable_gatewayinfo)"
|
||||
|
||||
if [ -n "$val" ] && [ "$val" -eq 1 ]; then
|
||||
uci -q set gateway.global.enable=0
|
||||
fi
|
||||
|
||||
uci -q set cwmp.cpe.disable_gatewayinfo=""
|
||||
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
|
||||
@@ -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.3
|
||||
PKG_VERSION:=8.7.38
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=f3f4dbaac6b2ff6cfd38852e8625625d24996a53
|
||||
PKG_SOURCE_VERSION:=0fb1f2f45543a6fcd8107bb2185da81a7f3b5114
|
||||
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 += \
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,5 +17,3 @@ mac=$(uci -q get ieee1905.ieee1905.macaddress)
|
||||
[ "$mac" != "" ] && exit 0
|
||||
|
||||
uci set ieee1905.ieee1905.macaddress="$LMAC"
|
||||
uci commit ieee1905
|
||||
|
||||
|
||||
13
ieee1905/files/etc/uci-defaults/32-ieee1905-device-info
Normal file
13
ieee1905/files/etc/uci-defaults/32-ieee1905-device-info
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
. /etc/os-release
|
||||
|
||||
set_val() {
|
||||
uci -q get "$1" > /dev/null || uci set "${1}=${2:-${3}}"
|
||||
}
|
||||
|
||||
set_val ieee1905.ieee1905.manufacturer "$OPENWRT_DEVICE_MANUFACTURER" IOPSYS
|
||||
set_val ieee1905.ieee1905.model_name "$(cat /tmp/sysinfo/model)" 1905-SampleDev
|
||||
set_val ieee1905.ieee1905.device_name "$NAME" 1905Device
|
||||
|
||||
exit 0
|
||||
@@ -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:=25e32ac5a860aec6e53e3449565b71595073e014
|
||||
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.5
|
||||
PKG_VERSION:=7.5.1
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=67e6b91b8aca4c068a71f097f5f0576b47ec1d2e
|
||||
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
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libvoice-airoha
|
||||
PKG_RELEASE:=1
|
||||
PKG_VERSION:=1.1.2
|
||||
PKG_VERSION:=1.1.7
|
||||
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:=1ded9a4bb0f2f8a5f3989799b5500e328e086c99
|
||||
PKG_SOURCE_VERSION:=3a30086a68a3409f0396acb01380f91daabf7a2f
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
|
||||
@@ -1,17 +1,30 @@
|
||||
#!/bin/sh
|
||||
|
||||
hasVoice=$(db -q get hw.board.hasVoice)
|
||||
|
||||
[ "$hasVoice" = "1" ] || exit 0
|
||||
|
||||
SLIC=`cat /proc/device-tree/airoha-voice/slic-type`
|
||||
[ "${SLIC#pef}" != "${SLIC}" ] || exit 0
|
||||
SLIC=$(cat /proc/device-tree/airoha-voice/slic-type)
|
||||
[ "${SLIC#pef}" != "${SLIC}" ] && {
|
||||
echo Configure TxGain and RxGain for MXL SLIC $SLIC
|
||||
|
||||
echo Configure TxGain and RxGain for MXL SLIC $SLIC
|
||||
ports=$(db -q get hw.board.VoicePorts)
|
||||
for p in $(seq 0 $((ports-1))); do
|
||||
uci set asterisk.extension${p}.txgain='10'
|
||||
uci set asterisk.extension${p}.rxgain='-15'
|
||||
done
|
||||
}
|
||||
|
||||
ports=$(db -q get hw.board.VoicePorts)
|
||||
for p in $(seq 0 $((ports-1))); do
|
||||
uci set asterisk.extension${p}.txgain='10'
|
||||
uci set asterisk.extension${p}.rxgain='-15'
|
||||
done
|
||||
uci commit asterisk
|
||||
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'
|
||||
}
|
||||
|
||||
@@ -5,12 +5,12 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=libwifi
|
||||
PKG_VERSION:=7.10.0
|
||||
PKG_VERSION:=7.13.10
|
||||
|
||||
LOCAL_DEV=0
|
||||
ifneq ($(LOCAL_DEV),1)
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_VERSION:=1339c8a04ace73086832534a0f06835df67b8bca
|
||||
PKG_SOURCE_VERSION:=5e8d828c01ed7ab2feba9028b603dde9708cb656
|
||||
PKG_SOURCE_URL:=https://dev.iopsys.eu/iopsys/libwifi.git
|
||||
PKG_MAINTAINER:=Anjan Chanda <anjan.chanda@iopsys.eu>
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)_$(PKG_SOURCE_VERSION).tar.xz
|
||||
@@ -61,7 +61,7 @@ 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
|
||||
|
||||
38
linux-pam/Makefile
Normal file
38
linux-pam/Makefile
Normal file
@@ -0,0 +1,38 @@
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=linux-pam
|
||||
PKG_VERSION:=1.7.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE_PROTO:=git
|
||||
PKG_SOURCE_URL:=https://github.com/linux-pam/linux-pam.git
|
||||
PKG_SOURCE_VERSION:=v$(PKG_VERSION)
|
||||
PKG_MIRROR_HASH:=skip
|
||||
|
||||
include $(INCLUDE_DIR)/package.mk
|
||||
include $(INCLUDE_DIR)/meson.mk
|
||||
|
||||
define Package/linux-pam
|
||||
SECTION:=libs
|
||||
CATEGORY:=Libraries
|
||||
TITLE:=Linux PAM Module
|
||||
DEPENDS:=+libpam
|
||||
endef
|
||||
|
||||
MESON_ARGS += \
|
||||
-Dprefix=/usr \
|
||||
-Ddefault_library=shared \
|
||||
-Ddocs=disabled \
|
||||
-Deconf=disabled \
|
||||
-Dselinux=disabled \
|
||||
-Dnis=disabled \
|
||||
-Dexamples=false \
|
||||
-Dxtests=false
|
||||
|
||||
define Package/linux-pam/install
|
||||
$(INSTALL_DIR) $(1)/usr/lib/security
|
||||
$(INSTALL_DIR) $(1)/etc/init.d
|
||||
$(INSTALL_BIN) ./linux_pam.init $(1)/etc/init.d/linux_pam
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,linux-pam))
|
||||
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.9
|
||||
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:=e2ffe2b9e7722ce19dff7db6e47e62a305dc568b
|
||||
PKG_SOURCE_VERSION:=62441fdfe14a39bff8fff7c62307bd7b54d7240f
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_MIRROR_HASH:=skip
|
||||
endif
|
||||
@@ -28,9 +28,11 @@ define Package/logmngr
|
||||
SECTION:=utils
|
||||
CATEGORY:=Utilities
|
||||
TITLE:=Logging Manager
|
||||
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit +LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS:=+LOGMNGR_BACKEND_FLUENTBIT:fluent-bit
|
||||
DEPENDS+=+LOGMNGR_BACKEND_SYSLOG_NG:syslog-ng
|
||||
DEPENDS+=+LOGMNGR_LOGROTATE:logrotate
|
||||
DEPENDS+=+libbbfdm-api +libbbfdm-ubus +dm-service
|
||||
CONFLICTS:=logd
|
||||
endef
|
||||
|
||||
define Package/logmngr/description
|
||||
@@ -50,30 +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)/usr/sbin
|
||||
|
||||
$(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_DIR) $(1)/sbin
|
||||
$(INSTALL_DIR) $(1)/etc/hotplug.d/ntp/
|
||||
$(INSTALL_BIN) ./files/logread $(1)/sbin/
|
||||
$(INSTALL_DATA) ./files/lib/logmngr/fluent-bit.sh $(1)/lib/logmngr/
|
||||
$(INSTALL_BIN) ./files/logread $(1)/usr/sbin
|
||||
endif
|
||||
ifeq ($(CONFIG_LOGMNGR_BACKEND_SYSLOG_NG),y)
|
||||
$(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
|
||||
|
||||
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/
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbflogrotate.so $(1) sysmngr
|
||||
$(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
|
||||
$(BBFDM_INSTALL_MS_PLUGIN) $(PKG_BUILD_DIR)/bbf_plugin/libbbfvendorlog.so $(1) sysmngr 12
|
||||
endif
|
||||
|
||||
endef
|
||||
|
||||
$(eval $(call BuildPackage,logmngr))
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -s "/etc/config/logmngr" ]; then
|
||||
if uci -q get logmngr.@globals[0] >/dev/null; then
|
||||
# return if there is any valid content
|
||||
exit
|
||||
else
|
||||
rm -f /etc/config/logmngr
|
||||
fi
|
||||
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"
|
||||
uci commit logmngr
|
||||
@@ -1,14 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ -s "/etc/config/logmngr" ]; then
|
||||
if uci -q get logmngr.@log_rotate[0] >/dev/null; then
|
||||
# return if there is any valid content
|
||||
exit
|
||||
fi
|
||||
uci set logmngr.lro1=log_rotate
|
||||
uci set logmngr.lro1.enable=1
|
||||
uci set logmngr.lro1.file_name="/var/log/messages"
|
||||
uci set logmngr.lro1.file_count=1
|
||||
uci set logmngr.lro1.max_file_size=1000000
|
||||
uci commit logmngr
|
||||
fi
|
||||
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
|
||||
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
|
||||
13
logmngr/files/etc/uci-defaults/11-logmngr_logrotate_syslog
Normal file
13
logmngr/files/etc/uci-defaults/11-logmngr_logrotate_syslog
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Adds a default log rotate policy if none exists
|
||||
if uci -q get logmngr.lro1 >/dev/null; then
|
||||
# return if there is any valid content
|
||||
exit 0
|
||||
fi
|
||||
|
||||
uci set logmngr.lro1=log_rotate
|
||||
uci set logmngr.lro1.enable=1
|
||||
uci set logmngr.lro1.file_name="/var/log/messages"
|
||||
uci set logmngr.lro1.file_count=1
|
||||
uci set logmngr.lro1.max_file_size=1000000
|
||||
@@ -5,317 +5,532 @@
|
||||
|
||||
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}
|
||||
}
|
||||
|
||||
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 " parsers_file /etc/fluent-bit/parsers.conf" >> ${TMP_CONF_FILE}
|
||||
append_conf "[SERVICE]"
|
||||
append_conf " flush 1"
|
||||
append_conf " daemon off"
|
||||
append_conf " log_level info"
|
||||
append_conf " coro_stack_size 24576"
|
||||
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}
|
||||
|
||||
[ -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
|
||||
|
||||
}
|
||||
# read config
|
||||
config_get match_pattern $section pattern_match
|
||||
|
||||
generate_severity_regex() {
|
||||
local sev_level="$1"
|
||||
local sev_compare="$2"
|
||||
local sev_action="$3"
|
||||
|
||||
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
|
||||
|
||||
|
||||
local address
|
||||
config_get address $section log_ip
|
||||
if [ -z "$address" ]; then
|
||||
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"
|
||||
append_conf " syslog_hostname_key hostname"
|
||||
|
||||
local proto # holds value tcp or udp
|
||||
config_get proto $section proto
|
||||
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() {
|
||||
config_foreach handle_action action
|
||||
}
|
||||
|
||||
apply_config_file() {
|
||||
cp ${TMP_CONF_FILE} ${CONF_FILE}
|
||||
}
|
||||
|
||||
PROG=/usr/sbin/fluent-bit
|
||||
logmngr_init() {
|
||||
create_config_file
|
||||
local enabled
|
||||
|
||||
config_load logmngr
|
||||
local enabled
|
||||
config_get enabled globals enable
|
||||
|
||||
if [ "$enabled" == "0" ]; then
|
||||
return
|
||||
fi
|
||||
config_get_bool enabled globals enable "1"
|
||||
|
||||
create_config_file
|
||||
create_service_section
|
||||
create_default_filters
|
||||
handle_action_section
|
||||
apply_config_file
|
||||
|
||||
if [ -f /lib/logmngr/logrotate.sh ]; then
|
||||
logrotate_init
|
||||
fi
|
||||
|
||||
if [ "$enabled" = "0" ]; then
|
||||
return
|
||||
fi
|
||||
|
||||
procd_open_instance logmngr
|
||||
procd_set_param command $PROG -c $CONF_FILE
|
||||
procd_set_param file $CONF_FILE
|
||||
if [ -s "${TMP_CONF_FILE}" ]; then
|
||||
procd_set_param command $PROG -c ${TMP_CONF_FILE}
|
||||
procd_set_param file ${TMP_CONF_FILE}
|
||||
elif [ -s "${CONF_FILE}" ]; then
|
||||
procd_set_param command $PROG -c ${CONF_FILE}
|
||||
procd_set_param file ${CONF_FILE}
|
||||
fi
|
||||
procd_set_param respawn
|
||||
procd_close_instance
|
||||
}
|
||||
|
||||
@@ -4,14 +4,16 @@
|
||||
|
||||
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_FILE}
|
||||
touch ${LOGROTATE_TMP_FILE}
|
||||
echo -e "include ${CONF_DIR}" >> ${LOGROTATE_TMP_FILE}
|
||||
echo -e "" >> ${LOGROTATE_TMP_FILE}
|
||||
}
|
||||
|
||||
|
||||
handle_logrotate() {
|
||||
local section="$1"
|
||||
|
||||
|
||||
@@ -89,13 +89,13 @@ else
|
||||
exit 0
|
||||
;;
|
||||
-f)
|
||||
tail -f "${logfile}"
|
||||
tail -F "${logfile}"
|
||||
exit 0
|
||||
;;
|
||||
-fe)
|
||||
shift
|
||||
pattern="${1}"
|
||||
tail -f "${logfile}" | grep -E "${pattern}"
|
||||
tail -F "${logfile}" | grep -E "${pattern}"
|
||||
exit 0
|
||||
;;
|
||||
-h|*)
|
||||
|
||||
@@ -1,36 +0,0 @@
|
||||
#
|
||||
# Copyright (C) 2008-2016 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=ltq-nand
|
||||
PKG_VERSION:=1.0
|
||||
|
||||
PKG_SOURCE:=v$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand/archive/
|
||||
#PKG_SOURCE_PROTO:=git
|
||||
#PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand/releases/download/v$(PKG_VERSION)/
|
||||
#PKG_SOURCE_URL:=https://github.com/merbanan/ltq-nand.git
|
||||
#PKG_SOURCE_VERSION:=07b5b0331af6de4174dab2c02bf260ee9625452a
|
||||
|
||||
PKG_LICENSE:=GPLv2
|
||||
PKG_LICENSE_FILES:=LICENSE
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
|
||||
define Host/Compile
|
||||
$(MAKE) -C $(HOST_BUILD_DIR)
|
||||
endef
|
||||
|
||||
define Host/Install
|
||||
$(CP) \
|
||||
$(HOST_BUILD_DIR)/ltq-nand \
|
||||
$(STAGING_DIR_HOST)/bin/
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
|
||||
@@ -55,6 +55,10 @@ 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
|
||||
@@ -62,5 +66,9 @@ config AGENT_CHECK_PARTIAL_WIFI_RELOAD
|
||||
config DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER
|
||||
bool "Let dynbhd 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"
|
||||
default n
|
||||
|
||||
endmenu
|
||||
endif
|
||||
|
||||
@@ -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.3.2
|
||||
PKG_VERSION:=6.3.7.17
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||
PKG_SOURCE_VERSION:=43779ec4dac50780a6807aad7da22bc255694331
|
||||
PKG_SOURCE_VERSION:=7f71fafbec49fa4b25d1e8d07cfc1fee5b4bbab0
|
||||
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 \
|
||||
@@ -45,9 +46,12 @@ define Package/dynbhd
|
||||
+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.
|
||||
This package provides EasyMesh R6 compliant Wi-Fi Multi-AP Agent.
|
||||
endef
|
||||
|
||||
define Package/dynbhd/description
|
||||
@@ -115,6 +119,10 @@ ifeq ($(CONFIG_DYNBHD_DYNAMICALLY_PERSIST_CONTROLLER),y)
|
||||
TARGET_CFLAGS += -DPERSIST_CONTROLLER
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_AGENT_UNASSOC_STA_CONT_MONITOR),y)
|
||||
TARGET_CFLAGS += -DUNASSOC_STA_CONT_MONITOR
|
||||
endif
|
||||
|
||||
MAKE_PATH:=src
|
||||
|
||||
define Package/map-agent/install
|
||||
|
||||
@@ -1,15 +1,26 @@
|
||||
#!/bin/sh
|
||||
|
||||
conn_ports_file="/var/run/multiap/map.connected.ports"
|
||||
map_bh_file="/var/run/multiap/multiap.backhaul"
|
||||
|
||||
# Exit if AL Bridge is not configured to be a bridge device
|
||||
al_bridge="$(uci -q get mapagent.agent.al_bridge)"
|
||||
[ "${al_bridge:0:3}" = "br-" ] || exit 0
|
||||
|
||||
# Get all sections where the port appears in 'ports' list
|
||||
port_bridge_sec_list="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
|
||||
|
||||
# Find the first section with type='bridge' and get its name
|
||||
for port_bridge_sec in $port_bridge_sec_list; do
|
||||
if [ "$(uci -q get network.$port_bridge_sec.type)" = "bridge" ]; then
|
||||
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
# Exit if the PORT Bridge Name is empty
|
||||
[ -z "$port_bridge_name" ] && exit 0
|
||||
|
||||
# Exit if the PORT is not member of the AL Bridge
|
||||
port_bridge_sec="$(uci show network | grep -w $PORT | grep '\.ports' | cut -d'.' -f2)"
|
||||
port_bridge_name="$(uci -q get network.$port_bridge_sec.name)"
|
||||
[ "$port_bridge_name" = "$al_bridge" ] || exit 0
|
||||
|
||||
# Exit if the device is not operating in extender/repeater mode
|
||||
@@ -18,30 +29,6 @@ al_brnet="${al_bridge:3}"
|
||||
|
||||
############## Dynamic Backhaul Daemon ##############
|
||||
if [ -n "$(which dynbhd)" ]; then
|
||||
pidof dynbhd >/dev/null && exit 0 # dynbhd is managing the links
|
||||
|
||||
if [ ! -f $conn_ports_file ]; then
|
||||
mkdir -p /var/run/multiap
|
||||
touch $conn_ports_file
|
||||
if [ "$LINK" = "up" ]; then
|
||||
touch $conn_ports_file
|
||||
echo "$PORT" > $conn_ports_file
|
||||
brctl delif $al_bridge $PORT
|
||||
#ubus call network.interface.lan remove_device "{\"name\":\"$PORT\"}"
|
||||
fi
|
||||
else
|
||||
if [ "$LINK" = "up" ]; then
|
||||
brctl delif $al_bridge $PORT
|
||||
echo "$PORT" >> $conn_ports_file
|
||||
#ubus call network.interface.lan remove_device "{\"name\":\"$PORT\"}"
|
||||
else
|
||||
sed -i -E "/(^|:)${PORT}(:|$)/d" $conn_ports_file
|
||||
#ubus call network.interface.lan add_device "{\"name\":\"$PORT\"}"
|
||||
brctl addif $al_bridge $PORT
|
||||
[ "$(cat $conn_ports_file | wc -c)" = "0" ] && rm -f $conn_ports_file
|
||||
fi
|
||||
fi
|
||||
|
||||
exit 0
|
||||
fi
|
||||
########################################################
|
||||
@@ -74,6 +61,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"
|
||||
@@ -81,14 +76,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
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user