MAJOR CHANGE: Move ACLs into the main hblink.cfg configuraiton file and process all ingress ACLs in hblink.py itself. This means removing all other ACL processing from other programs, except hb_bridge_all.py which uses the main hblink.py ACLs for egress processing.
Separating HBSYSTEM into HBMASTER and HBPEER to reduce memory footprint
and allow easier updating. Also cleaning up and normalizing the
OPENBRIDGE class to match the standard HB classes better.
0) CONFIGURATION FILES WILL NEED UPDATED TO CHANGE NAMING
CONFIGURATIONS!
1) Updated use of socket address instead of discrete IP/port. This will
be needed for socket address based validation and is faster… duh…
should have done this in the beginning.
2) Changed all references to “clients” as HBP systems to “peers”. This
sets the stage for having a peer_id and an originator_id for DMRD
packets.
3) Found and squashed a number of other random bugs, including the
registration ACL not working in confbridge or bridge_all.
4) router is now retired. confbridge is the future.
If Master -> Client, it is the client’s radio ID, if it is Client ->
Master, it is the client radio ID. This appears to be the most correct
way, though admittedly not enforced, and might be better to use the
originating repeater/hotspot radio ID, but that’s for another day.
Changed the logic for determining when to “re-connect” to the master.
This will break if the ping timeout is set too low. Recommend keeping
it at 4-5 seconds.
Random:
* Commented out per-packet debug logger lines (uncomment locally when needed)
Problems Fixed:
CLIENT MODE: hblink.py
hblink.py did not properly parse the radio_id in a MSTNAK message. We searched for
"MSTN" - 4 characters, and neglected to parse the radio ID at offset 6, after "MSTNAK"
instead of after 4, "MSTN".... rookie mistake:
elif _command == 'MSTN': # Actually MSTNAK -- a NACK from the master
- _radio_id = _data[4:8]
+ _radio_id = _data[6:10]
hblink.py did not actually keep track of missed keep-alives correctly to reset a connection.
This has probably been fixed. At worst, no more broken than it was. Would like to have
some folks test it by breaking connectivty froma client to master and watch what happens.
Appears to work now.
Minor logging bug when master receives and unknown command. It tried to
log _radio_id, but in this case, we don’t know the radio ID since we
can’t parse the HBP PDU.