Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Broken on Linux #19

Open
fifteenhex opened this issue Jun 13, 2019 · 3 comments
Open

Broken on Linux #19

fifteenhex opened this issue Jun 13, 2019 · 3 comments
Assignees
Labels

Comments

@fifteenhex
Copy link
Contributor

fifteenhex commented Jun 13, 2019

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.

@mpetazzoni mpetazzoni self-assigned this Jun 18, 2019
@mpetazzoni
Copy link
Owner

Thanks for reporting and for sending #20 !

@deviumgroup
Copy link

So how is it going

@13thFinance
Copy link

yeah, hows it going

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants