History | View | Annotate | Download (23.2 kB)
Add configurationf file validation
Add a specification of the configuration file and runtime validation, usingconfigobj's validate.Validator and custom checks for the nameserver lists.
Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Add configuration file support
Add configuration file parsing using python-configobj. All command line optionsexcept -d and -f have been moved to the configuration file.
A sample configuration file with all accepted options has been added as well.
Warning: validation and type casting is still missing....
Refactor the main loop code and increase RA period
Increase RA period to 300s by default
Refactor the main loop to check only once for timeout expiration. Thisfixes spurious RA emission because we forgot to properly reset thestart timer.
Use a separate thread for periodic RAs
Periodic RAs can take a long time with many interfaces. The bottleneckseems to lie in bind() send send() with AF_PACKET sockets. So, we spawna separate thread to be able to handle requests in the mean time.
Gracefully handle ICMPv6 NS w/o SrcLLAddr option
Neighbour solicitations sent during interface configuration do notinclude a Source Link-Layer Address option. We ignore them as weshouldn't (and can't) reply anyway.
Warn on NFQUEUE exception
Warn if anything goes wrong during select()
Whitespace cleanup
Gracefully handle dead interfaces on periodic RA
Remove any interfaces that are not there during periodic RA emission.
Rename nfdhcp.py to nfdhcpd