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

Implement hop specific source ranges #11

Merged
merged 3 commits into from
May 16, 2019
Merged

Implement hop specific source ranges #11

merged 3 commits into from
May 16, 2019

Conversation

taktv6
Copy link
Contributor

@taktv6 taktv6 commented May 16, 2019

No description provided.

@taktv6 taktv6 requested a review from hikhvar May 16, 2019 12:28
@@ -58,7 +52,7 @@ func (p *Prober) craftPacket(pr *probe) ([]byte, error) {

// Create final UDP packet that will return
ip := &layers.IPv4{
SrcIP: innerSrc,
SrcIP: p.hops[len(p.hops)-1].srcRange[pr.Seq%uint64(len(p.hops[len(p.hops)-1].srcRange))],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats a magic line. Can we somehow define this as a function on Prober? To give the reader some hint what this is all about.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@taktv6 taktv6 merged commit 2ff0001 into master May 16, 2019
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

Successfully merging this pull request may close these issues.

2 participants