HenriWahl / dhcpy6d

MAC address aware DHCPv6 server written in Python
https://dhcpy6d.de
GNU General Public License v2.0
94 stars 27 forks source link

Class specific NTP server support unfinished/broken? #18

Closed FelixJacobi closed 5 years ago

FelixJacobi commented 5 years ago

I set the ntp_server option in a class, but this ended up in the error message

Class 'eth1': NTP server address 'fdbd:66a9:ca20:7afd:0000:0aff:fe46:fb00' is invalid.

After removing the try-except block from the source code I received this error message:

Traceback (most recent call last):
  File "/usr/sbin/dhcpy6d", line 58, in <module>
    cfg = Config()
  File "/usr/lib/python2.7/dist-packages/dhcpy6/config.py", line 306, in __init__
    self.read_config(configfile)
  File "/usr/lib/python2.7/dist-packages/dhcpy6/config.py", line 838, in read_config
    self.CLASSES[c].NTP_SERVER_dict['SRV'].append(ntp_server.lower())
AttributeError: 'Class' object has no attribute 'NTP_SERVER_dict'

Am I right about that the NTP server per class is not finished yet?

HenriWahl commented 5 years ago

Apparently you are right. This piece of code might be rather old and as far as I remember not yet be used in production.

HenriWahl commented 5 years ago

Fixed in https://github.com/HenriWahl/dhcpy6d/commit/bfe8254df973f68b2d88eed8690d58c11c924c3e

I was wrong - this was no old code but new one and only working (and tested) as a general option, not a class specific one.

FelixJacobi commented 5 years ago

Thanks!

HenriWahl commented 5 years ago

Alredy available in downloads at https://dhcpy6d.ifw-dresden.de/download/