Compare commits

...

421 Commits

Author SHA1 Message Date
TIP Automation User
a45d351081 Chg: update image tag in helm values to v2.6.2 2022-09-15 11:47:49 +00:00
Dmitry Dunaev
7f291914bd Merge pull request #195 from Telecominfraproject/feature/wifi-10842--docker-compose--iptocountry-2-6
[WIFI-10842] Add: docker-compose support for iptocountry
2022-09-15 14:13:06 +03:00
Dmitry Dunaev
3edbb02187 [WIFI-10842] Add: docker-compose support for iptocountry
Signed-off-by: Dmitry Dunaev <dmitry@opsfleet.com>
2022-09-15 14:12:18 +03:00
TIP Automation User
27beb0bd5d Chg: update image tag in helm values to v2.6.1 2022-09-02 10:03:40 +00:00
Stephane Bourque
24ec3259c6 Merge pull request #158 from Telecominfraproject/master
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-21 22:51:53 -07:00
Stephane Bourque
b09cec0bc2 Merge pull request #157 from Telecominfraproject/WIFI-9977v4
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-21 22:12:59 -07:00
stephb9959
d14ca95010 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-21 22:04:15 -07:00
stephb9959
2df1100795 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 21:40:12 -07:00
stephb9959
2f961f992a Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 21:20:27 -07:00
stephb9959
ecdc5b3531 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 20:53:16 -07:00
stephb9959
5f08a581f2 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 20:49:07 -07:00
stephb9959
87b4a5d626 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 20:43:53 -07:00
stephb9959
6aa2ef2878 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 20:42:18 -07:00
stephb9959
9267a36529 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-19 20:32:01 -07:00
stephb9959
72db313d8d Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 23:03:57 -07:00
stephb9959
93f0b2500e Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 23:03:21 -07:00
stephb9959
76b7aba5bd Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 22:41:32 -07:00
stephb9959
0585884033 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 22:36:39 -07:00
stephb9959
c31fa08579 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 22:34:26 -07:00
stephb9959
d9c3fea93d Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 22:27:51 -07:00
stephb9959
6325476325 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 22:24:29 -07:00
stephb9959
054e172b64 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 21:56:22 -07:00
stephb9959
7ae51f0fec Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 21:52:58 -07:00
stephb9959
531c0e24ba Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 21:46:53 -07:00
stephb9959
d97a31e002 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 08:51:32 -07:00
stephb9959
70e5b1d0db Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 08:43:17 -07:00
stephb9959
63516e85db Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-18 08:34:15 -07:00
stephb9959
35b1dbdc2e Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 23:25:41 -07:00
stephb9959
c9abe16cfe Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 23:21:22 -07:00
stephb9959
aee7530b2b Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 23:13:06 -07:00
stephb9959
ceda99fa84 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:56:27 -07:00
stephb9959
ce78b144e6 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:51:54 -07:00
stephb9959
3fd3717978 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:36:29 -07:00
stephb9959
9be3f1dfa9 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:34:11 -07:00
stephb9959
2249367696 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:23:46 -07:00
stephb9959
b68af82771 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 22:12:55 -07:00
stephb9959
884d2e323b Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 16:02:31 -07:00
stephb9959
5a21b6f197 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 15:53:41 -07:00
stephb9959
62c0178aa9 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 15:17:39 -07:00
stephb9959
041452cf93 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 15:00:57 -07:00
stephb9959
89ebaf78bc Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 14:45:10 -07:00
stephb9959
295a6496ef Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 14:13:48 -07:00
stephb9959
48fb10bcec Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 13:36:59 -07:00
stephb9959
525e464592 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 12:28:52 -07:00
stephb9959
5f20866a31 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 12:27:51 -07:00
stephb9959
05f60cd08b Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:57:45 -07:00
stephb9959
bd7b56757d Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:50:41 -07:00
stephb9959
bc3c85fe2d Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:37:41 -07:00
stephb9959
22c87decdc Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:18:53 -07:00
stephb9959
d13216e0e2 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:17:52 -07:00
stephb9959
992d977312 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-17 11:13:04 -07:00
stephb9959
9cb789d0b0 Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-16 23:35:09 -07:00
stephb9959
b4e9747bfa Feature: venue-broadcast
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-16 22:44:33 -07:00
Stephane Bourque
351633f215 Merge pull request #156 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-16 09:06:03 -07:00
Stephane Bourque
5ec9d6a2c8 Merge pull request #155 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-16 08:38:50 -07:00
stephb9959
3abb24919f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-16 08:37:02 -07:00
Stephane Bourque
089446c3b4 Merge pull request #154 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 23:10:57 -07:00
Stephane Bourque
345195dd1e Merge pull request #153 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 23:09:58 -07:00
stephb9959
21db12bcc6 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 23:07:32 -07:00
stephb9959
be01cfb142 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:57:54 -07:00
stephb9959
55645c5da4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:32:26 -07:00
stephb9959
aa0316462f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:31:08 -07:00
stephb9959
ebb3c8fed0 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:21:22 -07:00
stephb9959
4fb788def4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:08:57 -07:00
stephb9959
5b1e048be3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 22:04:54 -07:00
stephb9959
03ebc88672 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:58:46 -07:00
stephb9959
80bb7ffa07 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:57:22 -07:00
stephb9959
1776a70a0e Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:47:24 -07:00
stephb9959
3a0de1fee9 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:35:12 -07:00
stephb9959
8414ed719b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:08:13 -07:00
stephb9959
eebb18fccf Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 21:00:27 -07:00
stephb9959
1e59b8e160 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 20:43:23 -07:00
stephb9959
6da673e754 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 20:39:56 -07:00
stephb9959
ee4cb53517 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 20:34:11 -07:00
stephb9959
61da6aa317 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:50:55 -07:00
stephb9959
bbbadd3a23 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:44:52 -07:00
stephb9959
855eb0dc13 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:36:05 -07:00
stephb9959
0601aaf340 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:35:00 -07:00
stephb9959
100d0302be Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:29:37 -07:00
stephb9959
1fe4dbf49f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:24:29 -07:00
stephb9959
720222137c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:18:39 -07:00
stephb9959
d464b8a6f4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:11:58 -07:00
stephb9959
019a995bdd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:09:08 -07:00
stephb9959
f70a8f1732 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 16:08:16 -07:00
stephb9959
0c79d2a632 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:56:44 -07:00
stephb9959
1d16bd352a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:46:02 -07:00
stephb9959
88564f2a77 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:33:52 -07:00
stephb9959
1907ab9623 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:30:01 -07:00
stephb9959
60e50b2af4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:24:11 -07:00
stephb9959
cd24a45c87 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:17:46 -07:00
stephb9959
cab25f6fd7 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 15:04:55 -07:00
stephb9959
23c5879a4b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:55:59 -07:00
stephb9959
4e90422e7c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:43:57 -07:00
stephb9959
e75983019a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:25:20 -07:00
stephb9959
a6afef5f8e Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:15:56 -07:00
stephb9959
15e45f32a1 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:11:19 -07:00
stephb9959
4c7e1807a2 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:01:21 -07:00
stephb9959
301b24415c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 14:00:34 -07:00
stephb9959
da0698ab9b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:57:27 -07:00
stephb9959
f8454e6b83 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:52:54 -07:00
stephb9959
cfaab404e9 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:49:58 -07:00
stephb9959
e5f98cda04 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:44:54 -07:00
stephb9959
bd8fece423 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:36:18 -07:00
stephb9959
68a707fe57 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 13:31:09 -07:00
stephb9959
e02a5595a1 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 12:44:21 -07:00
Stephane Bourque
744c1143fb Merge pull request #152 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 11:16:01 -07:00
stephb9959
41423a6d5f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 11:15:25 -07:00
stephb9959
060c8673e7 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 11:14:42 -07:00
Stephane Bourque
1210ae821b Merge pull request #151 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 10:49:12 -07:00
stephb9959
1a2e4cc184 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 10:48:18 -07:00
Stephane Bourque
e32ace120b Merge pull request #150 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 10:33:55 -07:00
stephb9959
3f2c046a96 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 10:32:21 -07:00
Stephane Bourque
9459bb022c Merge pull request #149 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 10:16:04 -07:00
stephb9959
9526a2639a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 10:14:56 -07:00
Stephane Bourque
2051467c0b Merge pull request #148 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 07:47:53 -07:00
stephb9959
bacaa9959c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 07:46:36 -07:00
Stephane Bourque
875ee6bfd1 Merge pull request #147 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-15 07:42:16 -07:00
stephb9959
8f966fa80c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 07:41:13 -07:00
stephb9959
d9ac843134 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-15 07:07:18 -07:00
Stephane Bourque
4abedcddf0 Merge pull request #146 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-14 20:57:21 -07:00
Stephane Bourque
c14abf8aa0 Merge pull request #145 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-14 20:55:33 -07:00
stephb9959
d779fca535 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 20:50:46 -07:00
stephb9959
7e1d545f26 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 20:43:38 -07:00
stephb9959
9c2d60ed3a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 20:22:58 -07:00
Stephane Bourque
b8516cad84 Merge pull request #144 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-14 15:52:37 -07:00
stephb9959
eba979d9da Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:47:58 -07:00
stephb9959
d163f7522d Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:34:53 -07:00
stephb9959
132fdafd32 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:29:00 -07:00
stephb9959
3d6527f30b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:17:02 -07:00
stephb9959
dc114de8fa Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:16:11 -07:00
stephb9959
0592537b71 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 15:16:04 -07:00
stephb9959
eddaaa0cd6 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 08:03:33 -07:00
stephb9959
46e72369ae Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-14 07:28:32 -07:00
Stephane Bourque
3fc3af68ee Merge pull request #143 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-14 00:03:17 -07:00
Stephane Bourque
58648d7dc5 Merge pull request #142 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-13 23:59:54 -07:00
stephb9959
b2bd6aab9e Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 23:58:42 -07:00
stephb9959
3781f5283f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 23:42:47 -07:00
stephb9959
7b990a7d2f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 23:14:33 -07:00
Stephane Bourque
eca43e1d57 Merge pull request #141 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-13 17:23:18 -07:00
Stephane Bourque
c1347fc3b8 Merge pull request #140 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-13 15:51:42 -07:00
stephb9959
888fcbbcd3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 15:50:31 -07:00
stephb9959
4e4156c420 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 15:45:51 -07:00
stephb9959
ee98a7b8a5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 14:24:54 -07:00
stephb9959
0b5518d265 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 14:21:38 -07:00
stephb9959
7bc0656f25 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 13:53:53 -07:00
stephb9959
177a8b40ee Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 12:54:43 -07:00
Stephane Bourque
85ee78f35e Merge pull request #139 from Telecominfraproject/WIFI-9977
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-13 12:08:11 -07:00
stephb9959
9043b3a558 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:59:10 -07:00
stephb9959
4d2d488812 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:53:09 -07:00
stephb9959
adf226f2e8 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:48:24 -07:00
stephb9959
749d425d80 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:40:55 -07:00
stephb9959
a6f9deb315 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:35:41 -07:00
stephb9959
f4236408fc Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:30:03 -07:00
stephb9959
377c7bfc0b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:20:27 -07:00
stephb9959
2e3efd97e4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:08:28 -07:00
stephb9959
58abf04e42 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 11:07:40 -07:00
stephb9959
5e002899b5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 10:45:04 -07:00
stephb9959
d43c8f63ab Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-13 08:27:54 -07:00
Stephane Bourque
07a64877bb Merge pull request #138 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-12 21:24:20 -07:00
Stephane Bourque
a00ba50920 Merge pull request #137 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-12 20:39:33 -07:00
stephb9959
c2fa87d6bd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 20:38:12 -07:00
stephb9959
ab0b36a96f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 20:31:18 -07:00
stephb9959
89f8047e2f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 20:20:15 -07:00
stephb9959
1515c9bb6a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 20:11:54 -07:00
stephb9959
b53e6f44fa Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 14:16:10 -07:00
stephb9959
769c9c90f6 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 12:31:16 -07:00
stephb9959
dc0eb35376 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 12:02:29 -07:00
stephb9959
e6b497f0b4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 11:21:07 -07:00
stephb9959
bab9d869b1 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 10:52:42 -07:00
stephb9959
a9127d4fcf Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 10:35:30 -07:00
stephb9959
fea78abe9b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 10:27:10 -07:00
stephb9959
bd72993fa5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 10:11:48 -07:00
stephb9959
7d74694bf9 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 10:01:30 -07:00
stephb9959
8e84a0f1f3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 09:50:24 -07:00
stephb9959
98c8f29555 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 09:41:04 -07:00
stephb9959
42a4ee0864 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 09:28:59 -07:00
stephb9959
fcce86acf4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 09:03:41 -07:00
stephb9959
31aad8b41b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 08:18:25 -07:00
stephb9959
a828039445 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 08:03:07 -07:00
stephb9959
6905aeaeec Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 07:53:16 -07:00
Stephane Bourque
3293b7b71d Merge pull request #136 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-12 00:31:03 -07:00
stephb9959
2d6df5ea29 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 00:29:01 -07:00
stephb9959
e466f76b75 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 00:28:12 -07:00
stephb9959
170b97514b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 00:20:54 -07:00
stephb9959
a463bb60dd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 00:20:03 -07:00
stephb9959
9bbb12b674 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-12 00:05:05 -07:00
stephb9959
46cc41e065 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 23:53:15 -07:00
stephb9959
1776643579 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 23:40:46 -07:00
stephb9959
c0d9aca88a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 23:22:39 -07:00
stephb9959
88018335da Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 23:08:01 -07:00
stephb9959
7ce7927c95 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 22:56:38 -07:00
stephb9959
5b797cf937 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 22:43:53 -07:00
stephb9959
cd615e8f2b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 22:33:17 -07:00
stephb9959
cf3f0fe67f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 21:57:51 -07:00
stephb9959
b80e92f3dc Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 21:50:53 -07:00
stephb9959
11034bd4fd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:31:25 -07:00
stephb9959
01980892b1 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:24:14 -07:00
stephb9959
f4d4405663 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:18:24 -07:00
stephb9959
a8370dc8dd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:17:43 -07:00
stephb9959
861c4d0dee Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:12:15 -07:00
stephb9959
8c70e833ea Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 14:08:03 -07:00
stephb9959
f8928bbec2 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 13:42:00 -07:00
stephb9959
0b7e474e01 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 13:40:22 -07:00
stephb9959
14f0bb75d1 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 12:37:20 -07:00
stephb9959
32d37a3b9c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 12:27:12 -07:00
stephb9959
24391c5ac4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 12:23:39 -07:00
stephb9959
7ac47dfaa0 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 12:16:05 -07:00
stephb9959
fd77d6ef37 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 11:32:02 -07:00
stephb9959
04c9deffd3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 11:23:55 -07:00
stephb9959
f8bc00cb55 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 11:15:48 -07:00
stephb9959
f2ae0b6bd4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 11:11:25 -07:00
stephb9959
1904b34c84 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 11:07:13 -07:00
stephb9959
23ea21d2b4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 10:57:06 -07:00
stephb9959
276572a8a5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 10:29:10 -07:00
stephb9959
b9bd5ca6a5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 10:27:41 -07:00
stephb9959
201a4dd6e7 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 10:18:57 -07:00
Stephane Bourque
769eb83744 Merge pull request #135 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-11 10:09:31 -07:00
stephb9959
66a30c4f37 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 10:06:22 -07:00
Stephane Bourque
2a744e2fde Merge pull request #134 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-11 09:43:00 -07:00
stephb9959
f212aa2e8c Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 09:30:47 -07:00
stephb9959
fc478bd304 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 09:11:39 -07:00
stephb9959
6e8a2478c4 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 09:01:46 -07:00
stephb9959
eceb5a9034 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 08:48:55 -07:00
stephb9959
782acea8c7 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 08:47:18 -07:00
stephb9959
524d392e83 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 08:39:08 -07:00
Stephane Bourque
885f1affeb Merge pull request #133 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-11 07:22:44 -07:00
stephb9959
50abf75a0a Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-11 07:21:53 -07:00
TIP Automation User
4af6427814 Chg: update image tag in helm values to v2.6.0 2022-07-11 11:13:53 +00:00
TIP Automation User
2a6ec50ce1 Chg: update image tag in helm values to v2.6.0-RC5 2022-07-11 11:02:32 +00:00
Stephane Bourque
4497dc655b Merge pull request #132 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
2022-07-10 16:41:15 -07:00
Stephane Bourque
1e2d04ad07 Merge pull request #131 from Telecominfraproject/WIFI-10084
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
2022-07-10 16:10:40 -07:00
stephb9959
5874d3f1fd Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 16:09:06 -07:00
stephb9959
a4abbe6ef3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 16:06:37 -07:00
stephb9959
41e3cbb2b2 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 16:00:13 -07:00
stephb9959
1f77083973 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 15:52:36 -07:00
stephb9959
b08f993a20 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 15:40:34 -07:00
stephb9959
113baa625e Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 15:34:49 -07:00
stephb9959
3765d22815 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 15:33:47 -07:00
stephb9959
24d492903b Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 15:27:09 -07:00
stephb9959
3b4fd70522 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:54:45 -07:00
stephb9959
19cf9101fe Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:43:49 -07:00
stephb9959
004319e7ad Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:36:17 -07:00
stephb9959
94893d1185 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:28:57 -07:00
stephb9959
13dce2f3e8 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:28:16 -07:00
stephb9959
ea7bc3c52f Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:13:36 -07:00
stephb9959
0235a13841 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 14:07:54 -07:00
stephb9959
be33c88337 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 13:58:40 -07:00
stephb9959
0456f638c9 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:32:09 -07:00
stephb9959
83ada79ca3 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:29:25 -07:00
stephb9959
913d1e571d Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:22:33 -07:00
stephb9959
8f98e510db Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:17:51 -07:00
stephb9959
fb0da90b63 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:04:44 -07:00
stephb9959
1e1dec51ab Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 11:01:34 -07:00
stephb9959
c35602e30e Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 10:47:26 -07:00
stephb9959
4c90a777e0 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 10:36:38 -07:00
stephb9959
9abfa4bad5 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 10:30:23 -07:00
stephb9959
7ecd0c9891 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 10:09:41 -07:00
stephb9959
6e25ccdd87 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 10:08:10 -07:00
stephb9959
a8f970eaf2 Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 09:52:23 -07:00
stephb9959
9f4d362a6d Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10084
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-10 08:02:46 -07:00
TIP Automation User
5f3f9e93d2 Chg: update image tag in helm values to v2.6.0-RC4 2022-07-09 12:17:30 +00:00
stephb9959
c84f05cd22 Merge remote-tracking branch 'origin/master' 2022-07-08 23:10:01 -07:00
stephb9959
a532520044 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-08 23:09:34 -07:00
Stephane Bourque
6d82ee355e Merge pull request #130 from Telecominfraproject/master
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-07 21:24:48 -07:00
Stephane Bourque
02c3b2fe2e Merge pull request #129 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-07 20:54:24 -07:00
stephb9959
cce4a7ec93 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-07 20:52:40 -07:00
Stephane Bourque
9aef183dc2 Merge pull request #128 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-07 12:08:40 -07:00
stephb9959
60a3365a9e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-07 11:59:04 -07:00
stephb9959
6c052d7afe https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-07 11:57:57 -07:00
Stephane Bourque
88eae31b7f Merge pull request #127 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 23:41:42 -07:00
stephb9959
d59f6e3dfc https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 23:39:46 -07:00
Stephane Bourque
c97566f625 Merge pull request #126 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 22:59:51 -07:00
stephb9959
1fb41a9460 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:55:50 -07:00
stephb9959
cfec8a1cbc https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:55:39 -07:00
stephb9959
7a84640c71 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:52:44 -07:00
Stephane Bourque
0d2276ff5a Merge pull request #125 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 22:25:36 -07:00
stephb9959
d227f83384 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:23:28 -07:00
stephb9959
acb4d91a3d https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:20:48 -07:00
Stephane Bourque
72b2913cc5 Merge pull request #124 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 22:03:47 -07:00
stephb9959
746ef603e2 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:02:51 -07:00
stephb9959
ab792f7239 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 22:02:42 -07:00
Stephane Bourque
c4bb577763 Merge pull request #123 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 21:41:49 -07:00
stephb9959
3caf67102e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 21:41:15 -07:00
Stephane Bourque
8a3ade14ae Merge pull request #122 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 21:26:06 -07:00
stephb9959
4199b859ad https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 21:24:36 -07:00
stephb9959
be1b571f7f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 21:10:29 -07:00
Stephane Bourque
3002e17fd2 Merge pull request #121 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 21:04:22 -07:00
stephb9959
0d1a794e10 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 21:00:50 -07:00
stephb9959
2aa7d97c80 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 19:23:47 -07:00
Stephane Bourque
0d3a0cbf03 Merge pull request #120 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 16:26:07 -07:00
stephb9959
1d8cb5447b https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 16:25:10 -07:00
Stephane Bourque
3526a7abd9 Merge pull request #119 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 16:01:04 -07:00
stephb9959
d7ec9a3552 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 15:59:29 -07:00
Stephane Bourque
9f567e0e69 Merge pull request #118 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 15:30:56 -07:00
stephb9959
b16a410f1d https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 15:29:39 -07:00
Stephane Bourque
0955f23dfc Merge pull request #117 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 14:52:21 -07:00
stephb9959
bd10ebc19c https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 14:50:58 -07:00
stephb9959
f74c5b496f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 14:50:07 -07:00
stephb9959
6e961be74e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 14:42:28 -07:00
Stephane Bourque
c92d22f3cb Merge pull request #116 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 12:13:18 -07:00
stephb9959
e1770dc6a2 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 10:47:43 -07:00
Stephane Bourque
eace417fd3 Merge pull request #115 from Telecominfraproject/WIFI-9977v3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-06 08:45:20 -07:00
stephb9959
ec3b5ededc https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-06 08:39:12 -07:00
Stephane Bourque
4c6a0ab9e2 Merge pull request #114 from Telecominfraproject/master
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-05 15:29:44 -07:00
Stephane Bourque
78a6b011f8 Merge pull request #113 from Telecominfraproject/RADSEC-proxy
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-05 15:01:37 -07:00
stephb9959
a5450418b3 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-05 14:23:21 -07:00
stephb9959
c74aa0d89f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-05 13:36:38 -07:00
stephb9959
5f5e887f91 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-04 23:26:10 -07:00
stephb9959
54a9290589 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-04 23:23:52 -07:00
stephb9959
24be35c974 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-04 23:18:12 -07:00
Stephane Bourque
937d2818c0 Merge pull request #112 from Telecominfraproject/RTTYv3
Fix: https://telecominfraproject.atlassian.net/browse/WIFI-10040
2022-07-04 21:44:59 -07:00
stephb9959
f014960b3a https://telecominfraproject.atlassian.net/browse/WIFI-10040
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-04 13:57:13 -07:00
stephb9959
cc5b319141 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-07-01 08:00:28 -07:00
Stephane Bourque
d5e7a6661f Merge pull request #111 from Telecominfraproject/RTTYv3
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-07-01 06:53:53 -07:00
stephb9959
3368782471 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 23:30:13 -07:00
stephb9959
2f013557a9 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 23:22:50 -07:00
stephb9959
09595abc8c https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 23:22:30 -07:00
stephb9959
5104ab1dc3 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 23:18:22 -07:00
stephb9959
8f3b2f795f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:59:14 -07:00
stephb9959
9779ee669b https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:55:58 -07:00
stephb9959
f7187749a1 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:51:03 -07:00
stephb9959
ddec407856 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:47:11 -07:00
stephb9959
4650ac592a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:39:13 -07:00
stephb9959
bc5c9e30cf https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:19:45 -07:00
stephb9959
1b53398e1e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:14:39 -07:00
stephb9959
7b59a981dd https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 22:02:19 -07:00
stephb9959
ec3cb6586f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 21:41:33 -07:00
stephb9959
c40be95aa8 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 21:29:35 -07:00
stephb9959
ba8edb7f74 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 20:51:00 -07:00
stephb9959
ea14936a1d https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 20:42:03 -07:00
stephb9959
676f131ca9 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 20:39:55 -07:00
stephb9959
2e1fc663c8 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 20:29:27 -07:00
stephb9959
cd9ef2ed2a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 17:02:17 -07:00
stephb9959
4a1a903656 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 16:59:00 -07:00
stephb9959
f6409fc063 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 16:38:23 -07:00
stephb9959
6af855f6ca https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 16:33:39 -07:00
stephb9959
bec81bc380 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 16:31:15 -07:00
stephb9959
0e4e4156a1 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 16:07:51 -07:00
stephb9959
2aa60a5676 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 15:59:58 -07:00
stephb9959
8b396e51ff https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 15:48:15 -07:00
Stephane Bourque
01f53d7b78 Merge pull request #110 from Telecominfraproject/WIFI-9828
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-06-30 15:47:01 -07:00
stephb9959
b3c188701f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 14:31:12 -07:00
stephb9959
7eb4c9e38b https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 11:00:42 -07:00
stephb9959
c93c34c042 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 10:53:37 -07:00
stephb9959
418f8d31ae https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 10:44:14 -07:00
stephb9959
77c0c191f7 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 10:12:49 -07:00
stephb9959
f0f4cf54bb https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 10:06:30 -07:00
stephb9959
917abf1d7f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 09:43:05 -07:00
stephb9959
b4e7e4e26b https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 09:27:33 -07:00
stephb9959
9d0a146859 https://telecominfraproject.atlassian.net/browse/WIFI-9877
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 09:13:46 -07:00
Stephane Bourque
2efed5e626 Merge pull request #109 from Telecominfraproject/master
https://telecominfraproject.atlassian.net/browse/WIFI-9828
2022-06-30 08:11:03 -07:00
Stephane Bourque
7420b72b23 Merge pull request #108 from Telecominfraproject/oui_download_url
properties: update default OUI download URL everywhere
2022-06-30 07:25:57 -07:00
Stephane Bourque
5fc675484c Merge pull request #107 from Telecominfraproject/WIFI-9828
https://telecominfraproject.atlassian.net/browse/WIFI-9828
2022-06-30 07:12:49 -07:00
Stijn Tintel
38ad11542b properties: update default OUI download URL everywhere
The URL https://linuxnet.ca/ieee/oui.txt times out:

  OUI-SVR: [Information] Start: Retrieving OUI file: https://linuxnet.ca/ieee/oui.txt
  OUI-SVR: [Error] Timeout: connect timed out: 24.222.55.20:443

It was replaced with a working URL in the following commit:
7e5e998265 ("Updated the OUI db download link")

