Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F143466906
D35456.id54425.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
572 B
Referenced Files
None
Subscribers
None
D35456.id54425.diff
View Options
Index: sbin/ping/ping6.c
===================================================================
--- sbin/ping/ping6.c
+++ sbin/ping/ping6.c
@@ -1064,8 +1064,13 @@
}
/* Save pktinfo in the ancillary data. */
- if (usepktinfo)
+ if (usepktinfo) {
memcpy(cmsg_pktinfo, &pktinfo, sizeof(pktinfo));
+ if (dst.sin6_scope_id == 0 &&
+ setsockopt(ssend, IPPROTO_IPV6, IPV6_PKTINFO,
+ (void *)&pktinfo, sizeof(pktinfo)) < 0)
+ warn("setsockopt(IPV6_PKTINFO)");
+ }
if (connect(ssend, (struct sockaddr *)&dst, sizeof(dst)) != 0)
err(1, "connect() ssend");
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 31, 4:38 PM (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28130385
Default Alt Text
D35456.id54425.diff (572 B)
Attached To
Mode
D35456: ping6: fix "connect() ssend: Network is unreachable" errors
Attached
Detach File
Event Timeline
Log In to Comment