Skip to content

Commit

Permalink
Fix indentation issue in option 23
Browse files Browse the repository at this point in the history
Otherwise global nameservers are not returned if not defined in client class
but client exists.
  • Loading branch information
anthonygego committed May 10, 2022
1 parent 2130fa8 commit 89984bd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions dhcpy6d/options/option_23.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,11 @@ def build(self, transaction=None, **kwargs):
nameserver += inet_pton(AF_INET6, ns)
response_string_part = self.convert_to_string(self.number, hexlify(nameserver).decode())
options_answer_part = self.number
elif len(cfg.NAMESERVER) > 0:
# in case several nameservers are given convert them all and add them
nameserver = b''
for ns in cfg.NAMESERVER:
nameserver += inet_pton(AF_INET6, ns)
response_string_part = self.convert_to_string(self.number, hexlify(nameserver).decode())
options_answer_part = self.number
elif len(cfg.NAMESERVER) > 0:
# in case several nameservers are given convert them all and add them
nameserver = b''
for ns in cfg.NAMESERVER:
nameserver += inet_pton(AF_INET6, ns)
response_string_part = self.convert_to_string(self.number, hexlify(nameserver).decode())
options_answer_part = self.number
return response_string_part, options_answer_part

0 comments on commit 89984bd

Please sign in to comment.