ptftpd icon indicating copy to clipboard operation
ptftpd copied to clipboard

Broken on Linux

Open fifteenhex opened this issue 6 years ago • 3 comments

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.

fifteenhex avatar Jun 13 '19 18:06 fifteenhex

Thanks for reporting and for sending #20 !

mpetazzoni avatar Jun 18 '19 06:06 mpetazzoni

So how is it going

deviumgroup avatar Dec 21 '22 22:12 deviumgroup