Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR addresses and resolves issue #485 concerning address selection when using a packet mark. While I believe there's a more "correct" way to fix this issue, the solution would require extensive changes that I currently do not have the time to implement.
This PR tackles the most prevalent variant of the issue. I plan to create a new issue outlining my ideal approach for resolving this problem. This will serve as a guide for anyone who might revisit the issue in the future, offering one potential solution and outlining the limitations of the current patch.
Changes
mtr
and not inmtr-packet
.Testing
I tested these patches on Linux 6.1 and FreeBSD 13.2. As the changes only involve packet marking, they do not affect non-Linux operating systems. Therefore, FreeBSD can be used as a stand-in for NetBSD or Solaris.
Testing Steps:
Linux
I have a routing table with a unique default gateway corresponding to mark
2088138254
. I tested the application both with and without the mark to ensure that it traced the correct path.mtr
performed as expected in both scenarios.BSD
As FreeBSD does not support routing marks, my test on this OS involved merely compiling
mtr
and confirming that it could trace a route, thereby triggering the address selection logic.