Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F160432548
D6611.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
907 B
Referenced Files
None
Subscribers
None
D6611.diff
View Options
Index: sys/netinet/ip_fastfwd.c
===================================================================
--- sys/netinet/ip_fastfwd.c
+++ sys/netinet/ip_fastfwd.c
@@ -397,6 +397,31 @@
}
/*
+ * Translate Layer 4 inbound checksum offloading flags to outbound
+ */
+ if ((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) ==
+ (CSUM_DATA_VALID | CSUM_PSEUDO_HDR) &&
+ m->m_pkthdr.csum_data == 0xffff) {
+ /* L4 checksum was correct, but it's not present. */
+ switch(ip->ip_p) {
+ case IPPROTO_TCP:
+ m->m_pkthdr.csum_flags |= CSUM_TCP;
+ break;
+ case IPPROTO_UDP:
+ m->m_pkthdr.csum_flags |= CSUM_UDP;
+ break;
+ case IPPROTO_SCTP:
+ m->m_pkthdr.csum_flags |= CSUM_SCTP;
+ break;
+ default:
+ /*
+ * No checksum offloading support
+ */
+ break;
+ }
+ }
+
+ /*
* Check if packet fits MTU or if hardware will fragment for us
*/
if (ro.ro_rt->rt_mtu)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Jun 25, 9:10 AM (14 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34318245
Default Alt Text
D6611.diff (907 B)
Attached To
Mode
D6611: net: translate inbound checksum offloading flags to outbound when forwarding
Attached
Detach File
Event Timeline
Log In to Comment