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

cannot stat /proc/sys/net/inet/udp/maxdgram #32

Open
alex-eri opened this issue Apr 6, 2021 · 2 comments
Open

cannot stat /proc/sys/net/inet/udp/maxdgram #32

alex-eri opened this issue Apr 6, 2021 · 2 comments

Comments

@alex-eri
Copy link

alex-eri commented Apr 6, 2021

Linux 5.10.20-1-lts

INFO(tftpd): Serving file tp_recovery.bin to host 192.168.0.2...
sysctl: cannot stat /proc/sys/net/inet/udp/maxdgram: Нет такого файла или каталога
INFO(tftpd): Serving file tp_recovery.bin to host 192.168.0.2...
sysctl: cannot stat /proc/sys/net/inet/udp/maxdgram: Нет такого файла или каталога

@MatthewTingum
Copy link

This seems to be a duplicate of #19

@grupofaster
Copy link

grupofaster commented Jan 30, 2024

Hello, I have corrected it by placing an exception in the get_max_udp_datagram_size() method in tftpserver.py file as follows:

def get_max_udp_datagram_size():
"""Retrieve the maximum UDP datagram size allowed by the system."""
try:
val = subprocess.check_output(['sysctl', '-n', 'net.inet.udp.maxdgram'])
except Exception as err:
val = subprocess.check_output(['sysctl', '-n', 'net.core.rmem_max'])
return int(val)

We noticed that syctl does not get this system variable net.inet.udp.maxdgram, so we add the one that in my case (ubuntu server) finds: net.core.rmem_max

image

Regards,
Franklin
[email protected]
www.grupofaster.com

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

No branches or pull requests

3 participants