-
Notifications
You must be signed in to change notification settings - Fork 238
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
astraceroute: stopping when target is reached, finer control on number of packets sent, and other smaller changes #210
base: master
Are you sure you want to change the base?
Conversation
Thanks for the PR.
Yes, the commit is definitely too large for me to review and touches many (partially unrelated) things which makes it even harder. Please try to split it up into several smaller commits which do just one thing at a time. As for the 80 character line limit, feel free to interpret it liberally. I have done so in the past as well :) Maybe start with the cleanup changes and then the actual fix for issue #204.
I think each of these should be more or less one commit with the commit message describing what was changed and why.
Your work on this is definitely appreciated, but as said above, in the current state it's not reviewable for me in a decent amount of time. |
I have broken up the changes into multiple commits. (It was done the crudest way possible with git, but I am no guru, and it works.) Hopefully now the changes are manageable and can be sufficiently reviewed. |
Please rebase your branch on top of current master (i.e. drop the old changes and the "back to current version ..." commit) so it only has the individual changes instead of the big change + revert + individual changes. |
I really hope I did exactly that, and nothing more, nothing less. |
Thanks, now it looks better. I'll have a look in detail in the next few days. |
Thanks for the update. I didn't yet have time to review this PR thoroughly but noticed some possible improvements regarding the commit format. Please read through the
Please take a look at the git history for a reference of how we expect commit messages to look in general. |
f302d50
to
1ccd31d
Compare
Hopefully now everything is more or less what it should be. I tried to keep the commit messages concise and short, that is why I did not try to justify all my decisions in them. I hope that is not a problem. The commits have been signed off. |
Just pinging to see if there are news about the fate of this PR. |
Could you please inform me about the progress of handling this PR? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small review comments inline, still didn't get to review all of this. I also cherry-picked the first commit of this PR as 500e708, please drop your change accordingly and rebase on top of current master.
Also, please make sure you set the author name (pseudonym is fine) on each of your commits.
@@ -303,7 +303,7 @@ static void __noreturn help(void) | |||
" -6|--ipv6 Use IPv6-only requests\n" | |||
" -n|--numeric Do not do reverse DNS lookup for hops (default)\n" | |||
" -u|--update Update GeoIP databases\n" | |||
" -L|--latitude Show do_geo_lookup and longitude\n" | |||
" -L|--latitude Show latitude and longitude\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please squash this with the commit (in your branch) that introduced the typo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
astraceroute.c
Outdated
void (*handler)(uint8_t *packet, size_t len, int do_dns_resolution, | ||
int do_geo_lookup); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change do_dns_resolution
and do_geo_lookup
to bool
type while at it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
EDIT: I just realized that there is a Reopen and comment button... My not having a clue about how Git functions really shows here. I tried to rebase onto |
@tklauser any updates? |
…in get_remote_fd() Signed-off-by: uno20001 <[email protected]>
…to know when the traceroute target is reached Signed-off-by: uno20001 <[email protected]>
…is reached Signed-off-by: uno20001 <[email protected]>
Signed-off-by: uno20001 <[email protected]>
I thought I will finally rework this PR into a reasonable form for its three year anniversary. But I have encountered some things that I find a bit confusing. I would like to modify the main loop to better fit to what is described in the man page:
That is, restructure the code so that @tklauser what do you think? |
I would like to apologize in advance for the size of this commit. The changes should have been implemented in multiple commits. This was a serious oversight on my part. I also interpreted the 80 character line length limit quite liberally in some places.
The necessary changes have been implemented in order for astraceroute to stop when a response arrives from the target. Furthermore the MAN page has been updated.
Change log:
check_ipv4()
andcheck_ipv6()
have been more or less rewritten to make stopping possiblepanic()
messages have been updated to printerrno
and the actual error message from the system callPF_*
constants have been replaced byAF_*
constants where I deemed the change appropriatehelp()
have been modified to reflect the changes, and extended with extra information for some optionsI have tested the changes on multiple machines, with both IPv4 and IPv6, and the program seems to function correctly, however, it is very much possible that bugs have been introduced into the codebase.
This PR should fix issue #204.
The commits have not been squashed and signed off yet, and will not be until the fate of this PR is decided.