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

Router pinging is using an unstable interface #486

Open
horcsinbalint opened this issue Mar 30, 2024 · 1 comment
Open

Router pinging is using an unstable interface #486

horcsinbalint opened this issue Mar 30, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@horcsinbalint
Copy link
Member

horcsinbalint commented Mar 30, 2024

https://github.com/EotvosCollegium/mars/blob/c90d73a75bb5f9429b7cfd0d6b073152631861d3/app/Console/Commands.php#L75C1-L75C106 uses the ping command's output to determine whether a router is available. If a router is available, then it works fine but if a router is not available, sometimes it might misinterpret the results as the ping command might give out failed results without those words present as per https://github.com/iputils/iputils/blob/294a65f00047f31685b7dd07048b48c4be82e097/ping/ping.c#L1236
It is not just some theoretical issue, as it has sent a couple of emails because of one router.

@horcsinbalint horcsinbalint added the bug Something isn't working label Mar 30, 2024
@horcsinbalint
Copy link
Member Author

horcsinbalint commented Apr 3, 2024

We should probably use nmap for it as it has multiple output formats that can be easily processed. Probably all routers can be pinged with a single command. For example nmap IPADDRESSHERE -sP -oG - can be easily processed (like it contains the IP address and the Status: Up string if the pinging is successful and it can process multiple IP-s in a single command).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant