-
-
Notifications
You must be signed in to change notification settings - Fork 138
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
Mikrotik Traceroute #125
Labels
Comments
Can confirm the above fix works, great stuff @agent-squirrel |
The above solution didn't work for me unfortunately.. might be due to a different routeros or php version. Instead, I placed the following as the first line of the format_output function in router.php:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The Traceroute tool on Mikrotik ROS operates like an MTR and continually updates the console with metrics. This can be avoided with count=1 but if the traceroute encounters a blank hop for any reason, the router rewrites the console anyway. If running the traceroute with no controlling terminal, as in the case of an LG, the result gets output in chunks and only the final chunk is actually useful.
A solution is to explode the resultant string data into an array using the blank line between each chunk as a deliminator and then takes the final index as the resultant string.
Adding
$filtered = end(explode("\n\n",trim($filtered)));
Somewhere before the filtered output is returned has fixed this issue on our install of LG. We have added it just beforereturn preg_replace('/(?:\n|\r\n|\r)$/D', '', $filtered);
The text was updated successfully, but these errors were encountered: