mirror of
https://github.com/eblot/pybootd.git
synced 2024-09-11 22:17:44 +03:00
Fix a couple of bugs
This commit is contained in:
parent
3eb8e2ed69
commit
aad67d5eb2
@ -262,7 +262,7 @@ class BootpServer:
|
|||||||
kent = acl_builder(entry)
|
kent = acl_builder(entry)
|
||||||
self.acl[kent] = to_bool(self.config.get(access, entry))
|
self.acl[kent] = to_bool(self.config.get(access, entry))
|
||||||
self.buggy_clients = OrderedDict()
|
self.buggy_clients = OrderedDict()
|
||||||
if self.config.options(self.BUGGY_CLIENT_SECTION):
|
if self.config.has_section(self.BUGGY_CLIENT_SECTION):
|
||||||
for entry in self.config.options(self.BUGGY_CLIENT_SECTION):
|
for entry in self.config.options(self.BUGGY_CLIENT_SECTION):
|
||||||
item = self.build_mac_acl(entry)
|
item = self.build_mac_acl(entry)
|
||||||
self.buggy_clients[item] = \
|
self.buggy_clients[item] = \
|
||||||
@ -670,7 +670,7 @@ class BootpServer:
|
|||||||
if uuid:
|
if uuid:
|
||||||
item_str = '/'.join((uuid_str, mac_str))
|
item_str = '/'.join((uuid_str, mac_str))
|
||||||
else:
|
else:
|
||||||
item_str = mac_addr
|
item_str = mac_str
|
||||||
if not result:
|
if not result:
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.log.info('%s access in ACL is disabled', item_str)
|
self.log.info('%s access in ACL is disabled', item_str)
|
||||||
@ -853,11 +853,11 @@ class BootpServer:
|
|||||||
self.uuidpool[mac_addr] = uuid
|
self.uuidpool[mac_addr] = uuid
|
||||||
|
|
||||||
if self.check_acl(self.buggy_clients, 'mac', mac_addr):
|
if self.check_acl(self.buggy_clients, 'mac', mac_addr):
|
||||||
self.log.error('Force global broadcast for buggy client %s',
|
self.log.info('Force global broadcast for buggy client %s',
|
||||||
mac_str)
|
mac_str)
|
||||||
addr = ('255.255.255.255', addr[1])
|
addr = ('255.255.255.255', addr[1])
|
||||||
else:
|
else:
|
||||||
self.log.error('Not buggy')
|
self.log.debug('Not buggy')
|
||||||
|
|
||||||
# send the response
|
# send the response
|
||||||
sock.sendto(pkt, addr)
|
sock.sendto(pkt, addr)
|
||||||
|
Loading…
Reference in New Issue
Block a user