-
Notifications
You must be signed in to change notification settings - Fork 263
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
tracepath: identify interfaces when available #325
base: master
Are you sure you want to change the base?
Conversation
4bc9724
to
c93b1ef
Compare
if (ipaddr_flag) { | ||
if (offset + 8 > pkt_len || ntohs(*(uint16_t *)(pkt + offset)) != 1) | ||
goto err; | ||
printf(" address=%s;", inet_ntop(AF_INET, &pkt[offset + 4], if_addr, sizeof(if_addr))); |
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.
Any reason why you're not handling AF_INET6?
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.
Only called setsockopt
with IP_RECVERR_RFC4884
not the IPv6 equivalent, so any interface returned in a well-formed packet will be IPv4.
Why not setsockopt
with IPV6_RECVERR_RFC4884
? I haven't had time to test it yet. It will be a relatively painless patch once I can test it.
(For testing: this patch can be applied to Linux 5.9+) |
RFC 5837 extends ICMP to provide more information about the interfaces packets move through as they flow through the network. This patch prints those extensions when available. Signed-off-by: Ishaan Gandhi<ishaangandhi@gmail.com>
c93b1ef
to
9f09f30
Compare
For a record kernel part still have not been merged: https://lore.kernel.org/netdev/?q=Ishaan+Gandhi+5837 |
RFC 5837 extends ICMP to provide more information about the interfaces packets move through as they flow through the network.
This patch prints those extensions when available.
Signed-off-by: Ishaan Gandhi ishaangandhi@gmail.com