Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F144287068
D53347.id165083.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
711 B
Referenced Files
None
Subscribers
None
D53347.id165083.diff
View Options
diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c
--- a/sys/netinet/udp_usrreq.c
+++ b/sys/netinet/udp_usrreq.c
@@ -1208,6 +1208,23 @@
error = udp_v4mapped_pktinfo(cm, &src, inp, flags);
if (error != 0)
break;
+ if (((flags & PRUS_IPV6) != 0) &&
+ (cm->cmsg_level == IPPROTO_IPV6) &&
+ (cm->cmsg_type == IPV6_TCLASS)) {
+ int tclass;
+
+ if (cm->cmsg_len != CMSG_LEN(sizeof(int))) {
+ error = EINVAL;
+ break;
+ }
+ tclass = *(int *)CMSG_DATA(cm);
+ if (tclass < -1 || tclass > 255) {
+ error = EINVAL;
+ break;
+ }
+ if (tclass != -1)
+ tos = (u_char)tclass;
+ }
#endif
if (cm->cmsg_level != IPPROTO_IP)
continue;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Feb 8, 4:03 PM (13 h, 59 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28470533
Default Alt Text
D53347.id165083.diff (711 B)
Attached To
Mode
D53347: udp: honor IPV6_TCLASS cmsg for UDP/IPv4 packets
Attached
Detach File
Event Timeline
Log In to Comment