ptftpd
ptftpd copied to clipboard
Broken on Linux
tftpserver.py seems to be using this to work out how big the UDP packets it sends can be:
def get_max_udp_datagram_size():
"""Retrieve the maximum UDP datagram size allowed by the system."""
val = subprocess.check_output(['sysctl', '-n', 'net.inet.udp.maxdgram'])
return int(val)
This fails on linux because that property doesn't exist. I guess it's a BSD/OSX thing. Maybe this should be changed to check the exit value of sysctl and use the safe maximum of 508 bytes if sysctl returns an error or doesn't run at all because the user isn't root.
Thanks for reporting and for sending #20 !
So how is it going