fix ACL issue in hblink.py upon download of config
This commit is contained in:
parent
df9f376ec5
commit
c7eb288f78
@ -199,6 +199,7 @@ def download_config(L_CONFIG_FILE, cli_file):
|
||||
corrected_config['SYSTEMS'][i]['RADIO_ID'] = int(iterate_config[i]['RADIO_ID']).to_bytes(4, 'big')
|
||||
corrected_config['SYSTEMS'][i]['TG1_ACL'] = config.acl_build(iterate_config[i]['TG1_ACL'], 4294967295)
|
||||
corrected_config['SYSTEMS'][i]['TG2_ACL'] = config.acl_build(iterate_config[i]['TG2_ACL'], 4294967295)
|
||||
## corrected_config['SYSTEMS'][i]['SUB_ACL'] = config.acl_build(iterate_config[i]['SUB_ACL'], 4294967295)
|
||||
corrected_config['SYSTEMS'][i]['MASTER_SOCKADDR'] = tuple(iterate_config[i]['MASTER_SOCKADDR'])
|
||||
corrected_config['SYSTEMS'][i]['SOCK_ADDR'] = tuple(iterate_config[i]['SOCK_ADDR'])
|
||||
corrected_config['SYSTEMS'][i]['PASSPHRASE'] = bytes((iterate_config[i]['PASSPHRASE']), 'utf-8')
|
||||
|
@ -44,6 +44,7 @@ from twisted.internet import reactor, task
|
||||
# Other files we pull from -- this is mostly for readability and segmentation
|
||||
import log
|
||||
import config
|
||||
from config import acl_build
|
||||
from const import *
|
||||
from dmr_utils3.utils import int_id, bytes_4, try_download, mk_id_dict
|
||||
|
||||
@ -534,7 +535,8 @@ class HBSYSTEM(DatagramProtocol):
|
||||
user_auth = False
|
||||
if self._config['USE_USER_MAN'] == False:
|
||||
# print('False')
|
||||
if acl_check(_peer_id, self._CONFIG['GLOBAL']['REG_ACL']) and acl_check(_peer_id, self._config['REG_ACL']):
|
||||
b_acl = acl_build(self._config['REG_ACL'], 4294967295)
|
||||
if acl_check(_peer_id, self._CONFIG['GLOBAL']['REG_ACL']) and acl_check(_peer_id, b_acl):
|
||||
user_auth = True
|
||||
if user_auth == True:
|
||||
# Build the configuration data strcuture for the peer
|
||||
|
Loading…
Reference in New Issue
Block a user