Let's use the new URL everywhere for consistency.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2022-06-30 16:19:44 +03:00
stephb9959
63f2a4085a https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-30 00:17:39 -07:00
Stephane Bourque
fea70efb2d Merge pull request #106 from Telecominfraproject/WIFI-9828
Wifi 9828
2022-06-30 00:15:26 -07:00
stephb9959
da42c9845f https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 23:47:47 -07:00
stephb9959
ed46778bd4 https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 23:35:14 -07:00
stephb9959
1f7c0b7fdf https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 23:22:58 -07:00
stephb9959
15ec31fc89 https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 23:13:38 -07:00
stephb9959
d2a0d6da8a https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 23:08:52 -07:00
stephb9959
77cae31031 https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 22:41:36 -07:00
stephb9959
6cab1caf6c https://telecominfraproject.atlassian.net/browse/WIFI-9828
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 22:10:28 -07:00
Stephane Bourque
faf7881c87 Merge pull request #105 from Telecominfraproject/master
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-06-29 22:00:03 -07:00
Stephane Bourque
eea8203869 Merge pull request #104 from Telecominfraproject/WiFi-9620-CoA
https://telecominfraproject.atlassian.net/browse/WIFI-9977
2022-06-29 18:31:24 -07:00
stephb9959
040397aa8e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:20:56 -07:00
stephb9959
bba92aa9b8 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:20:14 -07:00
stephb9959
c332a3946d https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:19:12 -07:00
stephb9959
02e677f849 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:07:07 -07:00
stephb9959
a26f7c03c1 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:05:43 -07:00
stephb9959
9181ae01cc https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 17:00:23 -07:00
stephb9959
7825b00d2e https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 16:50:51 -07:00
stephb9959
8b895c2088 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 16:30:39 -07:00
stephb9959
49d39d37a1 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 16:23:06 -07:00
stephb9959
406d59d5d7 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 15:55:21 -07:00
stephb9959
186d12c78a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 15:49:36 -07:00
stephb9959
421c24c961 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 15:16:49 -07:00
stephb9959
e00c835680 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 15:12:54 -07:00
stephb9959
3f972ebb4a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 14:55:58 -07:00
stephb9959
cf8d29e66f https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 14:45:13 -07:00
stephb9959
d5e11d246a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 12:29:01 -07:00
stephb9959
6ac29199e0 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 11:53:14 -07:00
stephb9959
2f9452d6ef https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 11:10:24 -07:00
stephb9959
caed454e1a https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 11:05:50 -07:00
stephb9959
30916cbed1 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 10:54:35 -07:00
stephb9959
81899788a9 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 10:23:53 -07:00
stephb9959
e1590cbe90 https://telecominfraproject.atlassian.net/browse/WIFI-9977
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 10:22:30 -07:00
stephb9959
bcbc212436 https://telecominfraproject.atlassian.net/browse/WIFI-9976
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 10:09:02 -07:00
stephb9959
520671684b https://telecominfraproject.atlassian.net/browse/WIFI-9976
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 10:04:48 -07:00
Stephane Bourque
eacf9c0450 Merge pull request #102 from Telecominfraproject/WiFi-9620-CoA
https://telecominfraproject.atlassian.net/browse/WIFI-9952
2022-06-29 09:41:30 -07:00
stephb9959
bef4c3ed5c https://telecominfraproject.atlassian.net/browse/WIFI-9952
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-29 09:14:57 -07:00
stephb9959
4fe6254bf2 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 09:45:18 -07:00
stephb9959
63ba3d633d https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 08:28:48 -07:00
stephb9959
1255cf0a56 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 08:09:00 -07:00
stephb9959
7a6f2a517c https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:57:29 -07:00
stephb9959
6c15908ed6 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:49:31 -07:00
stephb9959
d0a7670fff https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:40:06 -07:00
stephb9959
17d6253cfe https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:28:42 -07:00
stephb9959
ab592305ce https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:11:34 -07:00
stephb9959
0da527e1d7 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 07:06:16 -07:00
stephb9959
d3848a6f8b https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 06:54:51 -07:00
stephb9959
c522c22d31 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 06:48:20 -07:00
stephb9959
783886662f https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 06:44:19 -07:00
stephb9959
56ab9b1409 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-28 06:29:20 -07:00
stephb9959
67e86a0edf https://telecominfraproject.atlassian.net/browse/WIFI-9952
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 20:30:44 -07:00
stephb9959
70c12a5b77 https://telecominfraproject.atlassian.net/browse/WIFI-9952
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 17:24:48 -07:00
stephb9959
03f2e2d457 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 14:20:41 -07:00
stephb9959
ed12331d20 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 14:13:38 -07:00
stephb9959
ec0c295c7c https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 14:10:53 -07:00
stephb9959
2438bd7ca7 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 14:09:08 -07:00
stephb9959
18d18f68c5 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 13:58:11 -07:00
stephb9959
120f94a95a https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 13:51:16 -07:00
stephb9959
7b9cda8c3d https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 13:42:59 -07:00
stephb9959
0d116119ed https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 09:27:28 -07:00
stephb9959
b9a7f53a92 https://telecominfraproject.atlassian.net/browse/WIFI-9959
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-27 08:23:33 -07:00
Johann Hoffmann
ee3aa66b11 Always re-generate config file if TEMPLATE_CONFIG is set to true
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-06-24 18:58:17 +02:00
Johann Hoffmann
459029d5d7 Always re-generate config file if TEMPLATE_CONFIG is set to true
Signed-off-by: Johann Hoffmann <johann.hoffmann@mailbox.org>
2022-06-24 18:17:05 +02:00
stephb9959
bfe0ff4481 https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-24 08:00:47 -07:00
stephb9959
b70a95d12b https://telecominfraproject.atlassian.net/browse/WIFI-9620
Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-24 07:51:23 -07:00
Stephane Bourque
8280ff46db Update PROTOCOL.md
Fixing protocol properties file entries.

Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-24 07:46:06 -07:00
Stephane Bourque
59da808bcd Update PROTOCOL.md
Fixed some formatting.

Signed-off-by: stephb9959 <stephane.bourque@gmail.com>
2022-06-24 07:36:19 -07:00
49 changed files with 3042 additions and 1197 deletions

View File

@@ -67,6 +67,8 @@ add_compile_options(-Wall -Wextra)
if(ASAN)
add_compile_options(-fsanitize=address)
add_link_options(-fsanitize=address)
add_compile_options(-fsanitize=undefined)
add_link_options(-fsanitize=undefined)
endif()
add_executable( owgw
@@ -116,7 +118,7 @@ add_executable( owgw
src/TelemetryStream.cpp src/TelemetryStream.h
src/framework/ConfigurationValidator.cpp src/framework/ConfigurationValidator.h
src/ConfigurationCache.h
src/CapabilitiesCache.h src/FindCountry.h src/rttys/RTTYS_server.cpp src/rttys/RTTYS_server.h src/rttys/RTTYS_device.cpp src/rttys/RTTYS_device.h src/rttys/RTTYS_ClientConnection.cpp src/rttys/RTTYS_ClientConnection.h src/rttys/RTTYS_WebServer.cpp src/rttys/RTTYS_WebServer.h src/RESTAPI/RESTAPI_device_helper.h src/SDKcalls.cpp src/SDKcalls.h src/StateUtils.cpp src/StateUtils.h src/WS_ReactorPool.h src/WS_Connection.h src/WS_Connection.cpp src/TelemetryClient.h src/TelemetryClient.cpp src/RESTAPI/RESTAPI_iptocountry_handler.cpp src/RESTAPI/RESTAPI_iptocountry_handler.h src/framework/ow_constants.h src/GwWebSocketClient.cpp src/GwWebSocketClient.h src/framework/WebSocketClientNotifications.h src/RADIUS_proxy_server.cpp src/RADIUS_proxy_server.h src/RESTAPI/RESTAPI_radiusProxyConfig_handler.cpp src/RESTAPI/RESTAPI_radiusProxyConfig_handler.h src/ParseWifiScan.h src/RADIUS_helpers.h)
src/CapabilitiesCache.h src/FindCountry.h src/rttys/RTTYS_server.cpp src/rttys/RTTYS_server.h src/rttys/RTTYS_device.cpp src/rttys/RTTYS_device.h src/rttys/RTTYS_ClientConnection.cpp src/rttys/RTTYS_ClientConnection.h src/rttys/RTTYS_WebServer.cpp src/rttys/RTTYS_WebServer.h src/RESTAPI/RESTAPI_device_helper.h src/SDKcalls.cpp src/SDKcalls.h src/StateUtils.cpp src/StateUtils.h src/WS_ReactorPool.h src/WS_Connection.h src/WS_Connection.cpp src/TelemetryClient.h src/TelemetryClient.cpp src/RESTAPI/RESTAPI_iptocountry_handler.cpp src/RESTAPI/RESTAPI_iptocountry_handler.h src/framework/ow_constants.h src/GwWebSocketClient.cpp src/GwWebSocketClient.h src/framework/WebSocketClientNotifications.h src/RADIUS_proxy_server.cpp src/RADIUS_proxy_server.h src/RESTAPI/RESTAPI_radiusProxyConfig_handler.cpp src/RESTAPI/RESTAPI_radiusProxyConfig_handler.h src/ParseWifiScan.h src/RADIUS_helpers.h src/VenueBroadcaster.h src/sdks/sdk_prov.h)
if(NOT SMALL_BUILD)

View File

@@ -182,6 +182,22 @@ The device should answer:
},
"id" : <same number>
}
```
#### Device requests a venue broadcast message
Device send this message when it wants to reach out to all other APs in the same venue. The GW will find the
venue where this device belongs and resend the same message to all other devices in the venue.
```json
{ "jsonrpc" : "2.0" ,
"method" : "venue_broadcast" ,
"params" : {
"serial" : <serial number> ,
"timestamp" : <the UTC timestamp when the message was sent>,
"data" : <an opaque string from the AP. This could be Zipped and so on and most likely base64 encoded>
}
}
```
Upon receiving a `venue_broadcast` message, the GW will simply resent the message to all the APs in the venue.
### Controller commands
Most controller commands include a `when` member. This is a UTC clock time asking the AP
@@ -766,11 +782,10 @@ identify the destination for its messages.
The GW must be configured with the following:
```asm
radius.incoming.proxy.enable = true
radius.incoming.proxy.accounting.port = 1813
radius.incoming.proxy.auth.port = 1812
radius.incoming.proxy.das.port = 1814
radius.incoming.serialnumbertlv = 127
radius.proxy.enable = true
radius.proxy.accounting.port = 1813
radius.proxy.authentication.port = 1812
radius.proxy.coa.port = 3799
```

2
build
View File

@@ -1 +1 @@
75
151

File diff suppressed because it is too large Load Diff

View File

@@ -5,7 +5,7 @@ if [ "$SELFSIGNED_CERTS" = 'true' ]; then
update-ca-certificates
fi
if [[ "$TEMPLATE_CONFIG" = 'true' && ! -f "$OWGW_CONFIG"/owgw.properties ]]; then
if [[ "$TEMPLATE_CONFIG" = 'true' ]]; then
WEBSOCKET_HOST_ROOTCA=${WEBSOCKET_HOST_ROOTCA:-"\$OWGW_ROOT/certs/root.pem"} \
WEBSOCKET_HOST_ISSUER=${WEBSOCKET_HOST_ISSUER:-"\$OWGW_ROOT/certs/issuer.pem"} \
WEBSOCKET_HOST_CERT=${WEBSOCKET_HOST_CERT:-"\$OWGW_ROOT/certs/websocket-cert.pem"} \
@@ -39,6 +39,10 @@ if [[ "$TEMPLATE_CONFIG" = 'true' && ! -f "$OWGW_CONFIG"/owgw.properties ]]; the
SYSTEM_URI_PUBLIC=${SYSTEM_URI_PUBLIC:-"https://localhost:16002"} \
SYSTEM_URI_UI=${SYSTEM_URI_UI:-"http://localhost"} \
SIMULATORID=${SIMULATORID:-""} \
IPTOCOUNTRY_PROVIDER=${IPTOCOUNTRY_PROVIDER:-"ipinfo"} \
IPTOCOUNTRY_IPINFO_TOKEN=${IPTOCOUNTRY_IPINFO_TOKEN:-""} \
IPTOCOUNTRY_IPDATA_APIKEY=${IPTOCOUNTRY_IPDATA_APIKEY:-""} \
AUTOPROVISIONING_PROCESS=${AUTOPROVISIONING_PROCESS:-"prov,default"} \
RTTY_INTERNAL=${RTTY_INTERNAL:-"true"} \
RTTY_ENABLED=${RTTY_ENABLED:-"true"} \
RTTY_SERVER=${RTTY_SERVER:-"localhost"} \

View File

@@ -9,7 +9,7 @@ fullnameOverride: ""
images:
owgw:
repository: tip-tip-wlan-cloud-ucentral.jfrog.io/owgw
tag: v2.6.0-RC3
tag: v2.6.2
pullPolicy: Always
# regcred:
# registry: tip-tip-wlan-cloud-ucentral.jfrog.io
@@ -215,7 +215,7 @@ configProperties:
openwifi.devicetypes.0: AP:linksys_ea8300,edgecore_eap101,linksys_e8450-ubi
openwifi.devicetypes.1: SWITCH:edgecore_ecs4100-12ph
openwifi.devicetypes.2: IOT:esp32
oui.download.uri: https://linuxnet.ca/ieee/oui.txt
oui.download.uri: https://standards-oui.ieee.org/oui/oui.txt
firmware.autoupdate.policy.default: auto
iptocountry.provider: ipinfo
# Callback

View File

@@ -31,58 +31,13 @@ components:
responses:
NotFound:
description: The specified resource was not found.
content:
application/json:
schema:
properties:
ErrorCode:
type: integer
ErrorDetails:
type: string
ErrorDescription:
type: string
$ref: 'https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/blob/main/openpapi/owsec.yaml#/components/responses/NotFound'
Unauthorized:
description: The requested does not have sufficient rights to perform the operation.
content:
application/json:
schema:
properties:
ErrorCode:
type: integer
enum:
- 0 # Success
- 1 # PASSWORD_CHANGE_REQUIRED,
- 2 # INVALID_CREDENTIALS,
- 3 # PASSWORD_ALREADY_USED,
- 4 # USERNAME_PENDING_VERIFICATION,
- 5 # PASSWORD_INVALID,
- 6 # INTERNAL_ERROR,
- 7 # ACCESS_DENIED,
- 8 # INVALID_TOKEN
- 9 # EXPIRED_TOKEN
- 10 # RATE_LIMIT_EXCEEDED
- 11 # BAD_MFA_TRANSACTION
- 12 # MFA_FAILURE
- 13 # SECURITY_SERVICE_UNREACHABLE
ErrorDetails:
type: string
ErrorDescription:
type: string
$ref: 'https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/blob/main/openpapi/owsec.yaml#/components/responses/Unauthorized'
Success:
description: The requested operation was performed.
content:
application/json:
schema:
properties:
Operation:
type: string
Details:
type: string
Code:
type: integer
$ref: 'https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/blob/main/openpapi/owsec.yaml#/components/responses/Success'
BadRequest:
$ref: 'https://github.com/Telecominfraproject/wlan-cloud-ucentralsec/blob/main/openpapi/owsec.yaml#/components/responses/BadRequest'
schemas:
DeviceType:

View File

@@ -96,6 +96,12 @@ rtty.timeout = 60
rtty.viewport = 5913
rtty.assets = $OWGW_ROOT/rtty_ui
### RADIUS proxy config
radius.proxy.enable = false
radius.proxy.accounting.port = 1813
radius.proxy.authentication.port = 1812
radius.proxy.coa.port = 3799
#############################
# Generic information for all micro services
#############################

View File

@@ -52,8 +52,8 @@ openwifi.fileuploader.host.0.cert = ${FILEUPLOADER_HOST_CERT}
openwifi.fileuploader.host.0.key = ${FILEUPLOADER_HOST_KEY}
openwifi.fileuploader.host.0.key.password = ${FILEUPLOADER_HOST_KEY_PASSWORD}
openwifi.fileuploader.path = ${FILEUPLOADER_PATH}
openwifi.fileuploader.uri = ${FILEUPLOADER_URI}
openwifi.fileuploader.maxsize = 10000
openwifi.fileuploader.uri = ${FILEUPLOADER_URI}
#
# Generic section that all microservices must have
@@ -75,8 +75,13 @@ openwifi.devicetypes.0 = AP:linksys_ea8300,edgecore_eap101,linksys_e8450-ubi
openwifi.devicetypes.1 = SWITCH:edgecore_ecs4100-12ph
openwifi.devicetypes.2 = IOT:esp32
oui.download.uri = https://standards-oui.ieee.org/oui/oui.txt
firmware.autoupdate.policy.default = auto
simulatorid = ${SIMULATORID}
iptocountry.default = US
iptocountry.provider = ${IPTOCOUNTRY_PROVIDER}
iptocountry.ipinfo.token = ${IPTOCOUNTRY_IPINFO_TOKEN}
iptocountry.ipdata.apikey = ${IPTOCOUNTRY_IPDATA_APIKEY}
autoprovisioning.process = ${AUTOPROVISIONING_PROCESS}
#
# rtty
@@ -108,6 +113,7 @@ openwifi.kafka.enable = ${KAFKA_ENABLE}
openwifi.kafka.brokerlist = ${KAFKA_BROKERLIST}
openwifi.kafka.auto.commit = false
openwifi.kafka.queue.buffering.max.ms = 50
openwifi.kafka.ssl.ca.location = ${KAFKA_SSL_CA_LOCATION}
openwifi.kafka.ssl.certificate.location = ${KAFKA_SSL_CERTIFICATE_LOCATION}
openwifi.kafka.ssl.key.location = ${KAFKA_SSL_KEY_LOCATION}

View File

@@ -19,6 +19,7 @@
namespace OpenWifi {
void CommandManager::run() {
Utils::SetThreadName("cmd-mgr");
Running_ = true;
Poco::AutoPtr<Poco::Notification> NextMsg(ResponseQueue_.waitDequeueNotification());
while(NextMsg && Running_) {
@@ -31,42 +32,32 @@ namespace OpenWifi {
std::ostringstream SS;
Payload.stringify(SS);
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
// std::cout << "Got RPC Answer: " << SerialNumber << " Payload:" << SS.str() << std::endl;
Logger().debug(fmt::format("({}): RPC Response received.", SerialNumber));
if(!Payload.has(uCentralProtocol::ID)){
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
Logger().error(fmt::format("({}): Invalid RPC response.", SerialNumber));
} else {
uint64_t ID = Payload.get(uCentralProtocol::ID);
if (ID < 2) {
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
Logger().debug(fmt::format("({}): Ignoring RPC response.", SerialNumber));
} else {
auto Idx = CommandTagIndex{.Id = ID, .SerialNumber = SerialNumber};
std::lock_guard G(Mutex_);
auto RPC = OutStandingRequests_.find(Idx);
if (RPC == OutStandingRequests_.end()) {
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
Logger().warning(
fmt::format("({}): Outdated RPC {}", SerialNumber, ID));
} else {
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
std::chrono::duration<double, std::milli> rpc_execution_time =
std::chrono::high_resolution_clock::now() - RPC->second->submitted;
StorageService()->CommandCompleted(RPC->second->uuid, Payload,
rpc_execution_time, true);
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
if (RPC->second->rpc_entry) {
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
RPC->second->rpc_entry->set_value(Payload);
}
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
OutstandingUUIDs_.erase(RPC->second->uuid);
OutStandingRequests_.erase(Idx);
Logger().information(
fmt::format("({}): Received RPC answer {}", SerialNumber, ID));
// std::cout << SerialNumber << ": " << __LINE__ << std::endl;
}
}
}
@@ -77,8 +68,6 @@ namespace OpenWifi {
int CommandManager::Start() {
Logger().notice("Starting...");
ManagerThread.setStackSize(2000000);
ManagerThread.setName("CMD-MGR");
ManagerThread.start(*this);
JanitorCallback_ = std::make_unique<Poco::TimerCallback<CommandManager>>(*this,&CommandManager::onJanitorTimer);
JanitorTimer_.setStartInterval( 10000 );
@@ -90,15 +79,11 @@ namespace OpenWifi {
CommandRunnerTimer_.setPeriodicInterval(30 * 1000); // 1 hours
CommandRunnerTimer_.start(*CommandRunnerCallback_);
// RPCResponseQueue_->Readable_ += Poco::delegate(this,&CommandManager::onRPCAnswer);
// RPCResponseQueue_->Writable_ += Poco::delegate(this,&CommandManager::onRPCAnswer);
return 0;
}
void CommandManager::Stop() {
Logger().notice("Stopping...");
// RPCResponseQueue_->Readable_ -= Poco::delegate(this,&CommandManager::onRPCAnswer);
// RPCResponseQueue_->Writable_ -= Poco::delegate(this,&CommandManager::onRPCAnswer);
Running_ = false;
JanitorTimer_.stop();
CommandRunnerTimer_.stop();
@@ -114,24 +99,29 @@ namespace OpenWifi {
void CommandManager::onJanitorTimer([[maybe_unused]] Poco::Timer & timer) {
std::lock_guard G(Mutex_);
Logger().information(
Utils::SetThreadName("cmd-janitor");
Poco::Logger & MyLogger = Poco::Logger::get("CMD-MGR-JANITOR");
MyLogger.information(
fmt::format("Removing expired commands: start. {} outstanding-requests {} outstanding-uuids commands.",
OutStandingRequests_.size(), OutstandingUUIDs_.size() ));
auto now = std::chrono::high_resolution_clock::now();
for(auto i=OutStandingRequests_.begin();i!=OutStandingRequests_.end();) {
std::chrono::duration<double, std::milli> delta = now - i->second->submitted;
if(delta > 6000000ms) {
Logger().debug(fmt::format("{}: Timed out.", i->second->uuid));
MyLogger.debug(fmt::format("{}: Timed out.", i->second->uuid));
OutstandingUUIDs_.erase(i->second->uuid);
i = OutStandingRequests_.erase(i);
} else {
++i;
}
}
Logger().information("Removing expired commands: done.");
MyLogger.information("Removing expired commands: done.");
}
void CommandManager::onCommandRunnerTimer([[maybe_unused]] Poco::Timer &timer) {
Utils::SetThreadName("cmd-schdlr");
Poco::Logger & MyLogger = Poco::Logger::get("CMD-MGR-SCHEDULER");
std::vector<GWObjects::CommandDetails> Commands;
if(StorageService()->GetReadyToExecuteCommands(0,200,Commands))
{
@@ -148,7 +138,7 @@ namespace OpenWifi {
Poco::JSON::Parser P;
bool Sent;
Logger().information(fmt::format("{}-{}: Processing.", Cmd.SerialNumber, Cmd.UUID));
MyLogger.information(fmt::format("{}: Preparing execution of {} for {}.", Cmd.UUID, Cmd.Command, Cmd.SerialNumber));
auto Params = P.parse(Cmd.Details).extract<Poco::JSON::Object::Ptr>();
auto Result = PostCommandDisk( Cmd.SerialNumber,
Cmd.Command,
@@ -157,17 +147,18 @@ namespace OpenWifi {
Sent);
if(Sent) {
StorageService()->SetCommandExecuted(Cmd.UUID);
std::lock_guard M(Mutex_);
OutstandingUUIDs_.insert(Cmd.UUID);
Logger().information(fmt::format("{}-{}: Sent command {}.", Cmd.SerialNumber, Cmd.UUID, Cmd.Command));
MyLogger.information(fmt::format("{}: Queued command.", Cmd.UUID));
} else {
Logger().information(fmt::format("{}-{}: Could not Send command {}.", Cmd.SerialNumber, Cmd.UUID, Cmd.Command));
MyLogger.information(fmt::format("{}: Could queue command.", Cmd.UUID));
}
} catch (const Poco::Exception &E) {
Logger().information(fmt::format("{}-{}: Failed command {}.", Cmd.SerialNumber, Cmd.UUID, Cmd.Command));
Logger().log(E);
MyLogger.information(fmt::format("{}: Failed. Command marked as completed.", Cmd.UUID));
MyLogger.log(E);
StorageService()->SetCommandExecuted(Cmd.UUID);
} catch (...) {
Logger().information(fmt::format("{}-{}: Hard failed command {}.", Cmd.SerialNumber, Cmd.UUID, Cmd.Command));
MyLogger.information(fmt::format("{}: Hard failure.", Cmd.UUID));
StorageService()->SetCommandExecuted(Cmd.UUID);
}
}
@@ -205,9 +196,6 @@ namespace OpenWifi {
CompleteRPC.set(uCentralProtocol::METHOD, Method);
CompleteRPC.set(uCentralProtocol::PARAMS, Params);
Poco::JSON::Stringifier::stringify(CompleteRPC, ToSend);
Logger().information(
fmt::format("{}-{}: Sending command {}, ID: {}", SerialNumber, UUID, Method, Idx.Id));
Object->submitted = std::chrono::high_resolution_clock::now();
Object->uuid = UUID;
if(disk_only) {
@@ -221,10 +209,13 @@ namespace OpenWifi {
}
}
Logger().information(fmt::format("{}: Sending command. ID: {}", UUID, Idx.Id));
if(DeviceRegistry()->SendFrame(SerialNumber, ToSend.str())) {
Logger().information(fmt::format("{}: Sent command. ID: {}", UUID, Idx.Id));
Sent=true;
return Object->rpc_entry;
}
Logger().information(fmt::format("{}: Failed to send command. ID: {}", UUID, Idx.Id));
return nullptr;
}
} // namespace

View File

@@ -154,16 +154,15 @@ namespace OpenWifi {
void onRPCAnswer(bool& b);
private:
std::atomic_bool Running_ = false;
volatile bool Running_ = false;
Poco::Thread ManagerThread;
uint64_t Id_=3; // do not start @1. We ignore ID=1 & 0 is illegal..
volatile uint64_t Id_=3; // do not start @1. We ignore ID=1 & 0 is illegal..
std::map<CommandTagIndex,std::shared_ptr<RpcObject>> OutStandingRequests_;
std::set<std::string> OutstandingUUIDs_;
Poco::Timer JanitorTimer_;
std::unique_ptr<Poco::TimerCallback<CommandManager>> JanitorCallback_;
Poco::Timer CommandRunnerTimer_;
std::unique_ptr<Poco::TimerCallback<CommandManager>> CommandRunnerCallback_;
// std::unique_ptr<FIFO<RPCResponse>> RPCResponseQueue_=std::make_unique<FIFO<RPCResponse>>(100);
Poco::NotificationQueue ResponseQueue_;
std::shared_ptr<promise_type_t> PostCommand(

View File

@@ -25,6 +25,7 @@
#include "FindCountry.h"
#include "rttys/RTTYS_server.h"
#include "RADIUS_proxy_server.h"
#include "VenueBroadcaster.h"
namespace OpenWifi {
class Daemon *Daemon::instance() {
@@ -47,7 +48,8 @@ namespace OpenWifi {
TelemetryStream(),
RTTYS_server(),
WebSocketServer(),
RADIUS_proxy_server()
RADIUS_proxy_server(),
VenueBroadcaster()
});
return &instance;
}

View File

@@ -194,6 +194,7 @@ namespace OpenWifi {
void handleRequest(Poco::Net::HTTPServerRequest& Request, Poco::Net::HTTPServerResponse& Response) final {
Utils::SetThreadName("FileUploader");
const auto ContentType = Request.getContentType();
const auto Tokens = Poco::StringTokenizer(ContentType,";",Poco::StringTokenizer::TOK_TRIM);

View File

@@ -98,6 +98,7 @@ namespace OpenWifi {
}
void OUIServer::onTimer([[maybe_unused]] Poco::Timer & timer) {
Utils::SetThreadName("ouisvr-timer");
if(Updating_)
return;
Updating_ = true;

View File

@@ -33,8 +33,8 @@ namespace OpenWifi {
uint64_t LastUpdate_ = 0 ;
bool Initialized_ = false;
OUIMap OUIs_;
std::atomic_bool Updating_=false;
std::atomic_bool Running_=false;
volatile std::atomic_bool Updating_=false;
volatile std::atomic_bool Running_=false;
Poco::Timer Timer_;
std::unique_ptr<Poco::TimerCallback<OUIServer>> UpdaterCallBack_;
std::string LatestOUIFileName_,CurrentOUIFileName_;

View File

@@ -1710,13 +1710,16 @@ namespace OpenWifi {
auto sub_ie = data[offset++];
switch (sub_ie) {
case WLAN_EID_EXT_HE_CAPABILITY: {
content["Extension EID"] = BufferToHex(&data[0],1);
content["Block"] = BufferToHex(&data[1],data.size()-1);
} break;
case WLAN_EID_EXT_HE_OPERATION: {
content["Extension EID"] = BufferToHex(&data[0],1);
content["Block"] = BufferToHex(&data[1],data.size()-1);
} break;
case WLAN_EID_EXT_HE_MU_EDCA: {
content["Extension EID"] = BufferToHex(&data[0],1);
content["Block"] = BufferToHex(&data[1],data.size()-1);
} break;
default:
content["Extension EID"] = BufferToHex(&data[0],1);
@@ -1738,7 +1741,6 @@ namespace OpenWifi {
std::cout << "Start of parsing wifi" << std::endl;
if (D.contains("status")) {
auto Status = D["status"];
if (Status.contains("scan") && Status["scan"].is_array()) {
nlohmann::json ScanArray = Status["scan"];
nlohmann::json ParsedScan = nlohmann::json::array();

View File

@@ -162,11 +162,36 @@ namespace OpenWifi::RADIUS {
std::string ExtractProxyStateDestination() {
std::string Result;
for(const auto &attribute:Attrs_) {
if(attribute.type==33) {
if(attribute.type==33 && attribute.len>2) {
std::string Attr33;
Attr33.assign((const char *)(const char *)&P_.attributes[attribute.pos],attribute.len);
// format is serial:IP:port:interface
Attr33.assign((const char *)(const char *)&P_.attributes[attribute.pos],attribute.len-2);
auto Parts = Poco::StringTokenizer(Attr33,":");
return Parts[1]+":"+Parts[2];
if(Parts.count()==4)
return Parts[1]+":"+Parts[2];
return Result;
}
}
return Result;
}
std::string ExtractCallingStationID() {
std::string Result;
for(const auto &attribute:Attrs_) {
if(attribute.type==31 && attribute.len>2) {
Result.assign((const char *)(const char *)&P_.attributes[attribute.pos],attribute.len-2);
return Result;
}
}
return Result;
}
std::string ExtractCalledStationID() {
std::string Result;
for(const auto &attribute:Attrs_) {
if(attribute.type==30 && attribute.len>2) {
Result.assign((const char *)(const char *)&P_.attributes[attribute.pos],attribute.len-2);
return Result;
}
}
return Result;

View File

@@ -15,8 +15,14 @@ namespace OpenWifi {
int RADIUS_proxy_server::Start() {
enabled_ = MicroService::instance().ConfigGetBool("radius.proxy.enable",false);
if(!enabled_)
return 0;
ConfigFilename_ = MicroService::instance().DataDir()+"/radius_pool_config.json";
Poco::Net::SocketAddress AuthSockAddrV4(Poco::Net::AddressFamily::IPv4,
MicroService::instance().ConfigGetInt("radius.proxy.authentication.port",DEFAULT_RADIUS_AUTHENTICATION_PORT));
AuthenticationSocketV4_ = std::make_unique<Poco::Net::DatagramSocket>(AuthSockAddrV4,true);
@@ -54,44 +60,65 @@ namespace OpenWifi {
CoAReactor_.addEventHandler(*CoASocketV6_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnCoASocketReadable));
ParseConfig();
AuthenticationReactorThread_.start(AuthenticationReactor_);
AccountingReactorThread_.start(AccountingReactor_);
CoAReactorThread_.start(CoAReactor_);
Utils::SetThreadName(AuthenticationReactorThread_,"radproxy-auth");
Utils::SetThreadName(AccountingReactorThread_,"radproxy-acct");
Utils::SetThreadName(CoAReactorThread_,"radproxy-coa");
return 0;
}
void RADIUS_proxy_server::Stop() {
AuthenticationReactor_.removeEventHandler(*AuthenticationSocketV4_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAuthenticationSocketReadable));
AuthenticationReactor_.removeEventHandler(*AuthenticationSocketV6_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAuthenticationSocketReadable));
if(enabled_) {
AuthenticationReactor_.removeEventHandler(
*AuthenticationSocketV4_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAuthenticationSocketReadable));
AuthenticationReactor_.removeEventHandler(
*AuthenticationSocketV6_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAuthenticationSocketReadable));
AccountingReactor_.removeEventHandler(*AccountingSocketV4_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
AccountingReactor_.removeEventHandler(*AccountingSocketV6_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
AccountingReactor_.removeEventHandler(
*AccountingSocketV4_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
AccountingReactor_.removeEventHandler(
*AccountingSocketV6_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
CoAReactor_.removeEventHandler(*CoASocketV4_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
CoAReactor_.removeEventHandler(*CoASocketV6_,Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
CoAReactor_.removeEventHandler(
*CoASocketV4_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
CoAReactor_.removeEventHandler(
*CoASocketV6_,
Poco::NObserver<RADIUS_proxy_server, Poco::Net::ReadableNotification>(
*this, &RADIUS_proxy_server::OnAccountingSocketReadable));
AuthenticationReactor_.stop();
AuthenticationReactorThread_.join();
AuthenticationReactor_.stop();
AuthenticationReactorThread_.join();
AccountingReactor_.stop();
AccountingReactorThread_.join();
AccountingReactor_.stop();
AccountingReactorThread_.join();
CoAReactor_.stop();
CoAReactorThread_.join();
CoAReactor_.stop();
CoAReactorThread_.join();
enabled_=false;
}
}
void RADIUS_proxy_server::OnAccountingSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf) {
Poco::Net::SocketAddress Sender;
RADIUS::RadiusPacket P;
// std::cout << "Accounting bytes received" << std::endl;
auto ReceiveSize = pNf.get()->socket().impl()->receiveBytes(P.Buffer(),P.BufferLen());
auto ReceiveSize = pNf->socket().impl()->receiveBytes(P.Buffer(),P.BufferLen());
if(ReceiveSize<SMALLEST_RADIUS_PACKET) {
Logger().warning("Accounting: bad packet received.");
return;
@@ -102,9 +129,10 @@ namespace OpenWifi {
Logger().warning("Accounting: missing serial number.");
return;
}
auto CallingStationID = P.ExtractCallingStationID();
auto CalledStationID = P.ExtractCalledStationID();
Logger().information(fmt::format("Accounting Packet received for {}",SerialNumber));
// std::cout << "Received an Accounting packet for :" << SerialNumber << std::endl;
Logger().information(fmt::format("Accounting Packet received for {}, CalledStationID: {}, CallingStationID:{}",SerialNumber, CalledStationID, CallingStationID));
DeviceRegistry()->SendRadiusAccountingData(SerialNumber,P.Buffer(),P.Size());
}
@@ -112,9 +140,7 @@ namespace OpenWifi {
Poco::Net::SocketAddress Sender;
RADIUS::RadiusPacket P;
// std::cout << "Authentication bytes received" << std::endl;
auto ReceiveSize = pNf.get()->socket().impl()->receiveBytes(P.Buffer(),P.BufferLen());
auto ReceiveSize = pNf->socket().impl()->receiveBytes(P.Buffer(),P.BufferLen());
if(ReceiveSize<SMALLEST_RADIUS_PACKET) {
Logger().warning("Authentication: bad packet received.");
return;
@@ -125,8 +151,10 @@ namespace OpenWifi {
Logger().warning("Authentication: missing serial number.");
return;
}
Logger().information(fmt::format("Authentication Packet received for {}",SerialNumber));
std::cout << "Received an Authentication packet for :" << SerialNumber << std::endl;
auto CallingStationID = P.ExtractCallingStationID();
auto CalledStationID = P.ExtractCalledStationID();
Logger().information(fmt::format("Authentication Packet received for {}, CalledStationID: {}, CallingStationID:{}",SerialNumber, CalledStationID, CallingStationID));
DeviceRegistry()->SendRadiusAuthenticationData(SerialNumber,P.Buffer(),P.Size());
}
@@ -134,7 +162,6 @@ namespace OpenWifi {
Poco::Net::SocketAddress Sender;
RADIUS::RadiusPacket P;
// std::cout << "CoA bytes received" << std::endl;
auto ReceiveSize = pNf.get()->socket().impl()->receiveBytes(P.Buffer(),P.BufferLen());
if(ReceiveSize<SMALLEST_RADIUS_PACKET) {
Logger().warning("CoA/DM: bad packet received.");
@@ -146,51 +173,67 @@ namespace OpenWifi {
Logger().warning("CoA/DM: missing serial number.");
return;
}
Logger().information(fmt::format("CoA Packet received for {}",SerialNumber));
// std::cout << "Received an CoA packet for :" << SerialNumber << std::endl;
auto CallingStationID = P.ExtractCallingStationID();
auto CalledStationID = P.ExtractCalledStationID();
Logger().information(fmt::format("CoA Packet received for {}, CalledStationID: {}, CallingStationID:{}",SerialNumber, CalledStationID, CallingStationID));
DeviceRegistry()->SendRadiusCoAData(SerialNumber,P.Buffer(),P.Size());
}
void RADIUS_proxy_server::SendAccountingData(const std::string &serialNumber, const char *buffer, std::size_t size) {
RADIUS::RadiusPacket P((unsigned char *)buffer,size);
auto Destination = P.ExtractProxyStateDestination();
auto CallingStationID = P.ExtractCallingStationID();
auto CalledStationID = P.ExtractCalledStationID();
Poco::Net::SocketAddress Dst(Destination);
std::lock_guard G(Mutex_);
if(Dst.af()==Poco::Net::AddressFamily::IPv4)
AccountingSocketV4_->sendTo(buffer,(int)size,Route(radius_type::acct, Dst));
auto FinalDestination = Route(radius_type::auth, Dst);
auto AllSent = SendData(Dst.family()==Poco::Net::SocketAddress::IPv4 ? *AccountingSocketV4_ : *AccountingSocketV6_, (const unsigned char *)buffer, size, FinalDestination);
if(!AllSent)
Logger().error(fmt::format("{}: Could not send Accounting packet packet to {}.", serialNumber, Destination));
else
AccountingSocketV6_->sendTo(buffer,(int)size,Route(radius_type::acct, Dst));
Logger().information(fmt::format("{}: Sending Accounting Packet to {}", serialNumber, Destination));
// std::cout << "Sending Accounting data to " << Destination << std::endl;
Logger().information(fmt::format("{}: Sending Accounting Packet to {}, CalledStationID: {}, CallingStationID:{}", serialNumber, FinalDestination.toString(), CalledStationID, CallingStationID));
}
bool RADIUS_proxy_server::SendData( Poco::Net::DatagramSocket & Sock, const unsigned char *buf , std::size_t size, const Poco::Net::SocketAddress &S) {
return Sock.sendTo(buf, size, S)==(int)size;
}
void RADIUS_proxy_server::SendAuthenticationData(const std::string &serialNumber, const char *buffer, std::size_t size) {
RADIUS::RadiusPacket P((unsigned char *)buffer,size);
auto Destination = P.ExtractProxyStateDestination();
auto CallingStationID = P.ExtractCallingStationID();
auto CalledStationID = P.ExtractCalledStationID();
Poco::Net::SocketAddress Dst(Destination);
std::lock_guard G(Mutex_);
if(Dst.af()==Poco::Net::AddressFamily::IPv4)
AuthenticationSocketV4_->sendTo(buffer,(int)size,Route(radius_type::auth, Dst));
auto FinalDestination = Route(radius_type::auth, Dst);
auto AllSent = SendData(Dst.family()==Poco::Net::SocketAddress::IPv4 ? *AuthenticationSocketV4_ : *AuthenticationSocketV6_, (const unsigned char *)buffer, size, FinalDestination);
if(!AllSent)
Logger().error(fmt::format("{}: Could not send Authentication packet packet to {}.", serialNumber, Destination));
else
AuthenticationSocketV6_->sendTo(buffer,(int)size,Route(radius_type::auth, Dst));
Logger().information(fmt::format("{}: Sending Authentication Packet to {}", serialNumber, Destination));
// std::cout << "Sending Authentication data to " << Destination << std::endl;
Logger().information(fmt::format("{}: Sending Authentication Packet to {}, CalledStationID: {}, CallingStationID:{}", serialNumber, FinalDestination.toString(), CalledStationID, CallingStationID));
}
void RADIUS_proxy_server::SendCoAData(const std::string &serialNumber, const char *buffer, std::size_t size) {
RADIUS::RadiusPacket P((unsigned char *)buffer,size);
auto Destination = P.ExtractProxyStateDestination();
Poco::Net::SocketAddress Dst(Destination);
// auto CallingStationID = P.ExtractCallingStationID();
// auto CalledStationID = P.ExtractCalledStationID();
if(Destination.empty()) {
Destination = "0.0.0.0:0";
}
Poco::Net::SocketAddress Dst(Destination);
std::lock_guard G(Mutex_);
if(Dst.af()==Poco::Net::AddressFamily::IPv4)
CoASocketV4_->sendTo(buffer,(int)size,Route(radius_type::coa, Dst));
auto FinalDestination = Route(radius_type::auth, Dst);
auto AllSent = SendData(Dst.family()==Poco::Net::SocketAddress::IPv4 ? *CoASocketV4_ : *CoASocketV6_, (const unsigned char *)buffer, size, FinalDestination);
if(!AllSent)
Logger().error(fmt::format("{}: Could not send CoA packet packet to {}.", serialNumber, Destination));
else
CoASocketV6_->sendTo(buffer,(int)size,Route(radius_type::coa, Dst));
Logger().information(fmt::format("{}: Sending CoA Packet to {}", serialNumber, Destination));
// std::cout << "Sending CoA data to " << Destination << std::endl;
Logger().information(fmt::format("{}: Sending CoA Packet to {}", serialNumber, FinalDestination.toString()));
}
void RADIUS_proxy_server::ParseServerList(const GWObjects::RadiusProxyServerConfig & Config, std::vector<Destination> &V4, std::vector<Destination> &V6, bool setAsDefault) {
@@ -216,7 +259,7 @@ namespace OpenWifi {
.useAsDefault = setAsDefault
};
if(S.af()==Poco::Net::AddressFamily::IPv4) {
if(S.family()==Poco::Net::IPAddress::IPv4) {
TotalV4 += server.weight;
V4.push_back(D);
} else {
@@ -278,25 +321,35 @@ namespace OpenWifi {
}
Poco::Net::SocketAddress RADIUS_proxy_server::DefaultRoute([[maybe_unused]] radius_type rtype, const Poco::Net::SocketAddress &RequestedAddress) {
bool IsV4 = RequestedAddress.af()==Poco::Net::IPAddress::IPv4;
bool IsV4 = RequestedAddress.family()==Poco::Net::SocketAddress::IPv4;
switch(rtype) {
case radius_type::coa:
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].CoaV4 : Pools_[defaultPoolIndex_].CoaV6, RequestedAddress);
case radius_type::auth:
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].AuthV4 : Pools_[defaultPoolIndex_].AuthV6, RequestedAddress);
case radius_type::coa: {
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].CoaV4
: Pools_[defaultPoolIndex_].CoaV6,
RequestedAddress);
}
case radius_type::auth: {
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].AuthV4
: Pools_[defaultPoolIndex_].AuthV6,
RequestedAddress);
}
case radius_type::acct:
default:
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].AcctV4 : Pools_[defaultPoolIndex_].AcctV6, RequestedAddress);
default: {
return ChooseAddress(IsV4 ? Pools_[defaultPoolIndex_].AcctV4
: Pools_[defaultPoolIndex_].AcctV6,
RequestedAddress);
}
}
}
Poco::Net::SocketAddress RADIUS_proxy_server::Route([[maybe_unused]] radius_type rtype, const Poco::Net::SocketAddress &RequestedAddress) {
std::lock_guard G(Mutex_);
if(Pools_.empty())
if(Pools_.empty()) {
return RequestedAddress;
}
bool IsV4 = RequestedAddress.af()==Poco::Net::IPAddress::IPv4;
bool IsV4 = RequestedAddress.family()==Poco::Net::SocketAddress::IPv4;
bool useDefault = false;
useDefault = IsV4 ? RequestedAddress.host() == Poco::Net::IPAddress::wildcard(Poco::Net::IPAddress::IPv4) : RequestedAddress.host() == Poco::Net::IPAddress::wildcard(Poco::Net::IPAddress::IPv6) ;
@@ -314,16 +367,19 @@ namespace OpenWifi {
for(auto &i:Pools_) {
switch(rtype) {
case radius_type::coa: {
if (isAddressInPool((IsV4 ? i.CoaV4 : i.CoaV6)))
if (isAddressInPool((IsV4 ? i.CoaV4 : i.CoaV6))) {
return ChooseAddress(IsV4 ? i.CoaV4 : i.CoaV6, RequestedAddress);
}
} break;
case radius_type::auth: {
if (isAddressInPool((IsV4 ? i.AuthV4 : i.AuthV6)))
if (isAddressInPool((IsV4 ? i.AuthV4 : i.AuthV6))) {
return ChooseAddress(IsV4 ? i.AuthV4 : i.AuthV6, RequestedAddress);
}
} break;
case radius_type::acct: {
if (isAddressInPool((IsV4 ? i.AcctV4 : i.AcctV6)))
if (isAddressInPool((IsV4 ? i.AcctV4 : i.AcctV6))) {
return ChooseAddress(IsV4 ? i.AcctV4 : i.AcctV6, RequestedAddress);
}
} break;
}
}

View File

@@ -24,6 +24,7 @@ namespace OpenWifi {
int Start() final;
void Stop() final;
inline bool Enabled() const { return enabled_; }
void OnAccountingSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf);
void OnAuthenticationSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf);
@@ -78,12 +79,15 @@ namespace OpenWifi {
std::vector<RadiusPool> Pools_;
uint defaultPoolIndex_=0;
bool enabled_=false;
RADIUS_proxy_server() noexcept:
SubSystemServer("RADIUS-PROXY", "RADIUS-PROXY", "radius.proxy")
{
}
static bool SendData( Poco::Net::DatagramSocket & Sock, const unsigned char *buf , std::size_t size, const Poco::Net::SocketAddress &S);
void ParseConfig();
void ResetConfig();
Poco::Net::SocketAddress Route(radius_type rtype, const Poco::Net::SocketAddress &A);

View File

@@ -40,10 +40,13 @@ namespace OpenWifi::RESTAPI_RPC {
RESTAPIHandler * Handler,
Poco::Logger &Logger) {
Logger.information(fmt::format("{}: New {} command. User={} Serial={}. ", Cmd.UUID, Cmd.Command, Cmd.SubmittedBy, Cmd.SerialNumber));
// if the command should be executed in the future, or if the device is not connected,
// then we should just add the command to
// the DB and let it figure out when to deliver the command.
if (Cmd.RunAt || !DeviceRegistry()->Connected(Cmd.SerialNumber)) {
Logger.information(fmt::format("{}: Command will be run in the future or when device is connected again.", Cmd.UUID));
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_PENDING, Logger);
return;
}
@@ -55,105 +58,88 @@ namespace OpenWifi::RESTAPI_RPC {
std::shared_ptr<CommandManager::promise_type_t> rpc_endpoint =
CommandManager()->PostCommand(Cmd.SerialNumber, Cmd.Command, Params, Cmd.UUID, Sent);
Logger.information(fmt::format("{}: user={} serial={}. Sent RPC request.", Cmd.Command, Cmd.SubmittedBy, Cmd.SerialNumber));
if(!Sent || rpc_endpoint== nullptr) {
Logger.information(fmt::format("{}: Pending completion. Device is not connected.", Cmd.UUID));
return SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_PENDING, Logger);
}
Logger.information(fmt::format("{}: Command sent.", Cmd.UUID));
Poco::JSON::Object L;
if (Sent && rpc_endpoint!= nullptr) {
std::future<CommandManager::objtype_t> rpc_future(rpc_endpoint->get_future());
auto rpc_result = rpc_future.wait_for(WaitTimeInMs);
if (rpc_result == std::future_status::ready) {
std::chrono::duration<double, std::milli> rpc_execution_time = std::chrono::high_resolution_clock::now() - rpc_submitted;
auto rpc_answer = rpc_future.get();
if (rpc_answer.has(uCentralProtocol::RESULT) && rpc_answer.isObject(uCentralProtocol::RESULT)) {
auto ResultFields =
rpc_answer.get(uCentralProtocol::RESULT).extract<Poco::JSON::Object::Ptr>();
if (ResultFields->has(uCentralProtocol::STATUS) && ResultFields->isObject(uCentralProtocol::STATUS)) {
auto StatusInnerObj =
ResultFields->get(uCentralProtocol::STATUS).extract<Poco::JSON::Object::Ptr>();
if (StatusInnerObj->has(uCentralProtocol::ERROR))
Cmd.ErrorCode = StatusInnerObj->get(uCentralProtocol::ERROR);
if (StatusInnerObj->has(uCentralProtocol::TEXT))
Cmd.ErrorText = StatusInnerObj->get(uCentralProtocol::TEXT).toString();
std::stringstream ResultText;
if(rpc_answer.has(uCentralProtocol::RESULT)) {
if(Cmd.Command==uCentralProtocol::WIFISCAN) {
auto ScanObj = rpc_answer.get(uCentralProtocol::RESULT).extract<Poco::JSON::Object::Ptr>();
ParseWifiScan(ScanObj, ResultText, Logger);
} else {
Poco::JSON::Stringifier::stringify(
rpc_answer.get(uCentralProtocol::RESULT), ResultText);
}
} if (rpc_answer.has(uCentralProtocol::RESULT_64)) {
uint64_t sz=0;
if(rpc_answer.has(uCentralProtocol::RESULT_SZ))
sz=rpc_answer.get(uCentralProtocol::RESULT_SZ);
std::string UnCompressedData;
Utils::ExtractBase64CompressedData(rpc_answer.get(uCentralProtocol::RESULT_64).toString(),
UnCompressedData,sz);
Poco::JSON::Stringifier::stringify(UnCompressedData, ResultText);
}
Cmd.Results = ResultText.str();
Cmd.Status = "completed";
Cmd.Completed = OpenWifi::Now();
Cmd.executionTime = rpc_execution_time.count();
if (Cmd.ErrorCode && Cmd.Command == uCentralProtocol::TRACE) {
Cmd.WaitingForFile = 0;
Cmd.AttachDate = Cmd.AttachSize = 0;
Cmd.AttachType = "";
}
// Add the completed command to the database...
StorageService()->AddCommand(Cmd.SerialNumber, Cmd, Storage::COMMAND_COMPLETED);
if (ObjectToReturn && Handler) {
Handler->ReturnObject(*ObjectToReturn);
} else {
Poco::JSON::Object O;
Cmd.to_json(O);
if(Handler)
Handler->ReturnObject(O);
}
Logger.information( fmt::format("Command({}): completed in {:.3f}ms.", Cmd.UUID, Cmd.executionTime));
return;
} else {
Cmd.executionTime = rpc_execution_time.count();
if(Cmd.Command=="ping") {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_COMPLETED, Logger);
Logger.information(fmt::format(
"Invalid response for command '{}'. Missing status.", Cmd.UUID));
} else {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_FAILED, Logger);
Logger.information(fmt::format(
"Invalid response for command '{}'. Missing status.", Cmd.UUID));
}
return;
}
} else {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_FAILED,
Logger);
Logger.information(fmt::format(
"Invalid response for command '{}'. Missing result.", Cmd.UUID));
return;
}
} else if (rpc_result == std::future_status::timeout) {
Logger.information(fmt::format(
"Timeout2 for command '{}'.", Cmd.UUID));
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_TIMEDOUT,
Logger);
return;
} else {
Logger.information(fmt::format(
"Pending completion for command '{}'.", Cmd.UUID));
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_PENDING, Logger);
std::future<CommandManager::objtype_t> rpc_future(rpc_endpoint->get_future());
auto rpc_result = rpc_future.wait_for(WaitTimeInMs);
if (rpc_result == std::future_status::ready) {
std::chrono::duration<double, std::milli> rpc_execution_time = std::chrono::high_resolution_clock::now() - rpc_submitted;
auto rpc_answer = rpc_future.get();
if (!rpc_answer.has(uCentralProtocol::RESULT) || !rpc_answer.isObject(uCentralProtocol::RESULT)) {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_FAILED, Logger);
Logger.information(fmt::format("{}: Invalid response. Missing result.", Cmd.UUID));
return;
}
} else {
Logger.information(fmt::format(
"Pending completion for command '{}'.", Cmd.UUID));
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_PENDING, Logger);
auto ResultFields = rpc_answer.get(uCentralProtocol::RESULT).extract<Poco::JSON::Object::Ptr>();
if (!ResultFields->has(uCentralProtocol::STATUS) || !ResultFields->isObject(uCentralProtocol::STATUS)) {
Cmd.executionTime = rpc_execution_time.count();
if(Cmd.Command=="ping") {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_COMPLETED, Logger);
Logger.information(fmt::format("{}: Invalid response from device (ping: fix override). Missing status.", Cmd.UUID));
} else {
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_FAILED, Logger);
Logger.information(fmt::format("{}: Invalid response from device. Missing status.", Cmd.UUID));
}
return;
}
auto StatusInnerObj = ResultFields->get(uCentralProtocol::STATUS).extract<Poco::JSON::Object::Ptr>();
if (StatusInnerObj->has(uCentralProtocol::ERROR))
Cmd.ErrorCode = StatusInnerObj->get(uCentralProtocol::ERROR);
if (StatusInnerObj->has(uCentralProtocol::TEXT))
Cmd.ErrorText = StatusInnerObj->get(uCentralProtocol::TEXT).toString();
std::stringstream ResultText;
if(rpc_answer.has(uCentralProtocol::RESULT)) {
if(Cmd.Command==uCentralProtocol::WIFISCAN) {
auto ScanObj = rpc_answer.get(uCentralProtocol::RESULT).extract<Poco::JSON::Object::Ptr>();
ParseWifiScan(ScanObj, ResultText, Logger);
} else {
Poco::JSON::Stringifier::stringify(
rpc_answer.get(uCentralProtocol::RESULT), ResultText);
}
} if (rpc_answer.has(uCentralProtocol::RESULT_64)) {
uint64_t sz=0;
if(rpc_answer.has(uCentralProtocol::RESULT_SZ))
sz=rpc_answer.get(uCentralProtocol::RESULT_SZ);
std::string UnCompressedData;
Utils::ExtractBase64CompressedData(rpc_answer.get(uCentralProtocol::RESULT_64).toString(),
UnCompressedData,sz);
Poco::JSON::Stringifier::stringify(UnCompressedData, ResultText);
}
Cmd.Results = ResultText.str();
Cmd.Status = "completed";
Cmd.Completed = OpenWifi::Now();
Cmd.executionTime = rpc_execution_time.count();
if (Cmd.ErrorCode && Cmd.Command == uCentralProtocol::TRACE) {
Cmd.WaitingForFile = 0;
Cmd.AttachDate = Cmd.AttachSize = 0;
Cmd.AttachType = "";
}
// Add the completed command to the database...
StorageService()->AddCommand(Cmd.SerialNumber, Cmd, Storage::COMMAND_COMPLETED);
if (ObjectToReturn && Handler) {
Handler->ReturnObject(*ObjectToReturn);
} else {
Poco::JSON::Object O;
Cmd.to_json(O);
if(Handler)
Handler->ReturnObject(O);
}
Logger.information( fmt::format("{}: Completed in {:.3f}ms.", Cmd.UUID, Cmd.executionTime));
return;
}
Logger.information(fmt::format( "{}: Pending completion.", Cmd.UUID));
SetCommandStatus(Cmd, Request, Response, Handler, Storage::COMMAND_PENDING, Logger);
}
}

View File

@@ -818,7 +818,6 @@ namespace OpenWifi {
return BadRequest(RESTAPI::Errors::DeviceNotConnected);
}
Logger_.information(fmt::format("RTTY: user={} serial={}. Getting configuration.", UserInfo_.userinfo.email,SerialNumber_));
if (MicroService::instance().ConfigGetBool("rtty.enabled", false)) {
GWObjects::Device Device;
@@ -839,11 +838,8 @@ namespace OpenWifi {
};
if(RTTYS_server()->UseInternal()) {
Logger_.information(fmt::format("RTTY: user={} serial={}. Creating hash.", UserInfo_.userinfo.email,SerialNumber_));
Rtty.Token = MicroService::instance().CreateHash(UserInfo_.webtoken.refresh_token_ + std::to_string(OpenWifi::Now())).substr(0,32);
Logger_.information(fmt::format("RTTY: user={} serial={}. Creating endpoint.", UserInfo_.userinfo.email,SerialNumber_));
RTTYS_server()->CreateEndPoint(Rtty.ConnectionId,Rtty.Token, UserInfo_.userinfo.email, SerialNumber_);
Logger_.information(fmt::format("RTTY: user={} serial={}. Created endpoint.", UserInfo_.userinfo.email,SerialNumber_));
RTTYS_server()->CreateEndPoint(Rtty.ConnectionId, Rtty.Token, UserInfo_.userinfo.email, SerialNumber_);
}
Poco::JSON::Object ReturnedObject;
@@ -872,11 +868,9 @@ namespace OpenWifi {
Params.stringify(ParamStream);
Cmd.Details = ParamStream.str();
Logger_.information(fmt::format("RTTY: user={} serial={}. Sending RPC request.", UserInfo_.userinfo.email,SerialNumber_));
Logger_.information(fmt::format("RTTY: user={} serial={} id={}.", UserInfo_.userinfo.email,SerialNumber_,Rtty.ConnectionId));
return RESTAPI_RPC::WaitForCommand(Cmd, Params, *Request, *Response, 60000ms, &ReturnedObject, this, Logger_);
}
Logger_.information(fmt::format("RTTY: user={} serial={}. Device does not exist.", UserInfo_.userinfo.email,SerialNumber_));
return NotFound();
}
Logger_.information(fmt::format("RTTY: user={} serial={}. Internal error.", UserInfo_.userinfo.email,SerialNumber_));

View File

@@ -360,6 +360,12 @@ namespace OpenWifi::GWObjects {
field_to_json(Obj,"weight",weight);
field_to_json(Obj,"secret",secret);
field_to_json(Obj,"certificate",certificate);
field_to_json(Obj,"radsec",radsec);
field_to_json(Obj,"radsec_secret",radsec_secret);
field_to_json(Obj,"radsec_port",radsec_port);
field_to_json(Obj,"radsec_cacerts",radsec_cacerts);
field_to_json(Obj,"radsec_cert",radsec_cert);
field_to_json(Obj,"radsec_key",radsec_key);
}
bool RadiusProxyServerEntry::from_json(const Poco::JSON::Object::Ptr &Obj) {
@@ -370,6 +376,12 @@ namespace OpenWifi::GWObjects {
field_from_json(Obj,"weight",weight);
field_from_json(Obj,"secret",secret);
field_from_json(Obj,"certificate",certificate);
field_from_json(Obj,"radsec",radsec);
field_from_json(Obj,"radsec_port",radsec_port);
field_from_json(Obj,"radsec_secret",radsec_secret);
field_from_json(Obj,"radsec_cacerts",radsec_cacerts);
field_from_json(Obj,"radsec_cert",radsec_cert);
field_from_json(Obj,"radsec_key",radsec_key);
return true;
} catch (const Poco::Exception &E) {
}

View File

@@ -218,6 +218,12 @@ namespace OpenWifi::GWObjects {
uint64_t weight=0;
std::string secret;
std::string certificate;
bool radsec=false;
uint16_t radsec_port=2084;
std::string radsec_secret;
std::string radsec_key;
std::string radsec_cert;
std::string radsec_cacerts;
void to_json(Poco::JSON::Object &Obj) const;
bool from_json(const Poco::JSON::Object::Ptr &Obj);

View File

@@ -11,6 +11,7 @@
namespace OpenWifi {
void Archiver::onTimer([[maybe_unused]] Poco::Timer &timer){
Utils::SetThreadName("strg-archiver");
auto now = OpenWifi::Now();
for(const auto &i:DBs_) {
if (!Poco::icompare(i.DBName, "healthchecks")) {

View File

@@ -34,8 +34,8 @@ namespace OpenWifi {
}
void TelemetryClient::CompleteStartup() {
std::lock_guard Guard(Mutex_);
try {
std::lock_guard Guard(Mutex_);
Socket_ = *WS_;
CId_ = Utils::FormatIPv6(Socket_.peerAddress().toString());
@@ -103,21 +103,19 @@ namespace OpenWifi {
}
void TelemetryClient::OnSocketShutdown([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ShutdownNotification>& pNf) {
std::lock_guard Guard(Mutex_);
Logger().information(fmt::format("SOCKET-SHUTDOWN({}): Orderly shutdown.", CId_));
SendTelemetryShutdown();
}
void TelemetryClient::OnSocketError([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ErrorNotification>& pNf) {
std::lock_guard Guard(Mutex_);
Logger().information(fmt::format("SOCKET-ERROR({}): Closing.",CId_));
SendTelemetryShutdown();
}
void TelemetryClient::OnSocketReadable([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf) {
std::lock_guard Guard(Mutex_);
try
{
std::lock_guard Guard(Mutex_);
ProcessIncomingFrame();
}
catch (const Poco::Exception & E)

View File

@@ -18,6 +18,7 @@ namespace OpenWifi {
Messages_->Readable_ += Poco::delegate(this,&TelemetryStream::onMessage);
// ReactorPool_.Start("TelemetryWebSocketPool_");
Thr_.start(Reactor_);
Utils::SetThreadName(Thr_,"telemetry-svr");
return 0;
}

View File

@@ -47,16 +47,14 @@ namespace OpenWifi {
void UpdateEndPoint(uint64_t SerialNumber, const std::string &PayLoad);
bool RegisterClient(const std::string &UUID, TelemetryClient *Client);
void DeRegisterClient(const std::string &UUID);
// Poco::Net::SocketReactor & NextReactor() { return ReactorPool_.NextReactor(); }
Poco::Net::SocketReactor & NextReactor() { return Reactor_; }
void onMessage(bool& b);
private:
std::atomic_bool Running_=false;
volatile std::atomic_bool Running_=false;
std::map<std::string, TelemetryClient *> Clients_; // uuid -> client
std::map<uint64_t, std::set<std::string>> SerialNumbers_; // serialNumber -> uuid
// ReactorPool ReactorPool_;
Poco::Net::SocketReactor Reactor_;
std::unique_ptr<FIFO<QueueUpdate>> Messages_=std::make_unique<FIFO<QueueUpdate>>(100);
Poco::Thread Thr_;

142
src/VenueBroadcaster.h Normal file
View File

@@ -0,0 +1,142 @@
//
// Created by stephane bourque on 2022-07-16.
//
#pragma once
#include "framework/MicroService.h"
#include "sdks/sdk_prov.h"
#include "DeviceRegistry.h"
namespace OpenWifi {
class VenueBroadcastNotification : public Poco::Notification {
public:
VenueBroadcastNotification(const std::string &SourceSerialNumber, const std::string &Data, uint64_t TimeStamp) :
SourceSerialNumber_(SourceSerialNumber),
Data_(Data),
TimeStamp_(TimeStamp) {
}
std::string SourceSerialNumber_;
std::string Data_;
uint64_t TimeStamp_=OpenWifi::Now();
};
class VenueBroadcaster : public SubSystemServer, Poco::Runnable {
public:
static auto instance() {
static auto instance_ = new VenueBroadcaster;
return instance_;
}
inline int Start() override {
Enabled_ = MicroService::instance().ConfigGetBool("venue_broadcast.enabled",true);
if(Enabled_) {
BroadcastManager_.start(*this);
}
return 0;
}
inline void Stop() override {
if(Enabled_ && Running_) {
BroadcastQueue_.wakeUpAll();
BroadcastManager_.wakeUp();
BroadcastManager_.join();
}
}
inline void reinitialize([[maybe_unused]] Poco::Util::Application &self) override {
Logger().information("Reinitializing.");
}
struct VenueInfo {
uint64_t timestamp=OpenWifi::Now();
Types::StringVec serialNumbers;
};
inline bool FindSerialNumberList(const std::string &Source, OpenWifi::Types::StringVec & SerialNumbers) {
// Can we find our serial number in any of the lists so far...
for(const auto &venue:Venues_) {
auto entry = std::find(venue.second.serialNumbers.begin(),venue.second.serialNumbers.end(),Source);
if(entry!=venue.second.serialNumbers.end() && (OpenWifi::Now()-venue.second.timestamp)<600) {
SerialNumbers = venue.second.serialNumbers;
auto entry2 = std::find(SerialNumbers.begin(),SerialNumbers.end(),Source);
SerialNumbers.erase(entry2);
return true;
}
}
// get the venue from Prov and the serial numbers.
Types::UUID_t Venue;
Types::StringVec TmpSerialNumbers;
if(OpenWifi::SDK::Prov::GetSerialNumbersForVenueOfSerialNumber(Source,Venue,TmpSerialNumbers,Logger())) {
std::sort(TmpSerialNumbers.begin(),TmpSerialNumbers.end());
VenueInfo V{.timestamp=OpenWifi::Now(), .serialNumbers=TmpSerialNumbers};
Venues_[Venue] = V;
auto p = std::find(TmpSerialNumbers.begin(),TmpSerialNumbers.end(),Source);
if(p!=TmpSerialNumbers.end()) {
TmpSerialNumbers.erase(p);
SerialNumbers = TmpSerialNumbers;
return true;
}
}
return false;
}
inline void SendToDevice(const std::string &SerialNumber,const std::string &Payload) {
DeviceRegistry()->SendFrame(SerialNumber,Payload);
}
inline void run() final {
Running_ = true;
Utils::SetThreadName("venue-bcast");
Poco::AutoPtr<Poco::Notification> NextNotification(BroadcastQueue_.waitDequeueNotification());
while (NextNotification && Running_) {
auto Notification = dynamic_cast<VenueBroadcastNotification *>(NextNotification.get());
if (Notification != nullptr) {
Types::StringVec SerialNumbers;
if(FindSerialNumberList(Notification->SourceSerialNumber_,SerialNumbers)) {
Poco::JSON::Object Payload;
Payload.set("jsonrpc","2.0");
Payload.set("method","venue_broadcast");
Poco::JSON::Object ParamBlock;
ParamBlock.set("serial",Notification->SourceSerialNumber_);
ParamBlock.set("timestamp",Notification->TimeStamp_);
ParamBlock.set("data",Notification->Data_);
Payload.set("params", ParamBlock);
std::ostringstream o;
Payload.stringify(o);
for(const auto &Device:SerialNumbers) {
SendToDevice(Device,o.str());
}
}
}
NextNotification = BroadcastQueue_.waitDequeueNotification();
}
Running_=false;
}
inline void Broadcast(const std::string &SourceSerial, const std::string &Data, uint64_t TimeStamp) {
BroadcastQueue_.enqueueNotification(new VenueBroadcastNotification(SourceSerial,Data,TimeStamp));
}
private:
std::atomic_bool Running_=false;
bool Enabled_=false;
Poco::NotificationQueue BroadcastQueue_;
Poco::Thread BroadcastManager_;
std::map<OpenWifi::Types::UUID_t,VenueInfo> Venues_;
VenueBroadcaster() noexcept:
SubSystemServer("VenueBroadcaster", "VENUE-BCAST", "venue.broacast")
{
}
};
inline auto VenueBroadcaster() { return VenueBroadcaster::instance(); }
}

View File

@@ -5,11 +5,13 @@
#include "WS_Connection.h"
#include "Poco/Net/SecureStreamSocketImpl.h"
#include "Poco/Net/SecureServerSocketImpl.h"
#include "Poco/Net/HTTPServerResponseImpl.h"
#include "Poco/Net/HTTPServerSession.h"
#include "Poco/Net/HTTPServerRequestImpl.h"
#include "Poco/Net/NetException.h"
#include "Poco/Net/SSLException.h"
#include "Poco/Net/Context.h"
#include "Poco/Base64Decoder.h"
#include "Poco/Base64Encoder.h"
@@ -24,6 +26,7 @@
#include "TelemetryStream.h"
#include "CentralConfig.h"
#include "FindCountry.h"
#include "VenueBroadcaster.h"
#include "framework/WebSocketClientNotifications.h"
#include "RADIUS_proxy_server.h"
@@ -46,9 +49,9 @@ namespace OpenWifi {
PeerAddress_ = SS->peerAddress().host();
CId_ = Utils::FormatIPv6(SS->peerAddress().toString());
if (!SS->secure()) {
Logger().error(fmt::format("{}: Connection is NOT secure.", CId_));
poco_error(Logger(),fmt::format("{}: Connection is NOT secure.", CId_));
} else {
Logger().debug(fmt::format("{}: Connection is secure.", CId_));
poco_trace(Logger(),fmt::format("{}: Connection is secure.", CId_));
}
if (SS->havePeerCertificate()) {
@@ -60,15 +63,15 @@ namespace OpenWifi {
if (WebSocketServer()->ValidateCertificate(CId_, PeerCert)) {
CN_ = Poco::trim(Poco::toLower(PeerCert.commonName()));
CertValidation_ = GWObjects::MISMATCH_SERIAL;
Logger().debug(fmt::format("{}: Valid certificate: CN={}", CId_, CN_));
poco_trace(Logger(),fmt::format("{}: Valid certificate: CN={}", CId_, CN_));
} else {
Logger().debug(fmt::format("{}: Certificate is not valid", CId_));
poco_error(Logger(),fmt::format("{}: Certificate is not valid", CId_));
}
} catch (const Poco::Exception &E) {
LogException(E);
}
} else {
Logger().error(fmt::format("{}: No certificates available..", CId_));
poco_error(Logger(),fmt::format("{}: No certificates available..", CId_));
}
if (WebSocketServer::IsSim(CN_) && !WebSocketServer()->IsSimEnabled()) {
@@ -113,7 +116,7 @@ namespace OpenWifi {
Reactor_.addEventHandler(*WS_, Poco::NObserver<WSConnection, Poco::Net::ErrorNotification>(
*this, &WSConnection::OnSocketError));
Registered_ = true;
Logger().information(fmt::format("CONNECTION({}): completed.", CId_));
poco_debug(Logger(),fmt::format("CONNECTION({}): completed.", CId_));
return;
} catch (const Poco::Net::CertificateValidationException &E) {
Logger().error(fmt::format("CONNECTION({}): Poco::Exception Certificate Validation failed during connection. Device will have to retry.",
@@ -177,6 +180,7 @@ namespace OpenWifi {
WSConnection::~WSConnection() {
poco_debug(Logger(),fmt::format("{}: Removing connection for {}.", CId_, SerialNumber_));
if (ConnectionId_)
DeviceRegistry()->UnRegister(SerialNumberInt_, ConnectionId_);
@@ -357,7 +361,8 @@ namespace OpenWifi {
auto Firmware = ParamsObj->get(uCentralProtocol::FIRMWARE).toString();
auto Capabilities = ParamsObj->get(uCentralProtocol::CAPABILITIES).toString();
SerialNumber_ = Serial;
//// change this
CN_ = SerialNumber_ = Serial;
SerialNumberInt_ = Utils::SerialNumberToInt(SerialNumber_);
Conn_ = DeviceRegistry()->Register(SerialNumberInt_, this, ConnectionId_);
Conn_->Conn_.UUID = UUID;
@@ -370,7 +375,7 @@ namespace OpenWifi {
if ((!CN_.empty() && Utils::SerialNumberMatch(CN_, SerialNumber_)) ||
WebSocketServer()->IsSimSerialNumber(CN_)) {
CertValidation_ = GWObjects::VERIFIED;
poco_information(Logger(), fmt::format("CONNECT({}): Fully validated and authenticated device..", CId_));
poco_information(Logger(), fmt::format("CONNECT({}): Fully validated and authenticated device.", CId_));
} else {
if (CN_.empty())
poco_information(Logger(), fmt::format("CONNECT({}): Not authenticated or validated.", CId_));
@@ -752,6 +757,14 @@ namespace OpenWifi {
}
} break;
case uCentralProtocol::Events::ET_VENUEBROADCAST: {
if(ParamsObj->has("data") && ParamsObj->has("serial") && ParamsObj->has("timestamp")) {
VenueBroadcaster()->Broadcast(
ParamsObj->get("serial").toString(),
ParamsObj->get("data").toString(),
ParamsObj->get("timestamp"));
}
} break;
// this will never be called but some compilers will complain if we do not have a case for
// every single values of an enum
case uCentralProtocol::Events::ET_UNKNOWN: {
@@ -1057,6 +1070,8 @@ namespace OpenWifi {
CId_, std::string{E.what()}, IncomingMessageStr));
return delete this;
} catch (...) {
poco_error(Logger(),fmt::format("Device {} must be disconnected. Unknown exception.", CId_));
std::cout << "Device " << CId_ << " must be disconnected due to exception..." << std::endl;
return delete this;
}

View File

@@ -17,81 +17,81 @@
namespace OpenWifi {
class WSConnection {
static constexpr int BufSize = 128000;
public:
WSConnection(Poco::Net::StreamSocket& Socket, Poco::Net::SocketReactor& Reactor);
~WSConnection();
class WSConnection {
static constexpr int BufSize = 128000;
public:
WSConnection(Poco::Net::StreamSocket& Socket, Poco::Net::SocketReactor& Reactor);
~WSConnection();
void ProcessJSONRPCEvent(Poco::JSON::Object::Ptr & Doc);
void ProcessJSONRPCResult(Poco::JSON::Object::Ptr Doc);
void ProcessIncomingFrame();
void ProcessIncomingRadiusData(const Poco::JSON::Object::Ptr &Doc);
void ProcessJSONRPCEvent(Poco::JSON::Object::Ptr & Doc);
void ProcessJSONRPCResult(Poco::JSON::Object::Ptr Doc);
void ProcessIncomingFrame();
void ProcessIncomingRadiusData(const Poco::JSON::Object::Ptr &Doc);
bool Send(const std::string &Payload);
bool Send(const std::string &Payload);
bool SendRadiusAuthenticationData(const unsigned char * buffer, std::size_t size);
bool SendRadiusAccountingData(const unsigned char * buffer, std::size_t size);
bool SendRadiusCoAData(const unsigned char * buffer, std::size_t size);
bool SendRadiusAuthenticationData(const unsigned char * buffer, std::size_t size);
bool SendRadiusAccountingData(const unsigned char * buffer, std::size_t size);
bool SendRadiusCoAData(const unsigned char * buffer, std::size_t size);
void OnSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf);
void OnSocketShutdown(const Poco::AutoPtr<Poco::Net::ShutdownNotification>& pNf);
void OnSocketError(const Poco::AutoPtr<Poco::Net::ErrorNotification>& pNf);
bool LookForUpgrade(const uint64_t UUID, uint64_t & UpgradedUUID);
static bool ExtractBase64CompressedData(const std::string & CompressedData, std::string & UnCompressedData, uint64_t compress_sz);
void LogException(const Poco::Exception &E);
inline Poco::Logger & Logger() { return Logger_; }
bool SetWebSocketTelemetryReporting(uint64_t interval, uint64_t TelemetryWebSocketTimer);
bool SetKafkaTelemetryReporting(uint64_t interval, uint64_t TelemetryKafkaTimer);
bool StopWebSocketTelemetry();
bool StopKafkaTelemetry();
inline bool GetTelemetryParameters(bool & Reporting, uint64_t & Interval,
uint64_t & WebSocketTimer, uint64_t & KafkaTimer,
uint64_t &WebSocketCount, uint64_t & KafkaCount,
uint64_t &WebSocketPackets,
uint64_t &KafkaPackets ) const {
Reporting = TelemetryReporting_;
WebSocketTimer = TelemetryWebSocketTimer_;
KafkaTimer = TelemetryKafkaTimer_;
WebSocketCount = TelemetryWebSocketRefCount_;
KafkaCount = TelemetryKafkaRefCount_;
Interval = TelemetryInterval_;
WebSocketPackets = TelemetryWebSocketPackets_;
KafkaPackets = TelemetryKafkaPackets_;
return true;
}
void OnSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf);
void OnSocketShutdown(const Poco::AutoPtr<Poco::Net::ShutdownNotification>& pNf);
void OnSocketError(const Poco::AutoPtr<Poco::Net::ErrorNotification>& pNf);
bool LookForUpgrade(const uint64_t UUID, uint64_t & UpgradedUUID);
static bool ExtractBase64CompressedData(const std::string & CompressedData, std::string & UnCompressedData, uint64_t compress_sz);
void LogException(const Poco::Exception &E);
inline Poco::Logger & Logger() { return Logger_; }
bool SetWebSocketTelemetryReporting(uint64_t interval, uint64_t TelemetryWebSocketTimer);
bool SetKafkaTelemetryReporting(uint64_t interval, uint64_t TelemetryKafkaTimer);
bool StopWebSocketTelemetry();
bool StopKafkaTelemetry();
inline bool GetTelemetryParameters(bool & Reporting, uint64_t & Interval,
uint64_t & WebSocketTimer, uint64_t & KafkaTimer,
uint64_t &WebSocketCount, uint64_t & KafkaCount,
uint64_t &WebSocketPackets,
uint64_t &KafkaPackets ) const {
Reporting = TelemetryReporting_;
WebSocketTimer = TelemetryWebSocketTimer_;
KafkaTimer = TelemetryKafkaTimer_;
WebSocketCount = TelemetryWebSocketRefCount_;
KafkaCount = TelemetryKafkaRefCount_;
Interval = TelemetryInterval_;
WebSocketPackets = TelemetryWebSocketPackets_;
KafkaPackets = TelemetryKafkaPackets_;
return true;
}
private:
std::recursive_mutex Mutex_;
Poco::Logger &Logger_;
Poco::Net::StreamSocket Socket_;
Poco::Net::SocketReactor & Reactor_;
std::unique_ptr<Poco::Net::WebSocket> WS_;
std::string SerialNumber_;
uint64_t SerialNumberInt_=0;
std::string Compatible_;
std::shared_ptr<DeviceRegistry::ConnectionEntry> Conn_;
bool Registered_ = false ;
std::string CId_;
std::string CN_;
GWObjects::CertificateValidation CertValidation_ = GWObjects::CertificateValidation::NO_CERTIFICATE;
uint64_t Errors_=0;
bool Connected_=false;
uint64_t ConnectionId_=0;
Poco::Net::IPAddress PeerAddress_;
mutable std::atomic_bool TelemetryReporting_ = false;
mutable uint64_t TelemetryWebSocketRefCount_ = 0;
mutable uint64_t TelemetryKafkaRefCount_ = 0;
mutable uint64_t TelemetryWebSocketTimer_ = 0;
mutable uint64_t TelemetryKafkaTimer_ = 0 ;
mutable uint64_t TelemetryInterval_ = 0;
mutable uint64_t TelemetryWebSocketPackets_=0;
mutable uint64_t TelemetryKafkaPackets_=0;
private:
std::recursive_mutex Mutex_;
Poco::Logger &Logger_;
Poco::Net::StreamSocket Socket_;
Poco::Net::SocketReactor & Reactor_;
std::unique_ptr<Poco::Net::WebSocket> WS_;
std::string SerialNumber_;
uint64_t SerialNumberInt_=0;
std::string Compatible_;
std::shared_ptr<DeviceRegistry::ConnectionEntry> Conn_;
volatile bool Registered_ = false ;
std::string CId_;
std::string CN_;
GWObjects::CertificateValidation CertValidation_ = GWObjects::CertificateValidation::NO_CERTIFICATE;
uint64_t Errors_=0;
volatile bool Connected_=false;
uint64_t ConnectionId_=0;
Poco::Net::IPAddress PeerAddress_;
volatile std::atomic_bool TelemetryReporting_ = false;
volatile uint64_t TelemetryWebSocketRefCount_ = 0;
volatile uint64_t TelemetryKafkaRefCount_ = 0;
uint64_t TelemetryWebSocketTimer_ = 0;
uint64_t TelemetryKafkaTimer_ = 0 ;
uint64_t TelemetryInterval_ = 0;
volatile uint64_t TelemetryWebSocketPackets_=0;
volatile uint64_t TelemetryKafkaPackets_=0;
void CompleteStartup();
bool StartTelemetry();
bool StopTelemetry();
void UpdateCounts();
};
void CompleteStartup();
bool StartTelemetry();
bool StopTelemetry();
void UpdateCounts();
};
}

View File

@@ -29,7 +29,8 @@ namespace OpenWifi {
auto NewThread = std::make_unique<Poco::Thread>();
NewThread->setStackSize(2000000);
NewThread->start(*NewReactor);
NewThread->setName(ThreadNamePrefix + "#" + std::to_string(i));
std::string ThreadName{ThreadNamePrefix + "#" + std::to_string(i)};
Utils::SetThreadName(*NewThread,ThreadName.c_str());
Reactors_.emplace_back(std::move(NewReactor));
Threads_.emplace_back(std::move(NewThread));
}

View File

@@ -8,75 +8,77 @@
#include "Poco/Net/HTTPHeaderStream.h"
#include "Poco/JSON/Array.h"
#include "Poco/Net/Context.h"
#include "ConfigurationCache.h"
#include "TelemetryStream.h"
#include "WS_Server.h"
#include <openssl/ssl.h>
namespace OpenWifi {
bool WebSocketServer::ValidateCertificate(const std::string & ConnectionId, const Poco::Crypto::X509Certificate & Certificate) {
if(IsCertOk()) {
Logger().debug(fmt::format("CERTIFICATE({}): issuer='{}' cn='{}'", ConnectionId, Certificate.issuerName(),Certificate.commonName()));
if(!Certificate.issuedBy(*IssuerCert_)) {
Logger().debug(fmt::format("CERTIFICATE({}): issuer mismatch. Local='{}' Incoming='{}'", ConnectionId, IssuerCert_->issuerName(), Certificate.issuerName()));
return false;
}
return true;
bool WebSocketServer::ValidateCertificate(const std::string & ConnectionId, const Poco::Crypto::X509Certificate & Certificate) {
if(IsCertOk()) {
Logger().debug(fmt::format("CERTIFICATE({}): issuer='{}' cn='{}'", ConnectionId, Certificate.issuerName(),Certificate.commonName()));
if(!Certificate.issuedBy(*IssuerCert_)) {
Logger().debug(fmt::format("CERTIFICATE({}): issuer mismatch. Local='{}' Incoming='{}'", ConnectionId, IssuerCert_->issuerName(), Certificate.issuerName()));
return false;
}
return false;
return true;
}
return false;
}
int WebSocketServer::Start() {
// ReactorPool_.Start("DeviceReactorPool_");
for(const auto & Svr : ConfigServersList_ ) {
Logger().notice( fmt::format("Starting: {}:{} Keyfile:{} CertFile: {}",
Svr.Address(),
Svr.Port(),
Svr.KeyFile(),Svr.CertFile()));
Svr.LogCert(Logger());
if(!Svr.RootCA().empty())
Svr.LogCas(Logger());
auto Sock{Svr.CreateSecureSocket(Logger())};
if(!IsCertOk()) {
IssuerCert_ = std::make_unique<Poco::Crypto::X509Certificate>(Svr.IssuerCertFile());
Logger().information( fmt::format("Certificate Issuer Name:{}",IssuerCert_->issuerName()));
}
auto NewSocketAcceptor = std::make_unique<ws_server_reactor_type_t>(Sock, Reactor_); // , 2 /*Poco::Environment::processorCount()*2) */ );
Acceptors_.push_back(std::move(NewSocketAcceptor));
}
int WebSocketServer::Start() {
// ReactorPool_.Start("DeviceReactorPool_");
for(const auto & Svr : ConfigServersList_ ) {
Logger().notice( fmt::format("Starting: {}:{} Keyfile:{} CertFile: {}",
Svr.Address(),
Svr.Port(),
Svr.KeyFile(),Svr.CertFile()));
Svr.LogCert(Logger());
if(!Svr.RootCA().empty())
Svr.LogCas(Logger());
auto Sock{Svr.CreateSecureSocket(Logger())};
if(!IsCertOk()) {
IssuerCert_ = std::make_unique<Poco::Crypto::X509Certificate>(Svr.IssuerCertFile());
Logger().information( fmt::format("Certificate Issuer Name:{}",IssuerCert_->issuerName()));
}
auto NewSocketAcceptor = std::make_unique<ws_server_reactor_type_t>(Sock, Reactor_); // , 2 /*Poco::Environment::processorCount()*2) */ );
Acceptors_.push_back(std::move(NewSocketAcceptor));
}
auto ProvString = MicroService::instance().ConfigGetString("autoprovisioning.process","default");
if(ProvString!="default") {
auto Tokens = Poco::StringTokenizer(ProvString, ",");
for (const auto &i : Tokens) {
if (i == "prov")
LookAtProvisioning_ = true;
else
UseDefaultConfig_ = true;
}
} else {
UseDefaultConfig_ = true;
auto ProvString = MicroService::instance().ConfigGetString("autoprovisioning.process","default");
if(ProvString!="default") {
auto Tokens = Poco::StringTokenizer(ProvString, ",");
for (const auto &i : Tokens) {
if (i == "prov")
LookAtProvisioning_ = true;
else
UseDefaultConfig_ = true;
}
} else {
UseDefaultConfig_ = true;
}
SimulatorId_ = MicroService::instance().ConfigGetString("simulatorid","");
SimulatorEnabled_ = !SimulatorId_.empty();
SimulatorId_ = MicroService::instance().ConfigGetString("simulatorid","");
SimulatorEnabled_ = !SimulatorId_.empty();
ReactorThread_.setName("WS-DEVICE-REACTOR");
ReactorThread_.setStackSize(3000000);
ReactorThread_.start(Reactor_);
ReactorThread_.setStackSize(3000000);
ReactorThread_.start(Reactor_);
Utils::SetThreadName(ReactorThread_,"device-reactor");
return 0;
}
return 0;
}
void WebSocketServer::Stop() {
Logger().notice("Stopping reactors...");
// ReactorPool_.Stop();
Reactor_.stop();
ReactorThread_.join();
}
void WebSocketServer::Stop() {
Logger().notice("Stopping reactors...");
// ReactorPool_.Stop();
Reactor_.stop();
ReactorThread_.join();
}
} //namespace
} //namespace

View File

@@ -25,53 +25,52 @@
namespace OpenWifi {
class WebSocketServer : public SubSystemServer {
public:
static auto instance() {
static auto instance_ = new WebSocketServer;
return instance_;
}
class WebSocketServer : public SubSystemServer {
public:
static auto instance() {
static auto instance_ = new WebSocketServer;
return instance_;
}
int Start() override;
void Stop() override;
bool IsCertOk() { return IssuerCert_!= nullptr; }
bool ValidateCertificate(const std::string & ConnectionId, const Poco::Crypto::X509Certificate & Certificate);
// Poco::Net::SocketReactor & GetNextReactor() { return ReactorPool_.NextReactor(); }
int Start() override;
void Stop() override;
bool IsCertOk() { return IssuerCert_!= nullptr; }
bool ValidateCertificate(const std::string & ConnectionId, const Poco::Crypto::X509Certificate & Certificate);
// Poco::Net::SocketReactor & GetNextReactor() { return ReactorPool_.NextReactor(); }
inline bool IsSimSerialNumber(const std::string & SerialNumber) const {
return IsSim(SerialNumber) && SerialNumber == SimulatorId_;
}
inline bool IsSimSerialNumber(const std::string & SerialNumber) const {
return IsSim(SerialNumber) && SerialNumber == SimulatorId_;
}
inline static bool IsSim(const std::string & SerialNumber) {
return SerialNumber.substr(0,6) == "53494d";
}
inline static bool IsSim(const std::string & SerialNumber) {
return SerialNumber.substr(0,6) == "53494d";
}
inline bool IsSimEnabled() const {
return SimulatorEnabled_;
}
inline bool IsSimEnabled() const {
return SimulatorEnabled_;
}
inline bool UseProvisioning() const { return LookAtProvisioning_; }
inline bool UseDefaults() const { return UseDefaultConfig_; }
inline bool UseProvisioning() const { return LookAtProvisioning_; }
inline bool UseDefaults() const { return UseDefaultConfig_; }
private:
std::unique_ptr<Poco::Crypto::X509Certificate> IssuerCert_;
// typedef std::unique_ptr<Poco::Net::ParallelSocketAcceptor<WSConnection, Poco::Net::SocketReactor>> ws_server_reactor_type_t;
typedef Poco::Net::SocketAcceptor<WSConnection> ws_server_reactor_type_t;
std::vector<std::unique_ptr<ws_server_reactor_type_t>> Acceptors_;
Poco::Net::SocketReactor Reactor_;
Poco::Thread ReactorThread_;
// ReactorPool ReactorPool_;
std::string SimulatorId_;
bool LookAtProvisioning_ = false;
bool UseDefaultConfig_ = true;
bool SimulatorEnabled_=false;
private:
std::unique_ptr<Poco::Crypto::X509Certificate> IssuerCert_;
// typedef std::unique_ptr<Poco::Net::ParallelSocketAcceptor<WSConnection, Poco::Net::SocketReactor>> ws_server_reactor_type_t;
typedef Poco::Net::SocketAcceptor<WSConnection> ws_server_reactor_type_t;
std::vector<std::unique_ptr<ws_server_reactor_type_t>> Acceptors_;
Poco::Net::SocketReactor Reactor_;
Poco::Thread ReactorThread_;
std::string SimulatorId_;
bool LookAtProvisioning_ = false;
bool UseDefaultConfig_ = true;
bool SimulatorEnabled_=false;
WebSocketServer() noexcept:
SubSystemServer("WebSocketServer", "WS-SVR", "ucentral.websocket") {
WebSocketServer() noexcept:
SubSystemServer("WebSocketServer", "WS-SVR", "ucentral.websocket") {
}
};
}
};
inline auto WebSocketServer() { return WebSocketServer::instance(); }
inline auto WebSocketServer() { return WebSocketServer::instance(); }
} //namespace
} //namespace

View File

@@ -27,6 +27,11 @@ namespace OpenWifi {
inline uint64_t Now() { return std::time(nullptr); };
}
namespace OpenWifi::Utils {
std::vector<unsigned char> base64decode(const std::string& input);
std::string base64encode(const unsigned char *input, uint32_t size);
}
using namespace std::chrono_literals;
#include "Poco/Util/Application.h"
@@ -238,6 +243,11 @@ namespace OpenWifi::RESTAPI_utils {
Obj.set(Field,Value);
}
inline void field_to_json(Poco::JSON::Object &Obj, const char *Field, const Poco::Data::BLOB &Value) {
auto Result = Utils::base64encode((const unsigned char *)Value.rawContent(),Value.size());
Obj.set(Field,Result);
}
inline void field_to_json(Poco::JSON::Object &Obj, const char *Field, const Types::StringPairVec & S) {
Poco::JSON::Array Array;
for(const auto &i:S) {
@@ -334,12 +344,12 @@ namespace OpenWifi::RESTAPI_utils {
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, double & Value) {
if(Obj->has(Field) && !Obj->isNull(Field))
Value = (double) Obj->get(Field);
Value = (double)Obj->get(Field);
}
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, float & Value) {
if(Obj->has(Field) && !Obj->isNull(Field))
Value = (float) Obj->get(Field);
Value = (float)Obj->get(Field);
}
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, bool &Value) {
@@ -374,7 +384,14 @@ namespace OpenWifi::RESTAPI_utils {
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, uint64_t &Value) {
if(Obj->has(Field) && !Obj->isNull(Field))
Value = (uint64_t ) Obj->get(Field);
Value = (uint64_t)Obj->get(Field);
}
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, Poco::Data::BLOB &Value) {
if(Obj->has(Field) && !Obj->isNull(Field)) {
auto Result = Utils::base64decode(Obj->get(Field).toString());
Value.assignRaw((const unsigned char *)&Result[0],Result.size());
}
}
inline void field_from_json(const Poco::JSON::Object::Ptr &Obj, const char *Field, Types::StringPairVec &Vec) {
@@ -643,6 +660,27 @@ namespace OpenWifi::RESTAPI_utils {
namespace OpenWifi::Utils {
inline void SetThreadName(const char *name) {
#ifdef __linux__
Poco::Thread::current()->setName(name);
pthread_setname_np(pthread_self(), name);
#endif
#ifdef __APPLE__
Poco::Thread::current()->setName(name);
pthread_setname_np(name);
#endif
}
inline void SetThreadName(Poco::Thread &thr, const char *name) {
#ifdef __linux__
thr.setName(name);
pthread_setname_np(thr.tid(), name);
#endif
#ifdef __APPLE__
thr.setName(name);
#endif
}
enum MediaTypeEncodings {
PLAIN,
BINARY,
@@ -1316,7 +1354,7 @@ namespace OpenWifi {
inline void Start();
inline void Stop();
private:
std::atomic_bool Running_ = false;
mutable std::atomic_bool Running_ = false;
Poco::Thread Thread_;
};
@@ -1847,7 +1885,8 @@ namespace OpenWifi {
Request = &RequestIn;
Response = &ResponseIn;
Poco::Thread::current()->setName("WebServerThread_" + std::to_string(TransactionId_));
std::string th_name = "restsvr_" + std::to_string(TransactionId_);
Utils::SetThreadName(th_name.c_str());
if(Request->getContentLength()>0) {
if(Request->getContentType().find("application/json")!=std::string::npos) {
@@ -2042,6 +2081,17 @@ namespace OpenWifi {
return false;
}
static inline bool AssignIfPresent(const Poco::JSON::Object::Ptr &O, const std::string &Field, Poco::Data::BLOB &Value) {
if(O->has(Field)) {
std::string Content = O->get(Field).toString();
auto DecodedBlob = Utils::base64decode(Content);
Value.assignRaw((const unsigned char *)&DecodedBlob[0],DecodedBlob.size());
return true;
}
return false;
}
template <typename T> bool AssignIfPresent(const Poco::JSON::Object::Ptr &O, const std::string &Field, const T &value, T & assignee) {
if(O->has(Field)) {
assignee = value;
@@ -2579,7 +2629,7 @@ namespace OpenWifi {
private:
std::recursive_mutex Mutex_;
Poco::Thread Worker_;
std::atomic_bool Running_=false;
mutable std::atomic_bool Running_=false;
Poco::NotificationQueue Queue_;
};
@@ -2605,7 +2655,7 @@ namespace OpenWifi {
private:
std::recursive_mutex Mutex_;
Poco::Thread Worker_;
std::atomic_bool Running_=false;
mutable std::atomic_bool Running_=false;
};
class KafkaDispatcher : public Poco::Runnable {
@@ -2662,6 +2712,7 @@ namespace OpenWifi {
inline void run() override {
Poco::AutoPtr<Poco::Notification> Note(Queue_.waitDequeueNotification());
Utils::SetThreadName("kafka-dispatch");
while(Note && Running_) {
auto Msg = dynamic_cast<KafkaMessage*>(Note.get());
if(Msg!= nullptr) {
@@ -2687,7 +2738,7 @@ namespace OpenWifi {
std::recursive_mutex Mutex_;
Types::NotifyTable Notifiers_;
Poco::Thread Worker_;
std::atomic_bool Running_=false;
mutable std::atomic_bool Running_=false;
uint64_t FunctionId_=1;
Poco::NotificationQueue Queue_;
};
@@ -2882,6 +2933,7 @@ namespace OpenWifi {
void handleRequest(Poco::Net::HTTPServerRequest& Request, Poco::Net::HTTPServerResponse& Response) override
{
Utils::SetThreadName("alb-request");
try {
if((id_ % 100) == 0) {
Logger_.debug(fmt::format("ALB-REQUEST({}): ALB Request {}.",
@@ -2950,7 +3002,7 @@ namespace OpenWifi {
std::unique_ptr<Poco::Net::HTTPServer> Server_;
std::unique_ptr<Poco::Net::ServerSocket> Socket_;
int Port_ = 0;
std::atomic_bool Running_=false;
mutable std::atomic_bool Running_=false;
};
inline auto ALBHealthCheckServer() { return ALBHealthCheckServer::instance(); }
@@ -2982,7 +3034,7 @@ namespace OpenWifi {
inline Poco::Net::HTTPRequestHandler *CallServer(const std::string &Path, uint64_t Id) {
RESTAPIHandler::BindingMap Bindings;
Poco::Thread::current()->setName(fmt::format("RESTAPI_ExtServer_{}",Id));
Utils::SetThreadName(fmt::format("rest_ext_{}",Id).c_str());
return RESTAPI_ExtRouter(Path, Bindings, Logger(), Server_, Id);
}
@@ -3006,7 +3058,7 @@ namespace OpenWifi {
inline Poco::Net::HTTPRequestHandler *createRequestHandler(const Poco::Net::HTTPServerRequest &Request) override {
try {
Poco::URI uri(Request.getURI());
Poco::Thread::current()->setName(fmt::format("ExtWebServer_{}",TransactionId_));
Utils::SetThreadName(fmt::format("rest_ext_{}",TransactionId_).c_str());
return RESTAPI_ExtServer()->CallServer(uri.getPath(), TransactionId_++);
} catch (...) {
@@ -3115,7 +3167,7 @@ namespace OpenWifi {
inline Poco::Net::HTTPRequestHandler *CallServer(const std::string &Path, uint64_t Id) {
RESTAPIHandler::BindingMap Bindings;
Poco::Thread::current()->setName(fmt::format("RESTAPI_IntServer_{}",Id));
Utils::SetThreadName(fmt::format("rest_int_{}",Id).c_str());
return RESTAPI_IntRouter(Path, Bindings, Logger(), Server_, Id);
}
private:
@@ -3212,7 +3264,12 @@ namespace OpenWifi {
return Poco::Logger::get(Name);
}
static inline void Exit(int Reason);
virtual void GetExtraConfiguration(Poco::JSON::Object & Cfg) {
Cfg.set("additionalConfiguration",false);
}
static inline void Exit(int Reason);
inline void BusMessageReceived(const std::string &Key, const std::string & Payload);
inline MicroServiceMetaVec GetServices(const std::string & Type);
inline MicroServiceMetaVec GetServices();
@@ -3524,7 +3581,9 @@ namespace OpenWifi {
void DaemonPostInitialization(Poco::Util::Application &self);
inline void MicroService::initialize(Poco::Util::Application &self) {
// add the default services
// Utils::SetThreadName("microservice");
// add the default services
LoadConfigurationFile();
InitializeLoggingSystem();
@@ -3919,6 +3978,7 @@ namespace OpenWifi {
inline int MicroService::main([[maybe_unused]] const ArgVec &args) {
// Utils::SetThreadName("main");
MyErrorHandler ErrorHandler(*this);
Poco::ErrorHandler::set(&ErrorHandler);
@@ -4034,6 +4094,7 @@ namespace OpenWifi {
inline void BusEventManager::run() {
Running_ = true;
Utils::SetThreadName("BusEventManager");
auto Msg = MicroService::instance().MakeSystemEventMessage(KafkaTopics::ServiceEvents::EVENT_JOIN);
KafkaManager()->PostMessage(KafkaTopics::SERVICE_EVENTS,MicroService::instance().PrivateEndPoint(),Msg, false);
while(Running_) {
@@ -4119,6 +4180,8 @@ namespace OpenWifi {
}
inline void KafkaProducer::run() {
Utils::SetThreadName("KafkaProducer");
cppkafka::Configuration Config({
{ "client.id", MicroService::instance().ConfigGetString("openwifi.kafka.client.id") },
{ "metadata.broker.list", MicroService::instance().ConfigGetString("openwifi.kafka.brokerlist") }
@@ -4157,6 +4220,8 @@ namespace OpenWifi {
}
inline void KafkaConsumer::run() {
Utils::SetThreadName("KafkaConsumer");
cppkafka::Configuration Config({
{ "client.id", MicroService::instance().ConfigGetString("openwifi.kafka.client.id") },
{ "metadata.broker.list", MicroService::instance().ConfigGetString("openwifi.kafka.brokerlist") },
@@ -4295,6 +4360,11 @@ namespace OpenWifi {
Answer.set("certificates", Certificates);
return ReturnObject(Answer);
}
if(GetBoolParameter("extraConfiguration")) {
Poco::JSON::Object Answer;
MicroService::instance().GetExtraConfiguration(Answer);
return ReturnObject(Answer);
}
BadRequest(RESTAPI::Errors::InvalidCommand);
}
@@ -4815,7 +4885,7 @@ namespace OpenWifi {
[[nodiscard]] bool SendToUser(const std::string &userName, const std::string &Payload);
void SendToAll(const std::string &Payload);
private:
std::atomic_bool Running_ = false;
mutable std::atomic_bool Running_ = false;
Poco::Thread Thr_;
// std::unique_ptr<MyParallelSocketReactor> ReactorPool_;
Poco::Net::SocketReactor Reactor_;
@@ -4912,6 +4982,7 @@ namespace OpenWifi {
inline void WebSocketClientServer::run() {
Running_ = true ;
Utils::SetThreadName("ws:clnt-svr");
while(Running_) {
Poco::Thread::trySleep(2000);
@@ -4959,8 +5030,12 @@ namespace OpenWifi {
for(const auto &client:Clients_) {
if(client.second.second == UserName) {
if(client.second.first->Send(Payload))
Sent++;
try {
if (client.second.first->Send(Payload))
Sent++;
} catch (...) {
return false;
}
}
}
return Sent>0;
@@ -4982,70 +5057,70 @@ namespace OpenWifi {
int flags;
int n;
bool Done=false;
Poco::Buffer<char> IncomingFrame(0);
n = WS_->receiveFrame(IncomingFrame, flags);
auto Op = flags & Poco::Net::WebSocket::FRAME_OP_BITMASK;
try {
Poco::Buffer<char> IncomingFrame(0);
n = WS_->receiveFrame(IncomingFrame, flags);
auto Op = flags & Poco::Net::WebSocket::FRAME_OP_BITMASK;
if(n==0) {
return delete this;
}
if (n == 0) {
return delete this;
}
switch(Op) {
case Poco::Net::WebSocket::FRAME_OP_PING: {
WS_->sendFrame("", 0,
(int)Poco::Net::WebSocket::FRAME_OP_PONG |
(int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
}
break;
case Poco::Net::WebSocket::FRAME_OP_PONG: {
}
break;
case Poco::Net::WebSocket::FRAME_OP_CLOSE: {
Logger().warning(Poco::format("CLOSE(%s): Client is closing its connection.",Id_));
Done=true;
}
break;
case Poco::Net::WebSocket::FRAME_OP_TEXT: {
IncomingFrame.append(0);
if(!Authenticated_) {
std::string Frame{IncomingFrame.begin()};
auto Tokens = Utils::Split(Frame,':');
bool Expired = false, Contacted = false;
if(Tokens.size()==2 && AuthClient()->IsAuthorized(Tokens[1], UserInfo_, Expired, Contacted)) {
Authenticated_=true;
std::string S{"Welcome! Bienvenue! Bienvenidos!"};
WS_->sendFrame(S.c_str(),S.size());
WebSocketClientServer()->SetUser(Id_,UserInfo_.userinfo.email);
} else {
std::string S{"Invalid token. Closing connection."};
WS_->sendFrame(S.c_str(),S.size());
Done=true;
}
switch (Op) {
case Poco::Net::WebSocket::FRAME_OP_PING: {
WS_->sendFrame("", 0,
(int)Poco::Net::WebSocket::FRAME_OP_PONG |
(int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
} break;
case Poco::Net::WebSocket::FRAME_OP_PONG: {
} break;
case Poco::Net::WebSocket::FRAME_OP_CLOSE: {
Logger().warning(Poco::format("CLOSE(%s): Client is closing its connection.", Id_));
Done = true;
} break;
case Poco::Net::WebSocket::FRAME_OP_TEXT: {
IncomingFrame.append(0);
if (!Authenticated_) {
std::string Frame{IncomingFrame.begin()};
auto Tokens = Utils::Split(Frame, ':');
bool Expired = false, Contacted = false;
if (Tokens.size() == 2 &&
AuthClient()->IsAuthorized(Tokens[1], UserInfo_, Expired, Contacted)) {
Authenticated_ = true;
std::string S{"Welcome! Bienvenue! Bienvenidos!"};
WS_->sendFrame(S.c_str(), S.size());
WebSocketClientServer()->SetUser(Id_, UserInfo_.userinfo.email);
} else {
std::string S{"Invalid token. Closing connection."};
WS_->sendFrame(S.c_str(), S.size());
Done = true;
}
} else {
try {
Poco::JSON::Parser P;
auto Obj = P.parse(IncomingFrame.begin())
.extract<Poco::JSON::Object::Ptr>();
std::string Answer;
if(Processor_!= nullptr)
Processor_->Processor(Obj, Answer, Done);
if (!Answer.empty())
WS_->sendFrame(Answer.c_str(), (int) Answer.size());
else {
WS_->sendFrame("{}", 2);
}
} catch (const Poco::JSON::JSONException & E) {
Logger().log(E);
}
}
}
break;
default:
{
}
}
} else {
try {
Poco::JSON::Parser P;
auto Obj =
P.parse(IncomingFrame.begin()).extract<Poco::JSON::Object::Ptr>();
std::string Answer;
if (Processor_ != nullptr)
Processor_->Processor(Obj, Answer, Done);
if (!Answer.empty())
WS_->sendFrame(Answer.c_str(), (int)Answer.size());
else {
WS_->sendFrame("{}", 2);
}
} catch (const Poco::JSON::JSONException &E) {
Logger().log(E);
Done=true;
}
}
} break;
default: {
}
}
} catch (...) {
Done=true;
}
if(Done) {
delete this;

View File

@@ -133,6 +133,37 @@ namespace ORM {
return R;
}
inline std::string WHERE_AND_(std::string Result) {
return Result;
}
template <typename T, typename... Args> std::string WHERE_AND_(std::string Result, const char *fieldName, const T &Value, Args... args) {
if constexpr(std::is_same_v<T,std::string>)
{
if(!Value.empty()) {
if(!Result.empty())
Result += " and ";
Result += fieldName;
Result += '=';
Result += "'";
Result += Escape(Value);
Result += "'";
}
} else {
if(!Result.empty())
Result += " and ";
Result += fieldName ;
Result += '=';
Result += std::to_string(Value);
}
return WHERE_AND_(Result,args...);
}
template <typename... Args> std::string WHERE_AND(Args... args) {
std::string Result;
return WHERE_AND_(Result, args...);
}
enum SqlComparison { EQ = 0, NEQ, LT, LTE, GT, GTE };
enum SqlBinaryOp { AND = 0 , OR };

View File

@@ -445,6 +445,7 @@ namespace OpenWifi::uCentralProtocol::Events {
static const char *RECOVERY = "recovery";
static const char *TELEMETRY = "telemetry";
static const char *DEVICEUPDATE = "deviceupdate";
static const char *VENUE_BROADCAST = "venue_broadcast";
enum EVENT_MSG {
ET_UNKNOWN,
@@ -457,7 +458,8 @@ namespace OpenWifi::uCentralProtocol::Events {
ET_CFGPENDING,
ET_RECOVERY,
ET_DEVICEUPDATE,
ET_TELEMETRY
ET_TELEMETRY,
ET_VENUEBROADCAST
};
inline EVENT_MSG EventFromString(const std::string & Method) {
@@ -481,6 +483,8 @@ namespace OpenWifi::uCentralProtocol::Events {
return ET_RECOVERY;
else if(strcmp(TELEMETRY,Method.c_str())==0)
return ET_TELEMETRY;
else if(strcmp(VENUE_BROADCAST,Method.c_str())==0)
return ET_VENUEBROADCAST;
return ET_UNKNOWN;
};
}

View File

@@ -8,94 +8,75 @@
namespace OpenWifi {
RTTYS_ClientConnection::RTTYS_ClientConnection(
Poco::Net::HTTPServerRequest & Request,
Poco::Net::HTTPServerResponse & Response,
std::string &Id,
Poco::Net::SocketReactor &Reactor, Poco::Logger &L)
: Id_(std::move(Id)),
SR_(Reactor),
Logger_(L) {
WS_ = new Poco::Net::WebSocket(Request, Response);
RTTYS_server()->Register(Id_, this);
Logger().information(fmt::format("{}: Client starting connection, session: {}.",
Id_, RTTYS_server()->DeviceSessionID(Id_)));
SR_.addEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ReadableNotification>(
*this, &RTTYS_ClientConnection::onSocketReadable));
SR_.addEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ShutdownNotification>(
*this, &RTTYS_ClientConnection::onSocketShutdown));
SR_.addEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ErrorNotification>(
*this, &RTTYS_ClientConnection::onSocketError));
auto DoLogin = [this]() -> void {
int tries = 0;
while (tries < 20) {
if (RTTYS_server()->Login(this->Id_)) {
Logger().information(
fmt::format("{}: Client connected to device, session: {}.", Id_,
RTTYS_server()->DeviceSessionID(Id_)));
this->Connected_ = true;
return;
}
std::this_thread::sleep_for(2000ms);
tries++;
Logger().information(fmt::format(
"{}: Waiting for device to connect to start session. (try={})", Id_,
tries));
}
Logger().information(
fmt::format("{}: Client could not connect to device, session: {}.", Id_,
RTTYS_server()->DeviceSessionID(Id_)));
delete this;
};
std::thread CompleteConnection(DoLogin);
CompleteConnection.detach();
}
RTTYS_ClientConnection::RTTYS_ClientConnection(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response,
Poco::Net::SocketReactor &reactor,
const std::string &Id)
:
Reactor_(reactor),
Id_(Id),
Logger_(Poco::Logger::get(fmt::format("RTTY-client({})",Id_)))
{
Logger_.information("Starting connection");
Valid_ = true;
WS_ = std::make_unique<Poco::Net::WebSocket>(request,response);
Reactor_.addEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ReadableNotification>(
*this, &RTTYS_ClientConnection::onSocketReadable));
Reactor_.addEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ShutdownNotification>(
*this, &RTTYS_ClientConnection::onSocketShutdown));
}
RTTYS_ClientConnection::~RTTYS_ClientConnection() {
Logger().information(fmt::format("{}: Client disconnecting.", Id_));
RTTYS_server()->DeRegister(Id_, this);
if(Connected_) {
SR_.removeEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ReadableNotification>(
*this, &RTTYS_ClientConnection::onSocketReadable));
SR_.removeEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ShutdownNotification>(
*this, &RTTYS_ClientConnection::onSocketShutdown));
SR_.removeEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ErrorNotification>(
*this, &RTTYS_ClientConnection::onSocketError));
if(Valid_) {
MyGuard G(Mutex_);
EndConnection(false);
}
delete WS_;
Logger().information(fmt::format("{}: Client disconnected.", Id_));
}
void RTTYS_ClientConnection::Close() {
CloseConnection_ = true;
void RTTYS_ClientConnection::EndConnection(bool SendNotification) {
if(Valid_) {
Valid_=false;
try {
Reactor_.removeEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ReadableNotification>(
*this, &RTTYS_ClientConnection::onSocketReadable));
Reactor_.removeEventHandler(
*WS_, Poco::NObserver<RTTYS_ClientConnection, Poco::Net::ShutdownNotification>(
*this, &RTTYS_ClientConnection::onSocketShutdown));
// WS_->shutdown();
if (SendNotification)
RTTYS_server()->NotifyClientDisconnect(Id_, this);
} catch(...) {
}
Logger_.information("Disconnected.");
}
}
void RTTYS_ClientConnection::onSocketReadable([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ReadableNotification> &pNf) {
int flags;
auto n = WS_->receiveFrame(Buffer_, sizeof(Buffer_), flags);
auto Op = flags & Poco::Net::WebSocket::FRAME_OP_BITMASK;
switch(Op) {
MyGuard G(Mutex_);
bool MustDisconnect = false;
try {
int flags;
auto n = WS_->receiveFrame(Buffer_, sizeof(Buffer_), flags);
auto Op = flags & Poco::Net::WebSocket::FRAME_OP_BITMASK;
switch (Op) {
case Poco::Net::WebSocket::FRAME_OP_PING: {
WS_->sendFrame("", 0,(int)Poco::Net::WebSocket::FRAME_OP_PONG | (int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
}
break;
WS_->sendFrame("", 0,
(int)Poco::Net::WebSocket::FRAME_OP_PONG |
(int)Poco::Net::WebSocket::FRAME_FLAG_FIN);
} break;
case Poco::Net::WebSocket::FRAME_OP_PONG: {
}
break;
} break;
case Poco::Net::WebSocket::FRAME_OP_TEXT: {
if (n == 0)
return delete this;
std::string s((char*)Buffer_, n);
if (n == 0) {
Logger_.information("Socket readable shutdown.");
MustDisconnect = true;
} else {
std::string s((char *)Buffer_, n);
try {
auto Doc = nlohmann::json::parse(s);
if (Doc.contains("type")) {
@@ -103,55 +84,82 @@ namespace OpenWifi {
if (Type == "winsize") {
auto cols = Doc["cols"];
auto rows = Doc["rows"];
if(!RTTYS_server()->WindowSize(Id_,cols, rows)) {
return delete this;
if (!RTTYS_server()->WindowSize(Id_, cols, rows)) {
Logger_.information("Winsize shutdown.");
MustDisconnect = true;
}
}
}
} catch (...) {
// just ignore parse errors
Logger_.information("Frame text exception shutdown.");
MustDisconnect = true;
}
}
break;
} break;
case Poco::Net::WebSocket::FRAME_OP_BINARY: {
if (n == 0)
return delete this;
if(!RTTYS_server()->SendKeyStrokes(Id_,Buffer_,n)) {
return delete this;
if (n == 0) {
Logger_.information("Frame binary size shutdown.");
MustDisconnect = true;
} else {
poco_trace(Logger_, fmt::format("Sending {} key strokes to device.", n));
if (!RTTYS_server()->SendKeyStrokes(Id_, Buffer_, n)) {
Logger_.information("Sendkeystrokes shutdown.");
MustDisconnect = true;
}
}
break;
} break;
case Poco::Net::WebSocket::FRAME_OP_CLOSE: {
return delete this;
}
break;
default:
{
Logger_.information("Frame frame close shutdown.");
MustDisconnect = true;
} break;
default: {
}
}
} catch (...) {
Logger_.information("Frame readable shutdown.");
MustDisconnect = true;
}
if(MustDisconnect)
EndConnection();
}
void RTTYS_ClientConnection::SendData( const u_char *Buf, size_t len ) {
WS_->sendFrame(Buf, len, Poco::Net::WebSocket::FRAME_FLAG_FIN | Poco::Net::WebSocket::FRAME_OP_BINARY);
if(!Valid_)
return;
// MyGuard G(Mutex_);
try {
WS_->sendFrame(Buf, len,
Poco::Net::WebSocket::FRAME_FLAG_FIN |
Poco::Net::WebSocket::FRAME_OP_BINARY);
return;
} catch (...) {
Logger_.information("SendData shutdown.");
}
MyGuard G(Mutex_);
EndConnection();
}
void RTTYS_ClientConnection::SendData( const std::string &s , bool login) {
if(login) {
RTTYS_server()->LoginDone(Id_);
void RTTYS_ClientConnection::SendData( const std::string &s) {
if(!Valid_)
return;
// MyGuard G(Mutex_);
try {
WS_->sendFrame(s.c_str(), s.length());
return;
} catch (...) {
Logger_.information("SendData shutdown.");
}
WS_->sendFrame( s.c_str(), s.length());
MyGuard G(Mutex_);
EndConnection();
}
void RTTYS_ClientConnection::onSocketShutdown([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ShutdownNotification> &pNf) {
// RTTYS_server()->Close(Id_);
delete this;
}
void RTTYS_ClientConnection::onSocketError([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ErrorNotification> &pNf) {
// RTTYS_server()->Close(Id_);
delete this;
MyGuard G(Mutex_);
Logger_.information("Socket shutdown.");
EndConnection();
}
}

View File

@@ -12,31 +12,41 @@
#include "Poco/FIFOBuffer.h"
namespace OpenWifi {
enum class connection_state {
initialized, waiting_for_login, connected, aborting, shutting_down, done
};
class RTTYS_ClientConnection {
public:
// RTTYS_ClientConnection(std::unique_ptr<Poco::Net::WebSocket> WS, std::string &Id,
RTTYS_ClientConnection(Poco::Net::HTTPServerRequest &Request, Poco::Net::HTTPServerResponse &Response, std::string &Id,
Poco::Net::SocketReactor &Reactor, Poco::Logger &L);
RTTYS_ClientConnection(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response,
Poco::Net::SocketReactor & reactor,
const std::string &Id);
~RTTYS_ClientConnection();
void onSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification> &pNf);
void onSocketShutdown(const Poco::AutoPtr<Poco::Net::ShutdownNotification> &pNf);
void onSocketError(const Poco::AutoPtr<Poco::Net::ErrorNotification> &pNf);
void SendData( const u_char *Buf, size_t len );
void SendData( const std::string & S, bool login=false);
void SendData( const std::string & S );
void Close();
[[nodiscard]] inline std::string ID() { return Id_; }
[[nodiscard]] inline bool Valid() { return Valid_; }
using MyMutexType = std::recursive_mutex;
using MyGuard = std::lock_guard<MyMutexType>;
private:
Poco::Net::WebSocket *WS_= nullptr;
std::string Id_;
std::string Sid_;
Poco::Net::SocketReactor &SR_;
std::atomic_bool Connected_=false;
Poco::Logger & Logger_;
u_char Buffer_[16000]{0};
volatile bool CloseConnection_=false;
Poco::Net::SocketReactor &Reactor_;
std::string Id_;
std::unique_ptr<Poco::Net::WebSocket> WS_;
Poco::Logger &Logger_;
std::string Sid_;
std::atomic_bool Valid_=false;
u_char Buffer_[64000]{0};
MyMutexType Mutex_;
// volatile connection_state state_ = connection_state::initialized;
void EndConnection(bool SendNotification=true);
inline Poco::Logger & Logger() { return Logger_; }
};
}

View File

@@ -9,11 +9,11 @@
namespace OpenWifi {
RTTY_Client_WebSocketRequestHandler::RTTY_Client_WebSocketRequestHandler(Poco::Net::SocketReactor &R, Poco::Logger & L)
:R_(R), Logger_(L) {
RTTYS_Client_WebSocketRequestHandler::RTTYS_Client_WebSocketRequestHandler(Poco::Logger & L)
:Logger_(L) {
}
void RTTY_Client_WebSocketRequestHandler::handleRequest(Poco::Net::HTTPServerRequest &request,
void RTTYS_Client_WebSocketRequestHandler::handleRequest(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response) {
Poco::URI uri(request.getURI());
const auto & P = uri.getPath();
@@ -30,9 +30,7 @@ namespace OpenWifi {
}
try {
Poco::Thread::current()->setName(fmt::format("WebRTTYRequest_WSHandler_{}", T[2]));
new RTTYS_ClientConnection(request, response, T[2], R_, Logger_);
Logger_.information("Websocket has finished");
RTTYS_server()->CreateNewClient(request,response,T[2]);
} catch (...) {
Logger_.warning("Exception during WS creation");
}
@@ -105,9 +103,10 @@ namespace OpenWifi {
void PageRequestHandler::handleRequest(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response) {
uint64_t id = rtty_ws_id++;
Utils::SetThreadName("rt:webserver");
[[maybe_unused]] uint64_t id = rtty_ws_id++;
Logger_.information(fmt::format("{}: Starting request.",id));
poco_debug(Logger(),fmt::format("{}: Starting request.",id));
Poco::URI uri(request.getURI());
auto Path = uri.getPath();
@@ -129,7 +128,7 @@ namespace OpenWifi {
if (ParsedPath.count() > 1) {
if (ParsedPath[1] == "connect") {
response.redirect(Poco::replace(Path,"/connect/","/rtty/"));
RTTYS_server()->Logger().information(fmt::format("redirect: {}",Path));
poco_debug(Logger(),fmt::format("{}: Redirect: {}",id,Path));
return;
} else if (ParsedPath[1] == "authorized") {
SetCommonHeaders(request,response, false);
@@ -138,7 +137,7 @@ namespace OpenWifi {
response.setContentType("application/json");
std::ostream &answer = response.send();
answer << to_string(doc);
Logger_.information(fmt::format("{}: Finishing authorization request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing authorization request.",id));
return;
} else if (ParsedPath[1] == "fontsize") {
SetCommonHeaders(request,response, false);
@@ -147,7 +146,7 @@ namespace OpenWifi {
response.setContentType("application/json");
std::ostream &answer = response.send();
answer << to_string(doc);
Logger_.information(fmt::format("{}: Finishing font size request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing font size request.",id));
return;
}
}
@@ -155,12 +154,12 @@ namespace OpenWifi {
}
if(Path.find("../")!=std::string::npos) {
Logger_.information(fmt::format("{}: Finishing request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing request.",id));
return;
}
if(Path.find("~/")!=std::string::npos) {
Logger_.information(fmt::format("{}: Finishing request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing request.",id));
return;
}
@@ -170,7 +169,7 @@ namespace OpenWifi {
// std::cout << id << ": Path " << Path << " does not exist" << std::endl;
Path = RTTYS_server()->UIAssets() + "/index.html";
response.sendFile(Path,"text/html");
Logger_.information(fmt::format("{}: Finishing request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing request.",id));
return;
}
Poco::Path P(Path);
@@ -187,7 +186,7 @@ namespace OpenWifi {
} else if (Ext == "css") {
Type = "text/css; charset=utf-8";
if(IsFileGZipped(Path)) {
Logger_.information(fmt::format("{}: Downloading UI Assets.",id));
poco_debug(Logger(),fmt::format("{}: Downloading UI Assets.",id));
response.set("Content-Encoding", "gzip");
}
} else if (Ext == "ico")
@@ -201,19 +200,19 @@ namespace OpenWifi {
response.setContentLength(F.getSize());
response.sendFile(Path, Type);
Logger_.information(fmt::format("{}: Finishing request.",id));
poco_debug(Logger(),fmt::format("{}: Finishing request.",id));
}
RTTY_Client_RequestHandlerFactory::RTTY_Client_RequestHandlerFactory(Poco::Net::SocketReactor &R, Poco::Logger & L)
: Reactor_(R), Logger_(L) {}
RTTYS_Client_RequestHandlerFactory::RTTYS_Client_RequestHandlerFactory(Poco::Logger & L)
: Logger_(L) {}
Poco::Net::HTTPRequestHandler *
RTTY_Client_RequestHandlerFactory::createRequestHandler(const Poco::Net::HTTPServerRequest &request) {
RTTYS_Client_RequestHandlerFactory::createRequestHandler(const Poco::Net::HTTPServerRequest &request) {
try {
if (request.find("Upgrade") != request.end() &&
Poco::icompare(request["Upgrade"], "websocket") == 0) {
Poco::Thread::current()->setName("WebRTTYRequest_WSHandler");
return new RTTY_Client_WebSocketRequestHandler(Reactor_, Logger_);
return new RTTYS_Client_WebSocketRequestHandler(Logger_);
} else {
Poco::Thread::current()->setName("WebRTTYRequest_PageHandler");
return new PageRequestHandler(Logger_);

View File

@@ -10,15 +10,14 @@
#include "Poco/Net/WebSocket.h"
namespace OpenWifi {
class RTTY_Client_WebSocketRequestHandler : public Poco::Net::HTTPRequestHandler {
class RTTYS_Client_WebSocketRequestHandler : public Poco::Net::HTTPRequestHandler {
public:
explicit RTTY_Client_WebSocketRequestHandler(Poco::Net::SocketReactor &R, Poco::Logger &L );
explicit RTTYS_Client_WebSocketRequestHandler(Poco::Logger &L);
void handleRequest(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response) override;
private:
Poco::Net::SocketReactor &R_;
Poco::Logger &Logger_;
};
@@ -33,17 +32,17 @@ namespace OpenWifi {
private:
Poco::Logger & Logger_;
inline Poco::Logger &Logger() { return Logger_; }
};
class RTTY_Client_RequestHandlerFactory : public Poco::Net::HTTPRequestHandlerFactory {
class RTTYS_Client_RequestHandlerFactory : public Poco::Net::HTTPRequestHandlerFactory {
public:
explicit RTTY_Client_RequestHandlerFactory(Poco::Net::SocketReactor &R, Poco::Logger &L);
explicit RTTYS_Client_RequestHandlerFactory(Poco::Logger &L);
Poco::Net::HTTPRequestHandler *
createRequestHandler(const Poco::Net::HTTPServerRequest &request) override;
private:
Poco::Net::SocketReactor &Reactor_;
Poco::Logger &Logger_;
};
}

View File

@@ -4,194 +4,243 @@
#include "RTTYS_device.h"
#include "rttys/RTTYS_server.h"
#include "rttys/RTTYS_ClientConnection.h"
#include "Poco/Net/SecureStreamSocketImpl.h"
#include "Poco/Net/StreamSocket.h"
namespace OpenWifi {
RTTY_Device_ConnectionHandler::RTTY_Device_ConnectionHandler(const Poco::Net::StreamSocket & socket) :
Poco::Net::TCPServerConnection(socket),
Logger_(RTTYS_server()->Logger()) {
device_address_ = socket.address().toString();
Logger().information(fmt::format("{}: Started.", device_address_));
conn_id_ = global_device_connection_id++;
RTTYS_Device_ConnectionHandler::RTTYS_Device_ConnectionHandler(Poco::Net::StreamSocket& socket, Poco::Net::SocketReactor & reactor):
socket_(socket),
reactor_(reactor),
Logger_(Poco::Logger::get(fmt::format("RTTY-device({})",socket_.peerAddress().toString())))
{
// std::thread T([=]() { CompleteConnection(); });
// T.detach();
CompleteConnection();
}
RTTY_Device_ConnectionHandler::~RTTY_Device_ConnectionHandler() {
Logger().information(fmt::format("{}: Completing.", device_address_));
running_ = false;
RTTYS_server()->DeRegisterDevice(id_, this);
// socket().close();
Logger().information(fmt::format("{}: Completed.", device_address_));
}
void RTTYS_Device_ConnectionHandler::CompleteConnection() {
try {
valid_=true;
device_address_ = socket_.peerAddress();
void RTTY_Device_ConnectionHandler::AddCommand(u_char C) {
std::lock_guard G(M_);
// std::cout << conn_id_ << ": Adding command " << (int)C << std::endl;
commands_.push_back(C);
}
bool RTTY_Device_ConnectionHandler::ProcessCommands() {
std::lock_guard G(M_);
if(!commands_.empty()) {
// std::cout << conn_id_ << ": Commands: " << commands_.size() << std::endl;
for(const auto &i:commands_) {
// std::cout << "Command: " << (int)i << std::endl;
if(i==msgTypeLogin) {
// std::cout << "Doing login..." << std::endl;
Login();
}
else if(i==msgTypeLogout) {
// std::cout << "Doing logout..." << std::endl;
Logout();
}
auto SS = dynamic_cast<Poco::Net::SecureStreamSocketImpl *>(socket_.impl());
while (true) {
auto V = SS->completeHandshake();
if (V == 1)
break;
}
commands_.clear();
if ((SS->secure())) {
poco_information(Logger(), "Secure connection.");
}
reactor_.addEventHandler(
socket_,
Poco::NObserver<RTTYS_Device_ConnectionHandler, Poco::Net::ReadableNotification>(
*this, &RTTYS_Device_ConnectionHandler::onSocketReadable));
reactor_.addEventHandler(
socket_,
Poco::NObserver<RTTYS_Device_ConnectionHandler, Poco::Net::ShutdownNotification>(
*this, &RTTYS_Device_ConnectionHandler::onSocketShutdown));
} catch (...) {
poco_warning(Logger(), "Device caused exception while completing connection.");
Guard G(M_);
EndConnection();
}
return true;
}
RTTYS_Device_ConnectionHandler::~RTTYS_Device_ConnectionHandler() {
if(valid_) {
Guard G(M_);
poco_warning(Logger(), "Device connection being deleted.");
EndConnection(false);
}
}
void RTTY_Device_ConnectionHandler::run() {
running_ = true ;
void RTTYS_Device_ConnectionHandler::EndConnection(bool SendNotification) {
try {
if(valid_) {
valid_ = false;
reactor_.removeEventHandler(
socket_,
Poco::NObserver<RTTYS_Device_ConnectionHandler, Poco::Net::ReadableNotification>(
*this, &RTTYS_Device_ConnectionHandler::onSocketReadable));
reactor_.removeEventHandler(
socket_,
Poco::NObserver<RTTYS_Device_ConnectionHandler, Poco::Net::ShutdownNotification>(
*this, &RTTYS_Device_ConnectionHandler::onSocketShutdown));
if(SendNotification)
RTTYS_server()->NotifyDeviceDisconnect(Id_,this);
poco_information(Logger(), "Connection done.");
socket_.close();
}
} catch (...) {
Poco::Timespan pollTimeOut(0,100);
Poco::Timespan pollError(0,1);
Poco::Timespan recvTimeOut(120,0);
}
}
socket().setKeepAlive(true);
socket().setNoDelay(true);
socket().setReceiveBufferSize(64000);
socket().setLinger(false,0);
socket().setSendBufferSize(64000);
socket().setReceiveTimeout(recvTimeOut);
[[maybe_unused]] static void dump(unsigned char *p,uint l) {
for(uint i=0;i<l;i++) {
std::cout << std::hex << (uint) p[i] << " ";
if(i % 16 == 0)
std::cout << std::endl;
}
std::cout << std::dec << std::endl ;
}
int reason=0;
while(running_) {
void RTTYS_Device_ConnectionHandler::onSocketReadable([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ReadableNotification> &pNf) {
bool good = true;
if(!ProcessCommands()) {
reason=1;
running_=false;
break;
Guard G(M_);
try {
auto received_bytes = socket_.receiveBytes(inBuf_);
if (received_bytes == 0) {
poco_information(Logger(), fmt::format("{}: Device Closing connection - 0 bytes received.",Id_));
return EndConnection();
}
// std::lock_guard G(M_);
if (socket().poll(pollError, Poco::Net::Socket::SELECT_ERROR) == true) {
reason=2;
running_=false;
continue;
}
while (inBuf_.isReadable() && good) {
uint32_t msg_len = 0;
if (waiting_for_bytes_ != 0) {
if (socket().poll(pollTimeOut, Poco::Net::Socket::SELECT_READ) == false) {
continue;
}
int received = socket().receiveBytes(inBuf_);
if(received<0) {
running_ = false;
reason=3;
continue;
}
if(received==0) {
continue;
}
while (!inBuf_.isEmpty() && running_) {
// std::cout << conn_id_ << ": processing buffer" << std::endl;
std::size_t msg_len;
if (waiting_for_bytes_ == 0) {
u_char header[3]{0};
inBuf_.read((char *)&header[0], 3);
last_command_ = header[0];
msg_len = header[1] * 256 + header[2];
} else {
msg_len = received;
if (inBuf_.used() >= 3) {
auto *head = (unsigned char *)inBuf_.begin();
last_command_ = head[0];
msg_len = head[1] * 256 + head[2];
inBuf_.drain(3);
} else {
good = false;
if (!good)
std::cout << "do_msgTypeTermData:5 " << inBuf_.used() << std::endl;
continue;
}
}
switch (last_command_) {
case msgTypeRegister: {
do_msgTypeRegister(msg_len);
good = do_msgTypeRegister(msg_len);
} break;
case msgTypeLogin: {
do_msgTypeLogin(msg_len);
good = do_msgTypeLogin(msg_len);
} break;
case msgTypeLogout: {
do_msgTypeLogout(msg_len);
good = do_msgTypeLogout(msg_len);
} break;
case msgTypeTermData: {
do_msgTypeTermData(msg_len);
good = do_msgTypeTermData(msg_len);
} break;
case msgTypeWinsize: {
do_msgTypeWinsize(msg_len);
good = do_msgTypeWinsize(msg_len);
} break;
case msgTypeCmd: {
do_msgTypeCmd(msg_len);
good = do_msgTypeCmd(msg_len);
} break;
case msgTypeHeartbeat: {
do_msgTypeHeartbeat(msg_len);
good = do_msgTypeHeartbeat(msg_len);
} break;
case msgTypeFile: {
do_msgTypeFile(msg_len);
good = do_msgTypeFile(msg_len);
} break;
case msgTypeHttp: {
do_msgTypeHttp(msg_len);
good = do_msgTypeHttp(msg_len);
} break;
case msgTypeAck: {
do_msgTypeAck(msg_len);
good = do_msgTypeAck(msg_len);
} break;
case msgTypeMax: {
do_msgTypeMax(msg_len);
good = do_msgTypeMax(msg_len);
} break;
default:
Logger().warning(fmt::format("{}: ID:{} Unknown command {}", conn_id_, id_, (int)last_command_));
running_ = false;
continue;
default: {
poco_warning(Logger(),
fmt::format("{}: Unknown command {} from device. GW closing connection.", Id_,
(int)last_command_));
good = false;
}
}
}
} catch (const Poco::Exception &E) {
good = false;
Logger().log(E,__FILE__,__LINE__);
poco_warning(Logger(),fmt::format("{}: Exception. GW closing connection.", Id_));
} catch (const std::exception &E) {
poco_warning(Logger(),fmt::format("{}: Exception. GW closing connection.", Id_));
good = false;
}
if(!good) {
return EndConnection();
}
}
void RTTYS_Device_ConnectionHandler::onSocketShutdown([[maybe_unused]] const Poco::AutoPtr<Poco::Net::ShutdownNotification>& pNf) {
Guard G(M_);
poco_information(Logger(),fmt::format("{}: Connection being closed - socket shutdown.",Id_));
EndConnection();
}
bool RTTYS_Device_ConnectionHandler::SendToClient(const u_char *Buf, int Len) {
return RTTYS_server()->SendToClient(Id_, Buf, Len);
}
bool RTTYS_Device_ConnectionHandler::SendToClient(const std::string &S) {
return RTTYS_server()->SendToClient(Id_, S);
}
bool RTTYS_Device_ConnectionHandler::KeyStrokes(const u_char *buf, size_t len) {
if(!valid_)
return false;
if(len<=(sizeof(small_buf_)-3)) {
small_buf_[0] = msgTypeTermData;
small_buf_[1] = (len & 0xff00) >> 8;
small_buf_[2] = (len & 0x00ff);
memcpy(&small_buf_[3],buf,len);
try {
socket_.sendBytes(small_buf_,len+3);
return true;
} catch (...) {
return false;
}
} else {
auto Msg = std::make_unique<unsigned char []>(len + 3);
Msg.get()[0] = msgTypeTermData;
Msg.get()[1] = (len & 0xff00) >> 8;
Msg.get()[2] = (len & 0x00ff);
memcpy((void *)(Msg.get() + 3), buf, len);
try {
socket_.sendBytes(Msg.get(), len + 3);
return true;
} catch (...) {
return false;
}
}
Logger().information(fmt::format("{}: ID:{} Exiting. Reason:{}", conn_id_, id_, reason));
// RTTYS_server()->DeRegister(id_, this);
// Logger().information(fmt::format("{}: ID:{} Exiting. Deregistered.", conn_id_, id_, reason));
loop_done_=true;
}
/*
unsigned char Msg[64];
Msg[0] = msgTypeTermData;
Msg[1] = (len & 0xff00) >> 8;
Msg[2] = (len & 0x00ff);
void RTTY_Device_ConnectionHandler::Stop() {
running_ = false;
}
void RTTY_Device_ConnectionHandler::SendToClient(const u_char *Buf, int Len) {
RTTYS_server()->SendToClient(id_, Buf, Len);
}
void RTTY_Device_ConnectionHandler::SendToClient(const std::string &S) {
RTTYS_server()->SendToClient(id_, S);
}
bool RTTY_Device_ConnectionHandler::KeyStrokes(const u_char *buf, size_t len) {
std::lock_guard G(M_);
u_char outBuf[16]{0};
if(len>(sizeof(outBuf)-5))
return false;
auto total_len = 3 + 1 + len-1;
outBuf[0] = msgTypeTermData;
outBuf[1] = 0 ;
outBuf[2] = len +1-1;
outBuf[3] = sid_;
memcpy( &outBuf[4], &buf[1], len-1);
Poco::Net::SocketBufVec MsgParts{ Poco::Net::SocketBuf{ .iov_base=Msg, .iov_len=3},
Poco::Net::SocketBuf{ .iov_base=(unsigned char *)buf, .iov_len=len}};
try {
socket().sendBytes(outBuf, total_len);
socket_.sendBytes(MsgParts);
return true;
} catch (...) {
return false;
}
return false;
*/
}
bool RTTY_Device_ConnectionHandler::WindowSize(int cols, int rows) {
std::lock_guard G(M_);
bool RTTYS_Device_ConnectionHandler::WindowSize(int cols, int rows) {
if(!valid_)
return false;
// Guard G(M_);
u_char outBuf[8]{0};
outBuf[0] = msgTypeWinsize;
outBuf[1] = 0 ;
@@ -202,7 +251,7 @@ namespace OpenWifi {
outBuf[6] = rows >> 8;
outBuf[7] = rows & 0x00ff;
try {
socket().sendBytes(outBuf, 8);
socket_.sendBytes(outBuf, 8);
return true;
} catch (...) {
@@ -210,35 +259,40 @@ namespace OpenWifi {
return false;
}
bool RTTY_Device_ConnectionHandler::Login() {
std::lock_guard G(M_);
bool RTTYS_Device_ConnectionHandler::Login() {
if(!valid_)
return false;
// Guard G(M_);
u_char outBuf[3]{0};
outBuf[0] = msgTypeLogin;
outBuf[1] = 0;
outBuf[2] = 0;
try {
socket().sendBytes(outBuf, 3);
socket_.sendBytes(outBuf, 3);
} catch (const Poco::IOException &E) {
// std::cout << "1 " << E.what() << " " << E.name() << " "<< E.className() << " "<< E.message() << std::endl;
return false;
} catch (const Poco::Exception &E) {
// std::cout << "2 " << E.what() << " " << E.name() << std::endl;
return false;
}
Logger().debug(fmt::format("{}: Device {} login", conn_id_, id_));
poco_information(Logger(),fmt::format("{}: Device login", Id_));
return true;
}
bool RTTY_Device_ConnectionHandler::Logout() {
std::lock_guard G(M_);
bool RTTYS_Device_ConnectionHandler::Logout() {
if(!valid_)
return false;
Guard G(M_);
u_char outBuf[4]{0};
outBuf[0] = msgTypeLogout;
outBuf[1] = 0;
outBuf[2] = 1;
outBuf[3] = sid_;
Logger().debug(fmt::format("{}: ID:{} Logout", conn_id_, id_));
poco_information(Logger(),fmt::format("{}: Logout", Id_));
try {
socket().sendBytes(outBuf, 4);
socket_.sendBytes(outBuf, 4);
return true;
} catch (...) {
@@ -246,7 +300,7 @@ namespace OpenWifi {
return false;
}
std::string RTTY_Device_ConnectionHandler::ReadString() {
std::string RTTYS_Device_ConnectionHandler::ReadString() {
std::string Res;
while(inBuf_.used()) {
@@ -261,16 +315,16 @@ namespace OpenWifi {
return Res;
}
void RTTY_Device_ConnectionHandler::do_msgTypeRegister([[maybe_unused]] std::size_t msg_len) {
socket().receiveBytes(inBuf_);
id_ = ReadString();
desc_ = ReadString();
token_ = ReadString();
serial_ = RTTYS_server()->SerialNumber(id_);
bool RTTYS_Device_ConnectionHandler::do_msgTypeRegister([[maybe_unused]] std::size_t msg_len) {
bool good = true;
try {
Id_ = ReadString();
desc_ = ReadString();
token_ = ReadString();
Poco::Thread::current()->setName(fmt::format("RTTY-device-thread-{}:{}:{}", conn_id_, id_, serial_));
Logger().debug(fmt::format("{}: ID:{} Serial:{} Description:{} Device registration", conn_id_, id_, serial_, desc_));
if (RTTYS_server()->Register(id_, token_, this)) {
poco_information(Logger(),
fmt::format("{}: Description:{} Device registration", Id_, desc_));
RTTYS_server()->NotifyDeviceRegistration(Id_,token_,this);
u_char OutBuf[8];
OutBuf[0] = msgTypeRegister;
OutBuf[1] = 0;
@@ -279,18 +333,20 @@ namespace OpenWifi {
OutBuf[4] = 'O';
OutBuf[5] = 'K';
OutBuf[6] = 0;
if(socket().sendBytes(OutBuf, 7) !=7) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Description:{} Could not complete registration", conn_id_, id_, serial_, desc_));
running_ = false;
if (socket_.sendBytes(OutBuf, 7) != 7) {
poco_information(Logger(),
fmt::format("{}: Description:{} Could not send data to complete registration",
Id_, desc_));
good = false;
}
} else {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Description:{} Could not complete registration", conn_id_, id_, serial_, desc_));
running_ = false;
} catch (...) {
good = false;
}
return good;
}
void RTTY_Device_ConnectionHandler::do_msgTypeLogin([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for login", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeLogin([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for login", Id_));
nlohmann::json doc;
char Error;
inBuf_.read(&Error, 1);
@@ -298,62 +354,79 @@ namespace OpenWifi {
doc["type"] = "login";
doc["err"] = Error;
const auto login_msg = to_string(doc);
SendToClient(login_msg);
return SendToClient(login_msg);
}
void RTTY_Device_ConnectionHandler::do_msgTypeLogout([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for logout", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeLogout([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for logout", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeTermData(std::size_t msg_len) {
if(waiting_for_bytes_!=0) {
auto to_read = std::min(inBuf_.used(),waiting_for_bytes_);
inBuf_.read(&scratch_[0], to_read);
SendToClient((u_char *)&scratch_[0], (int) to_read);
if(to_read<waiting_for_bytes_)
waiting_for_bytes_ -= to_read;
else
bool RTTYS_Device_ConnectionHandler::do_msgTypeTermData(std::size_t msg_len) {
bool good;
if(waiting_for_bytes_>0) {
if(inBuf_.used()<waiting_for_bytes_) {
waiting_for_bytes_ = waiting_for_bytes_ - inBuf_.used();
good = SendToClient((unsigned char *)inBuf_.begin(), (int) inBuf_.used());
if(!good) std::cout << "do_msgTypeTermData:1" << std::endl;
inBuf_.drain();
} else {
good = SendToClient((unsigned char *)inBuf_.begin(), waiting_for_bytes_);
if(!good) std::cout << "do_msgTypeTermData:2" << std::endl;
inBuf_.drain(waiting_for_bytes_);
waiting_for_bytes_ = 0 ;
}
} else {
if(inBuf_.used()<msg_len) {
auto read_count = inBuf_.read(&scratch_[0], inBuf_.used());
SendToClient((u_char *)&scratch_[0], read_count);
waiting_for_bytes_ = msg_len - read_count;
good = SendToClient((unsigned char *)inBuf_.begin(), inBuf_.used());
if(!good) std::cout << "do_msgTypeTermData:3" << std::endl;
waiting_for_bytes_ = msg_len - inBuf_.used();
inBuf_.drain();
} else {
inBuf_.read(&scratch_[0], msg_len);
SendToClient((u_char *)&scratch_[0], (int)msg_len);
waiting_for_bytes_=0;
waiting_for_bytes_ = 0 ;
good = SendToClient((unsigned char *)inBuf_.begin(), msg_len);
if(!good) std::cout << "do_msgTypeTermData:4" << std::endl;
inBuf_.drain(msg_len);
}
}
return good;
}
void RTTY_Device_ConnectionHandler::do_msgTypeWinsize([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeWinsize", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeWinsize([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeWinsize", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeCmd([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeCmd", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeCmd([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeCmd", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeHeartbeat([[maybe_unused]] std::size_t msg_len) {
bool RTTYS_Device_ConnectionHandler::do_msgTypeHeartbeat([[maybe_unused]] std::size_t msg_len) {
// if(!RTTYS_server()->ValidClient(Id_))
// return false;
u_char MsgBuf[3]{0};
MsgBuf[0] = msgTypeHeartbeat;
socket().sendBytes(MsgBuf, 3);
return socket_.sendBytes(MsgBuf, 3)==3;
}
void RTTY_Device_ConnectionHandler::do_msgTypeFile([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeFile", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeFile([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeFile", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeHttp([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeHttp", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeHttp([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeHttp", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeAck([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeAck", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeAck([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeAck", Id_));
return true;
}
void RTTY_Device_ConnectionHandler::do_msgTypeMax([[maybe_unused]] std::size_t msg_len) {
Logger().debug(fmt::format("{}: ID:{} Serial:{} Asking for msgTypeMax", conn_id_, id_, serial_));
bool RTTYS_Device_ConnectionHandler::do_msgTypeMax([[maybe_unused]] std::size_t msg_len) {
poco_information(Logger(),fmt::format("{}: Asking for msgTypeMax", Id_));
return true;
}
}

View File

@@ -7,78 +7,79 @@
#include <array>
#include "framework/MicroService.h"
#include "Poco/FIFOBuffer.h"
#include "Poco/Net/TCPServerConnectionFactory.h"
namespace OpenWifi {
inline static const std::size_t RTTY_DEVICE_BUFSIZE=64000;
constexpr std::size_t RTTY_DEVICE_BUFSIZE=64000;
inline static std::atomic_uint64_t global_device_connection_id = 1;
class RTTYS_Device_ConnectionHandler{
public:
enum RTTY_MSG_TYPE {
msgTypeRegister = 0,
msgTypeLogin,
msgTypeLogout,
msgTypeTermData,
msgTypeWinsize,
msgTypeCmd,
msgTypeHeartbeat,
msgTypeFile,
msgTypeHttp,
msgTypeAck,
msgTypeMax };
class RTTY_Device_ConnectionHandler : public Poco::Net::TCPServerConnection {
public:
enum RTTY_MSG_TYPE {
msgTypeRegister = 0,
msgTypeLogin,
msgTypeLogout,
msgTypeTermData,
msgTypeWinsize,
msgTypeCmd,
msgTypeHeartbeat,
msgTypeFile,
msgTypeHttp,
msgTypeAck,
msgTypeMax };
explicit RTTYS_Device_ConnectionHandler(Poco::Net::StreamSocket& socket, Poco::Net::SocketReactor& reactor);
~RTTYS_Device_ConnectionHandler();
explicit RTTY_Device_ConnectionHandler(const Poco::Net::StreamSocket & socket) ;
~RTTY_Device_ConnectionHandler();
bool Login();
bool Logout();
void run() final;
bool Login();
bool Logout();
void Stop();
[[nodiscard]] bool SendToClient(const u_char *buf, int len);
[[nodiscard]] bool SendToClient(const std::string &S);
[[nodiscard]] bool WindowSize(int cols, int rows);
[[nodiscard]] bool KeyStrokes(const u_char *buf, size_t len);
std::string ReadString();
// inline auto SessionID() const { return conn_id_; }
void SendToClient(const u_char *buf, int len);
void SendToClient(const std::string &S);
bool WindowSize(int cols, int rows);
bool KeyStrokes(const u_char *buf, size_t len);
std::string ReadString();
inline auto SessionID() const { return conn_id_; }
void AddCommand(u_char C);
void onSocketReadable(const Poco::AutoPtr<Poco::Net::ReadableNotification>& pNf);
void onSocketShutdown(const Poco::AutoPtr<Poco::Net::ShutdownNotification>& pNf);
private:
std::atomic_bool running_=false;
volatile std::atomic_bool loop_done_=false;
std::string device_address_;
std::recursive_mutex M_;
Poco::Logger &Logger_;
std::string id_;
std::string token_;
std::string desc_;
std::string serial_;
char sid_=0;
Poco::FIFOBuffer inBuf_{64000};
std::array<char,32000> scratch_{0};
std::size_t waiting_for_bytes_{0};
u_char last_command_=0;
uint64_t conn_id_=0;
std::vector<u_char> commands_;
using My_mutex_type = std::recursive_mutex;
using Guard = std::lock_guard<My_mutex_type>;
inline Poco::Logger & Logger() { return Logger_; }
inline Poco::Logger &Logger() { return Logger_; }
inline bool Valid() { return valid_; }
void do_msgTypeRegister(std::size_t msg_len);
void do_msgTypeLogin(std::size_t msg_len);
void do_msgTypeLogout(std::size_t msg_len);
void do_msgTypeTermData(std::size_t msg_len);
void do_msgTypeWinsize(std::size_t msg_len);
void do_msgTypeCmd(std::size_t msg_len);
void do_msgTypeHeartbeat(std::size_t msg_len);
void do_msgTypeFile(std::size_t msg_len);
void do_msgTypeHttp(std::size_t msg_len);
void do_msgTypeAck(std::size_t msg_len);
void do_msgTypeMax(std::size_t msg_len);
private:
Poco::Net::StreamSocket socket_;
Poco::Net::SocketReactor &reactor_;
Poco::FIFOBuffer inBuf_{RTTY_DEVICE_BUFSIZE};
Poco::Logger &Logger_;
bool ProcessCommands();
};
std::atomic_bool valid_=false;
Poco::Net::SocketAddress device_address_;
My_mutex_type M_;
std::string Id_;
std::string token_;
std::string desc_;
char sid_=0;
std::size_t waiting_for_bytes_{0};
u_char last_command_=0;
unsigned char small_buf_[64];
void EndConnection(bool SendNotification=true) ;
void CompleteConnection();
[[nodiscard]] bool do_msgTypeRegister(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeLogin(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeLogout(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeTermData(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeWinsize(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeCmd(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeHeartbeat(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeFile(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeHttp(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeAck(std::size_t msg_len);
[[nodiscard]] bool do_msgTypeMax(std::size_t msg_len);
};
}

View File

@@ -24,11 +24,11 @@ namespace OpenWifi {
auto TcpServerParams = new Poco::Net::TCPServerParams();
TcpServerParams->setMaxThreads(50);
TcpServerParams->setMaxQueued(100);
TcpServerParams->setThreadIdleTime(Poco::Timespan(10,0));
if(MicroService::instance().NoAPISecurity()) {
Poco::Net::ServerSocket DeviceSocket(DSport, 64);
DeviceSocket.setNoDelay(true);
DeviceAcceptor_ = std::make_unique<Poco::Net::TCPServer>(new Poco::Net::TCPServerConnectionFactoryImpl<RTTY_Device_ConnectionHandler>(), DeviceSocket, TcpServerParams);
DeviceAcceptor_ = std::make_unique<Poco::Net::SocketAcceptor<RTTYS_Device_ConnectionHandler>>(DeviceSocket,DeviceReactor_);
} else {
auto DeviceSecureContext = new Poco::Net::Context(Poco::Net::Context::SERVER_USE,
KeyFileName, CertFileName, "",
@@ -44,10 +44,10 @@ namespace OpenWifi {
SSL_CTX_dane_enable(SSLCtxDevice);
Poco::Net::SecureServerSocket DeviceSocket(DSport, 64, DeviceSecureContext);
DeviceSocket.setNoDelay(true);
DeviceAcceptor_ = std::make_unique<Poco::Net::TCPServer>(new Poco::Net::TCPServerConnectionFactoryImpl<RTTY_Device_ConnectionHandler>(), DeviceSocket, TcpServerParams);
DeviceAcceptor_ = std::make_unique<Poco::Net::SocketAcceptor<RTTYS_Device_ConnectionHandler>>(DeviceSocket,DeviceReactor_);
}
DeviceAcceptor_->start();
DeviceReactorThread_.start(DeviceReactor_);
Utils::SetThreadName(DeviceReactorThread_,"rt:devreactor");
auto WebServerHttpParams = new Poco::Net::HTTPServerParams;
WebServerHttpParams->setMaxThreads(50);
@@ -57,7 +57,7 @@ namespace OpenWifi {
if(MicroService::instance().NoAPISecurity()) {
Poco::Net::ServerSocket ClientSocket(CSport, 64);
ClientSocket.setNoDelay(true);
WebServer_ = std::make_unique<Poco::Net::HTTPServer>(new RTTY_Client_RequestHandlerFactory(ClientReactor_, Logger()), ClientSocket, WebServerHttpParams);
WebServer_ = std::make_unique<Poco::Net::HTTPServer>(new RTTYS_Client_RequestHandlerFactory(Logger()), ClientSocket, WebServerHttpParams);
} else {
auto WebClientSecureContext = new Poco::Net::Context(Poco::Net::Context::SERVER_USE, KeyFileName, CertFileName,
"", Poco::Net::Context::VERIFY_RELAXED);
@@ -73,300 +73,232 @@ namespace OpenWifi {
Poco::Net::SecureServerSocket ClientSocket(CSport, 64, WebClientSecureContext);
ClientSocket.setNoDelay(true);
WebServer_ = std::make_unique<Poco::Net::HTTPServer>(new RTTY_Client_RequestHandlerFactory(ClientReactor_, Logger()), ClientSocket, WebServerHttpParams);
WebServer_ = std::make_unique<Poco::Net::HTTPServer>(new RTTYS_Client_RequestHandlerFactory(Logger()), ClientSocket, WebServerHttpParams);
};
WebServer_->start();
ClientReactorThread_.setName("RTTYWebServerClientThread");
ClientReactorThread_.start(ClientReactor_);
Utils::SetThreadName(ClientReactorThread_,"rt:clntreactor");
}
GCCallBack_ = std::make_unique<Poco::TimerCallback<RTTYS_server>>(*this, &RTTYS_server::onTimer);
Timer_.setStartInterval(10 * 1000); // first run in 30 seconds
Timer_.setPeriodicInterval(1 * 60 * 1000);
Timer_.setStartInterval(30 * 1000); // first run in 30 seconds
Timer_.setPeriodicInterval(20 * 1000);
Timer_.start(*GCCallBack_);
NotificationManager_.start(*this);
return 0;
}
void RTTYS_server::Stop() {
if(Internal_) {
NotificationManagerRunning_=false;
ResponseQueue_.wakeUpAll();
NotificationManager_.wakeUp();
NotificationManager_.join();
Timer_.stop();
WebServer_->stopAll();
DeviceAcceptor_->stop();
WebServer_->stop();
DeviceAcceptor_->unregisterAcceptor();
DeviceReactor_.stop();
DeviceReactorThread_.join();
ClientReactor_.stop();
ClientReactorThread_.join();
}
}
void RTTYS_server::onTimer([[maybe_unused]] Poco::Timer & timer) {
Logger().debug("Removing stale RTTY connection information.");
std::lock_guard G(Mutex_);
auto now = OpenWifi::Now();
dump("GC ", std::cout);
for(auto element=EndPoints_.begin();element!=EndPoints_.end();) {
if( element->second.ShutdownComplete ||
(element->second.ShuttingDown && (now-element->second.TimeStamp>60))) {
poco_debug(Logger(),"Removing stale connections.");
Utils::SetThreadName("rt:janitor");
static int count = 0;
// MutexLockerDbg L(__func__ ,M_);
std::unique_lock G(M_);
for(auto element=EndPoints_.begin();element!=EndPoints_.end();) {
if(element->second->TooOld()) {
auto c = fmt::format("Removing {}. Serial: {} Device connection time: {}s. Client connection time: {}s",
element->first,
element->second->SerialNumber(),
element->second->TimeDeviceConnected(),
element->second->TimeClientConnected());
Logger().information(c);
TotalConnectedClientTime_ += element->second->TimeClientConnected();
TotalConnectedDeviceTime_ += element->second->TimeDeviceConnected();
element = EndPoints_.erase(element);
} else {
++element;
}
}
dump("GC ", std::cout);
FailedDevices.clear();
FailedClients.clear();
count++;
if(count==10) {
count=0;
Logger().information(fmt::format("Total connections:{} Total Device Connection Time: {}s Total Client Connection Time: {}s Device failures: {} Client failures: {}",
TotalEndPoints_,
TotalConnectedDeviceTime_,
TotalConnectedClientTime_,
FaildedNumDevices_,
FailedNumClients_));
}
}
void RTTYS_server::Register(const std::string &Id, RTTYS_ClientConnection *Client) {
std::lock_guard G(Mutex_);
dump("C REG--> ", std::cout);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end()) {
It->second.Client = Client;
It->second.ClientConnected = OpenWifi::Now();
dump("C REG--> ", std::cout);
}
dump("C Already REG--> ", std::cout);
void RTTYS_server::CreateNewClient(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response, const std::string &id) {
auto NewClient = new RTTYS_ClientConnection(request, response, ClientReactor_, id);
NotifyClientRegistration(id,NewClient);
}
bool RTTYS_server::Register(const std::string &Id, const std::string &Token, RTTY_Device_ConnectionHandler *Device) {
std::lock_guard G(Mutex_);
dump("D REG--> ", std::cout);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end()) {
It->second.Device = Device;
It->second.Token = Token;
It->second.DeviceConnected = OpenWifi::Now();
Logger().information(fmt::format("Creating session: {}, device:'{}'",Id,It->second.SerialNumber));
dump("D REG--> ", std::cout);
return true;
void RTTYS_server::run() {
Utils::SetThreadName("rtty-mgr");
NotificationManagerRunning_ = true;
Poco::AutoPtr<Poco::Notification> NextNotification(ResponseQueue_.waitDequeueNotification());
while (NextNotification && NotificationManagerRunning_) {
auto Notification = dynamic_cast<RTTYS_Notification *>(NextNotification.get());
if (Notification != nullptr) {
std::unique_lock G(M_);
auto It = EndPoints_.find(Notification->id_);
if (It != EndPoints_.end()) {
switch (Notification->type_) {
case RTTYS_Notification_type::device_disconnection: {
It->second->DisconnectDevice();
} break;
case RTTYS_Notification_type::client_disconnection: {
It->second->DisconnectClient();
} break;
case RTTYS_Notification_type::device_registration: {
auto ptr = std::unique_ptr<RTTYS_Device_ConnectionHandler>{Notification->device_};
It->second->SetDevice(std::move(ptr));
if(!It->second->Joined() && It->second->ValidClient()) {
It->second->Join();
It->second->Login();
}
} break;
case RTTYS_Notification_type::client_registration: {
auto ptr = std::unique_ptr<RTTYS_ClientConnection>{Notification->client_};
It->second->SetClient(std::move(ptr));
if(!It->second->Joined() && It->second->ValidDevice()) {
It->second->Join();
It->second->Login();
}
} break;
case RTTYS_Notification_type::unknown: {
} break;
};
} else {
if(Notification->type_==RTTYS_Notification_type::device_registration) {
FaildedNumDevices_++;
auto ptr = std::unique_ptr<RTTYS_Device_ConnectionHandler>{Notification->device_};
FailedDevices.push_back(std::move(ptr));
} else if(Notification->type_==RTTYS_Notification_type::client_registration) {
FailedNumClients_++;
auto ptr = std::unique_ptr<RTTYS_ClientConnection>{Notification->client_};
FailedClients.push_back(std::move(ptr));
}
}
}
NextNotification = ResponseQueue_.waitDequeueNotification();
}
dump("D Already REG--> ", std::cout);
return false;
}
bool RTTYS_server::SendToClient(const std::string &Id, const u_char *Buf, std::size_t Len) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end() && It->second.Client!= nullptr) {
It->second.Client->SendData(Buf,Len);
return true;
std::shared_lock Guard(M_);
try {
auto It = EndPoints_.find(Id);
if (It != EndPoints_.end()) {
return It->second->SendToClient(Buf,Len);
}
} catch(const Poco::Exception &E) {
Logger().log(E);
} catch (...) {
std::cout << "Exception in SendToClient 1" << std::endl;
}
return false;
}
bool RTTYS_server::SendToClient(const std::string &Id, const std::string &s) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end() && It->second.Client!= nullptr) {
It->second.Client->SendData(s);
return true;
std::shared_lock Guard(M_);
try {
auto It = EndPoints_.find(Id);
if (It != EndPoints_.end()) {
return It->second->SendToClient(s);
}
} catch(const Poco::Exception &E) {
Logger().log(E);
} catch (...) {
std::cout << "Exception in SendToClient 2" << std::endl;
}
return false;
}
void RTTYS_server::DeRegister(const std::string &Id, RTTYS_ClientConnection *Client) {
std::lock_guard G(Mutex_);
dump("C DEREG--> ", std::cout);
bool RTTYS_server::ValidClient(const std::string &Id) {
std::shared_lock Guard(M_);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end() && It->second.Client==Client) {
if(It->second.Device!= nullptr) {
if(!It->second.ShuttingDown) {
It->second.ShuttingDown = true;
It->second.Device->Stop();
} else {
It->second.ShutdownComplete = true;
}
} else {
if(!It->second.ShuttingDown) {
It->second.ShuttingDown = true;
} else {
It->second.ShutdownComplete = true;
}
}
It->second.ClientConnected=0;
It->second.Client= nullptr;
}
dump("C DEREG--> ", std::cout);
return It!=EndPoints_.end() && It->second->ValidClient();
}
void RTTYS_server::DeRegisterDevice(const std::string &Id, RTTY_Device_ConnectionHandler *Device) {
std::lock_guard G(Mutex_);
dump("D DEREG--> ", std::cout);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end() && It->second.Device==Device) {
It->second.Device = nullptr;
It->second.DeviceConnected = 0 ;
if(It->second.Client!=nullptr) {
if(!It->second.ShuttingDown) {
It->second.ShuttingDown = true;
It->second.Client->Close();
} else {
It->second.ShutdownComplete = true;
}
} else {
if(!It->second.ShuttingDown) {
It->second.ShuttingDown = true;
} else {
It->second.ShutdownComplete = true;
}
}
}
bool RTTYS_server::SendKeyStrokes(const std::string &Id, const u_char *buffer, std::size_t len) {
std::shared_lock Guard(M_);
dump("D DEREG--> ", std::cout);
if(Device!= nullptr) {
for (auto i = EndPoints_.begin(); i != EndPoints_.end(); i++) {
if (i->second.Device == Device) {
EndPoints_.erase(i);
break;
}
}
dump("D DEREG--> ", std::cout);
}
}
bool RTTYS_server::SendKeyStrokes(const std::string &Id, const u_char *buffer, std::size_t s) {
std::lock_guard G(Mutex_);
auto It=EndPoints_.find(Id);
if(It==EndPoints_.end()) {
return false;
}
if(It->second.Device!= nullptr)
return It->second.Device->KeyStrokes(buffer,s);
try {
return It->second->KeyStrokes(buffer, len);
} catch(const Poco::Exception &E) {
Logger().log(E);
} catch (...) {
}
return false;
}
bool RTTYS_server::WindowSize(const std::string &Id, int cols, int rows) {
std::lock_guard G(Mutex_);
std::shared_lock Guard(M_);
auto It=EndPoints_.find(Id);
if(It==EndPoints_.end()) {
return false;
}
if(It->second.Device!= nullptr)
return It->second.Device->WindowSize(cols,rows);
try {
return It->second->WindowSize(cols,rows);
} catch(const Poco::Exception &E) {
Logger().log(E);
} catch (...) {
}
return false;
}
bool RTTYS_server::CreateEndPoint(const std::string &Id, const std::string & Token, const std::string & UserName, const std::string & SerialNumber ) {
std::lock_guard G(Mutex_);
std::unique_lock Guard(M_);
EndPoint E;
E.ShuttingDown = false;
E.Token = Token;
E.TimeStamp = OpenWifi::Now();
E.SerialNumber = SerialNumber;
E.UserName = UserName;
EndPoints_[Id] = E;
auto NewEP = std::make_unique<RTTYS_EndPoint>(Token, SerialNumber, UserName );
EndPoints_[Id] = std::move(NewEP);
++TotalEndPoints_;
return true;
}
std::string RTTYS_server::SerialNumber(const std::string & Id) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It==EndPoints_.end())
return "";
return It->second.SerialNumber;
}
bool RTTYS_server::ValidId(const std::string &Token) {
std::lock_guard G(Mutex_);
std::shared_lock Guard(M_);
return EndPoints_.find(Token) != EndPoints_.end();
}
void RTTYS_server::LoginDone(const std::string & Id) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It==EndPoints_.end())
return;
Logger().information(fmt::format("User: {}, Serial: {} logged in.",It->second.UserName, It->second.SerialNumber ));
}
bool RTTYS_server::ValidEndPoint(const std::string &Id, const std::string &Token) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It==EndPoints_.end()) {
return false;
}
uint64_t Now = OpenWifi::Now();
return ((It->second.Token == Token) && ((Now-It->second.TimeStamp)<30));
}
bool RTTYS_server::CanConnect( const std::string &Id, RTTYS_ClientConnection *Conn) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It!=EndPoints_.end() && It->second.Client==Conn) {
It->second.ClientConnected = OpenWifi::Now();
return true;
}
return false;
}
bool RTTYS_server::IsDeviceRegistered( const std::string &Id, const std::string &Token, [[maybe_unused]] RTTY_Device_ConnectionHandler *Conn) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It == EndPoints_.end() || It->second.Token != Token )
return false;
return true;
}
uint64_t RTTYS_server::DeviceSessionID(const std::string & Id) {
auto it = EndPoints_.find(Id);
if(it==EndPoints_.end()) {
return 0;
} else {
if(it->second.Device== nullptr) {
return 0;
} else {
return it->second.Device->SessionID();
}
}
}
bool RTTYS_server::Login(const std::string & Id) {
std::lock_guard G(Mutex_);
std::shared_lock Guard(M_);
auto It = EndPoints_.find(Id);
if(It == EndPoints_.end()) {
auto ep = EndPoints_.find(Id);
if(ep == EndPoints_.end()) {
return false;
}
if(It->second.Device!= nullptr) {
// std::cout << "login " << Id << " session " << It->second.Device->SessionID() << std::endl;
// It->second.Device->AddCommand(RTTY_Device_ConnectionHandler::msgTypeLogin);
// std::cout << "login done" << Id << std::endl;
return It->second.Device->Login();
try {
return ep->second->Login();
} catch(const Poco::Exception &E) {
Logger().log(E);
} catch (...) {
}
return false;
}
bool RTTYS_server::Logout(const std::string & Id) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It == EndPoints_.end()) {
return false;
}
if(It->second.Device!= nullptr)
It->second.Device->Logout();
return true;
}
bool RTTYS_server::Close(const std::string & Id) {
std::lock_guard G(Mutex_);
auto It = EndPoints_.find(Id);
if(It == EndPoints_.end()) {
return false;
}
if(It->second.Device!= nullptr)
It->second.Device->Stop();
return true;
}
}

View File

@@ -8,13 +8,204 @@
#include "Poco/Net/SocketReactor.h"
#include "Poco/Net/SocketAcceptor.h"
#include "Poco/Timer.h"
#include "rttys/RTTYS_device.h"
#include "rttys/RTTYS_ClientConnection.h"
#include <shared_mutex>
namespace OpenWifi {
class RTTY_Device_ConnectionHandler;
class RTTYS_Device_ConnectionHandler;
class RTTYS_ClientConnection;
class RTTYS_server : public SubSystemServer
template <typename T> class MutexLockerDbg {
public:
MutexLockerDbg(const std::string &name, T &L) :
name_(name),
L_(L)
{
std::cout << name_ << ":L:0:" << Poco::Thread::current()->name() << ":" << Poco::Thread::currentTid() << std::endl;
L_.lock();
std::cout << name_ << ":L:1:" << Poco::Thread::current()->name() << ":" << Poco::Thread::currentTid() << std::endl;
}
~MutexLockerDbg() {
std::cout << name_ << ":U:0:" << Poco::Thread::current()->name() << ":" << Poco::Thread::currentTid() << std::endl;
L_.unlock();
std::cout << name_ << ":U:1:" << Poco::Thread::current()->name() << ":" << Poco::Thread::currentTid() << std::endl;
}
private:
std::string name_;
T & L_;
};
enum class RTTYS_Notification_type {
unknown,
device_disconnection,
client_disconnection,
client_registration,
device_registration
};
class RTTYS_Notification: public Poco::Notification {
public:
RTTYS_Notification(const RTTYS_Notification_type &type, const std::string &id,
RTTYS_Device_ConnectionHandler * device) :
type_(type),
id_(id),
device_(device) {
}
RTTYS_Notification(const RTTYS_Notification_type &type, const std::string &id,
RTTYS_ClientConnection * client) :
type_(type),
id_(id),
client_(client) {
}
RTTYS_Notification(const RTTYS_Notification_type &type,
const std::string &id,
const std::string &token,
RTTYS_Device_ConnectionHandler * device) :
type_(type),
id_(id),
token_(token),
device_(device) {
}
RTTYS_Notification_type type_=RTTYS_Notification_type::unknown;
std::string id_;
std::string token_;
RTTYS_Device_ConnectionHandler *device_= nullptr;
RTTYS_ClientConnection *client_ = nullptr;
};
class RTTYS_EndPoint {
public:
RTTYS_EndPoint(const std::string &Token, const std::string &SerialNumber, const std::string &UserName ):
Token_(Token),
SerialNumber_(SerialNumber),
UserName_(UserName)
{
Created_ = std::chrono::high_resolution_clock::now();
}
inline void SetClient(std::unique_ptr<RTTYS_ClientConnection> Client) {
ClientConnected_ = std::chrono::high_resolution_clock::now();
Client_ = std::move(Client);
}
inline void SetDevice(std::unique_ptr<RTTYS_Device_ConnectionHandler> Device) {
DeviceConnected_ = std::chrono::high_resolution_clock::now();
Device_ = std::move(Device);
}
inline bool Login() {
if(Device_!= nullptr) {
return Device_->Login();
}
return false;
}
RTTYS_EndPoint & operator=(RTTYS_EndPoint Other) {
Other.Client_ = std::move(Client_);
Other.Device_ = std::move(Device_);
return *this;
}
inline void DisconnectClient() {
ClientDisconnected_ = std::chrono::high_resolution_clock::now();
}
inline void DisconnectDevice() {
DeviceDisconnected_ = std::chrono::high_resolution_clock::now();
}
[[nodiscard]] inline bool TooOld() {
std::chrono::time_point<std::chrono::high_resolution_clock> now = std::chrono::high_resolution_clock::now();
if(ClientDisconnected_!=std::chrono::time_point<std::chrono::high_resolution_clock>{0s} && (now-ClientDisconnected_)>15s) {
if(DeviceDisconnected_==std::chrono::time_point<std::chrono::high_resolution_clock>{0s}) {
DeviceDisconnected_ = std::chrono::high_resolution_clock::now();
}
return true;
}
if(DeviceDisconnected_!=std::chrono::time_point<std::chrono::high_resolution_clock>{0s} && (now-DeviceDisconnected_)>15s) {
if(ClientDisconnected_==std::chrono::time_point<std::chrono::high_resolution_clock>{0s}) {
ClientDisconnected_ = std::chrono::high_resolution_clock::now();
}
return true;
}
if(!Joined_ && (now-Created_)>30s) {
return true;
}
// std::cout << ClientDisconnected_ << " " << ClientConnected_ << " " << DeviceDisconnected_ << " " << DeviceConnected_ << std::endl;
return false;
}
bool SendToClient(const u_char *Buf, std::size_t Len) {
if(Client_!= nullptr && Client_->Valid()) {
Client_->SendData(Buf,Len);
return true;
}
std::cout << "SendToClientFailure: " << (Client_!= nullptr) << " " << Client_->Valid() << std::endl;
return false;
}
inline bool KeyStrokes(const u_char *buffer, std::size_t len) {
if( Device_!= nullptr && Device_->Valid() )
return Device_->KeyStrokes(buffer,len);
return false;
}
inline bool WindowSize( int cols, int rows) {
if(Device_!= nullptr && Device_->Valid())
return Device_->WindowSize(cols,rows);
return false;
}
[[nodiscard]] inline bool ValidClient() const {
return Client_!= nullptr && Client_->Valid();
}
[[nodiscard]] inline bool ValidDevice() const {
return Device_!= nullptr && Device_->Valid();
}
[[nodiscard]] inline bool Joined() volatile const { return Joined_; }
void Join() {
Joined_=true;
}
inline bool SendToClient(const std::string &S) {
if(Client_!= nullptr && Client_->Valid()) {
Client_->SendData(S);
return true;
}
return false;
}
[[nodiscard]] inline const std::string & UserName() const { return UserName_; }
[[nodiscard]] inline const std::string & SerialNumber() const { return SerialNumber_; }
[[nodiscard]] inline auto TimeDeviceConnected() const { return std::chrono::duration<double>{DeviceDisconnected_ - DeviceConnected_}.count(); }
[[nodiscard]] inline auto TimeClientConnected() const { return std::chrono::duration<double>{ClientDisconnected_ - ClientConnected_}.count(); }
private:
std::string Token_;
std::string SerialNumber_;
std::string UserName_;
std::unique_ptr<RTTYS_ClientConnection> Client_;
std::unique_ptr<RTTYS_Device_ConnectionHandler> Device_;
std::string Id_;
std::chrono::time_point<std::chrono::high_resolution_clock>
Created_{0s},DeviceDisconnected_{0s},
ClientDisconnected_{0s},DeviceConnected_{0s} ,ClientConnected_{0s};
volatile bool Joined_=false;
};
class RTTYS_server : public SubSystemServer, Poco::Runnable
{
public:
static auto instance() {
@@ -27,38 +218,35 @@ namespace OpenWifi {
inline auto UIAssets() { return RTTY_UIAssets_; }
void Register(const std::string &Id, RTTYS_ClientConnection *Client);
void DeRegister(const std::string &Id, RTTYS_ClientConnection *Client);
bool Register(const std::string &Id, const std::string &Token, RTTY_Device_ConnectionHandler *Device);
void DeRegisterDevice(const std::string &Id, RTTY_Device_ConnectionHandler *Device);
bool CreateEndPoint(const std::string &Id, const std::string & Token, const std::string & UserName, const std::string & SerialNumber );
std::string SerialNumber(const std::string & Id);
void LoginDone(const std::string & Id);
bool ValidEndPoint(const std::string &Id, const std::string &Token);
bool CanConnect( const std::string &Id, RTTYS_ClientConnection *Conn);
bool IsDeviceRegistered( const std::string &Id, const std::string &Token, [[maybe_unused]] RTTY_Device_ConnectionHandler *Conn);
bool Login(const std::string & Id_);
bool Logout(const std::string & Id_);
bool Close(const std::string & Id_);
uint64_t DeviceSessionID(const std::string & Id);
bool SendKeyStrokes(const std::string &Id, const u_char *buffer, std::size_t s);
bool WindowSize(const std::string &Id, int cols, int rows);
bool SendToClient(const std::string &id, const u_char *Buf, std::size_t Len);
bool SendToClient(const std::string &id, const std::string &s);
bool ValidClient(const std::string &id);
bool ValidId(const std::string &Id);
struct EndPoint {
std::string Token;
RTTYS_ClientConnection * Client = nullptr;
RTTY_Device_ConnectionHandler * Device = nullptr;
uint64_t TimeStamp = OpenWifi::Now();
uint64_t DeviceConnected = 0;
uint64_t ClientConnected = 0;
std::string UserName;
std::string SerialNumber;
bool ShuttingDown = false;
bool ShutdownComplete = false;
};
void run() final;
inline void NotifyDeviceDisconnect(const std::string &id, RTTYS_Device_ConnectionHandler *device) {
ResponseQueue_.enqueueNotification(new RTTYS_Notification(RTTYS_Notification_type::device_disconnection,id,device));
}
inline void NotifyClientDisconnect(const std::string &id, RTTYS_ClientConnection *client) {
ResponseQueue_.enqueueNotification(new RTTYS_Notification(RTTYS_Notification_type::client_disconnection,id,client));
}
inline void NotifyDeviceRegistration(const std::string &id, const std::string &token, RTTYS_Device_ConnectionHandler *device) {
ResponseQueue_.enqueueNotification(new RTTYS_Notification(RTTYS_Notification_type::device_registration,id,token,device));
}
inline void NotifyClientRegistration(const std::string &id, RTTYS_ClientConnection *client) {
ResponseQueue_.enqueueNotification(new RTTYS_Notification(RTTYS_Notification_type::client_registration,id,client));
}
void CreateNewClient(Poco::Net::HTTPServerRequest &request,
Poco::Net::HTTPServerResponse &response, const std::string &id);
void onTimer(Poco::Timer & timer);
@@ -66,28 +254,35 @@ namespace OpenWifi {
return Internal_;
}
inline void dump([[maybe_unused]] const char *ID, [[maybe_unused]] std::ostream &s) {
/* for(const auto &[id,point]:EndPoints_) {
s << ID << " ID: " << id << " C:" << (point.Client == nullptr) << " D:" << (point.Device== nullptr)
<< " Shutting down: " << point.ShuttingDown
<< " Shutdown: " << point.ShutdownComplete << std::endl;
}
*/
}
inline Poco::Net::SocketReactor & ClientReactor() { return ClientReactor_; }
private:
// std::recursive_mutex M_;
Poco::Net::SocketReactor ClientReactor_;
Poco::Thread ClientReactorThread_;
std::string RTTY_UIAssets_;
std::atomic_bool Internal_ = false;
Poco::Net::SocketReactor ClientReactor_;
Poco::Net::SocketReactor DeviceReactor_;
Poco::Thread ClientReactorThread_;
std::string RTTY_UIAssets_;
bool Internal_ = false;
std::map<std::string, EndPoint> EndPoints_; // id, endpoint
std::map<std::string,std::unique_ptr<RTTYS_EndPoint>> EndPoints_; // id, endpoint
std::unique_ptr<Poco::Net::HTTPServer> WebServer_;
std::unique_ptr<Poco::Net::TCPServer> DeviceAcceptor_;
std::unique_ptr<Poco::Net::SocketAcceptor<RTTYS_Device_ConnectionHandler>> DeviceAcceptor_;
Poco::Thread DeviceReactorThread_;
Poco::NotificationQueue ResponseQueue_;
mutable bool NotificationManagerRunning_=false;
Poco::Thread NotificationManager_;
Poco::Timer Timer_;
std::unique_ptr<Poco::TimerCallback<RTTYS_server>> GCCallBack_;
std::list<std::unique_ptr<RTTYS_Device_ConnectionHandler>> FailedDevices;
std::list<std::unique_ptr<RTTYS_ClientConnection>> FailedClients;
mutable std::shared_mutex M_;
uint64_t TotalEndPoints_=0;
uint64_t FaildedNumDevices_=0;
uint64_t FailedNumClients_=0;
double TotalConnectedDeviceTime_=0.0;
double TotalConnectedClientTime_=0.0;
explicit RTTYS_server() noexcept:
SubSystemServer("RTTY_Server", "RTTY-SVR", "rtty.server")

52
src/sdks/sdk_prov.h Normal file
View File

@@ -0,0 +1,52 @@
//
// Created by stephane bourque on 2022-07-16.
//
#pragma once
#include "framework/MicroService.h"
#include "RESTObjects/RESTAPI_ProvObjects.h"
namespace OpenWifi::SDK::Prov {
inline bool GetSerialNumbersForVenueOfSerialNumber( const std::string & SerialNumber, Types::UUID_t &Venue, Types::StringVec & AdjacentSerialNumbers , Poco::Logger &Logger ) {
OpenAPIRequestGet GetInventoryForSerialNumber( uSERVICE_PROVISIONING, "/api/v1/inventory/" + SerialNumber , {} , 30000);
auto CallResponse1 = Poco::makeShared<Poco::JSON::Object>();
if(!GetInventoryForSerialNumber.Do(CallResponse1,"")) {
Logger.error(fmt::format("{}: Cannot find serial number in inventory.", SerialNumber));
return false;
}
ProvObjects::InventoryTag Device;
if(!Device.from_json(CallResponse1)) {
Logger.error(fmt::format("{}: Invalid Inventory response.", SerialNumber));
return false;
}
Venue = Device.venue;
OpenAPIRequestGet GetInventoryForVenue( uSERVICE_PROVISIONING, "/api/v1/inventory" ,
{
{"serialOnly","true"},
{"venue", Venue}
}, 30000);
auto CallResponse2 = Poco::makeShared<Poco::JSON::Object>();
if(!GetInventoryForVenue.Do(CallResponse2,"")) {
Logger.error(fmt::format("{}: Cannot get inventory for venue.", SerialNumber));
return false;
}
try {
OpenWifi::RESTAPI_utils::field_from_json(CallResponse2, "serialNumbers",
AdjacentSerialNumbers);
} catch(...) {
Logger.error(fmt::format("{}: Cannot parse inventory list", SerialNumber));
return false;
}
return true;
}
}

View File

@@ -66,7 +66,7 @@ namespace OpenWifi {
Poco::Data::Session Sess = Pool_->get();
Poco::Data::Statement Select(Sess);
std::string St{"SELECT FROM DefaultConfigs WHERE Name=?"};
std::string St{"SELECT name FROM DefaultConfigs WHERE Name=?"};
Select << ConvertParams(St) ,
Poco::Data::Keywords::into(TmpName) ,
Name;

View File

@@ -536,15 +536,18 @@ rtty() {
-H "Authorization: Bearer ${token}" > ${result_file}
jq < ${result_file}
cid=$(cat ${result_file} | jq -r '.connectionId')
vport=$(cat ${result_file} | jq -r '.viewport')
server=$(cat ${result_file} | jq -r '.server')
url=https://${server}:${vport}/connect/${cid}
findbrowser
if [[ "${browser}" != "" ]]
if [[ "$2" != "noconnect" ]]
then
${browser} ${url}
cid=$(cat ${result_file} | jq -r '.connectionId')
vport=$(cat ${result_file} | jq -r '.viewport')
server=$(cat ${result_file} | jq -r '.server')
url=https://${server}:${vport}/connect/${cid}
findbrowser
if [[ "${browser}" != "" ]]
then
${browser} ${url}
fi
fi
}
@@ -866,15 +869,15 @@ help() {
echo "setloglevel <sys> <level> Set the logging system level for individual subsystems."
echo " sys:ufileuploader/websocket/storage/restapi/commandmanager/auth/deviceregistry/all"
echo " level:none/fatal/critical/error/warning/notice/information/debug/trace"
echo "getloglevels Get the log levels of all the subsystems"
echo "getloglevels Get the log levels of all the subsystems"
echo "getloglevelnames Get the list of log level names possible"
echo "getsubsystemnames Get the subsystems that can be used when setting log levels."
echo "getfile <serial> <uuid> <name> Get the file associated with trace command <uuid> for device <serial>"
echo " The file will be saved with the name <name>"
echo " The file will be saved with the name <name>"
echo
echo "rtty <serial> Get the details for an rtty session."
echo "rtty <serial> <noconnect> Get the details for an rtty session."
echo
echo "laststats <serial> Get the last statistics for a device"
echo "laststats <serial> Get the last statistics for a device"
echo "neweststats <serial> Get the newest statistics for a device"
echo
echo "ouilookup <serial> Lookup an OUI"
@@ -937,7 +940,7 @@ case "$1" in
"deviceswithstatus") login; deviceswithstatus "$2" ; logout ;;
"getdevicecomplete") login; getdevicecomplete "$2" ; logout ;;
"getfile") login; getfile "$2" "$3" ; logout ;;
"rtty") login; rtty "$2" ; logout ;;
"rtty") login; rtty "$2" "$3" ; logout ;;
"laststats") login; laststats "$2"; logout;;
"newestcommands") login; newestcommands "$2"; logout;;
"neweststats") login; neweststats "$2"; logout;;

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env bash
echo "This test script "
echo "Getting all serial numbers.."
./cli listdevices
cp result.json devices.json
jq -r '.devices[].serialNumber' devices.json > serialNumbers
while IFS= read -r serialNumber
do
echo "Serial Number: $serialNumber"
./cli rtty "$serialNumber" noconnect
done < serialNumbers

View File

@@ -73,7 +73,7 @@ ucentral.autoprovisioning = true
ucentral.devicetypes.0 = AP:linksys_ea8300,edgecore_eap101,linksys_e8450-ubi
ucentral.devicetypes.1 = SWITCH:edgecore_ecs4100-12ph
ucentral.devicetypes.2 = IOT:esp32
oui.download.uri = https://linuxnet.ca/ieee/oui.txt
oui.download.uri = https://standards-oui.ieee.org/oui/oui.txt
firmware.autoupdate.policy.default = auto
#