FreeBSD Bugzilla – Attachment 154834 Details for
Bug 198928
mbuf tags aren't being copied from the leading fragment (header) to the subsequent fragment packets
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
After some back and forth on the mailing list (freebsd-net) Hans Petter Selasky came up with the attached patch which I tested successfully.
ip_output.c.diff (text/plain), 1.11 KB, created by
fodillemlinkarim
on 2015-03-26 15:27:30 UTC
(
hide
)
Description:
After some back and forth on the mailing list (freebsd-net) Hans Petter Selasky came up with the attached patch which I tested successfully.
Filename:
MIME Type:
Creator:
fodillemlinkarim
Created:
2015-03-26 15:27:30 UTC
Size:
1.11 KB
patch
obsolete
>Index: ip_output.c >=================================================================== >--- ip_output.c (revision 279890) >+++ ip_output.c (working copy) >@@ -787,11 +787,13 @@ > IPSTAT_INC(ips_odropped); > goto done; > } >- /* make sure the flowid is the same for the fragmented mbufs */ >- M_HASHTYPE_SET(m, M_HASHTYPE_GET(m0)); >- m->m_pkthdr.flowid = m0->m_pkthdr.flowid; >- /* copy multicast flag, if any */ >- m->m_flags |= (m0->m_flags & M_MCAST); >+ /* make sure the packet header gets copied */ >+ if (m_dup_pkthdr(m, m0, M_NOWAIT) == 0) { >+ m_free(m); >+ error = ENOBUFS; >+ IPSTAT_INC(ips_odropped); >+ goto done; >+ } > /* > * In the first mbuf, leave room for the link header, then > * copy the original IP header including options. The payload >@@ -821,11 +823,9 @@ > goto done; > } > m->m_pkthdr.len = mhlen + len; >- m->m_pkthdr.rcvif = NULL; > #ifdef MAC > mac_netinet_fragment(m0, m); > #endif >- m->m_pkthdr.csum_flags = m0->m_pkthdr.csum_flags; > mhip->ip_off = htons(mhip->ip_off); > mhip->ip_sum = 0; > if (m->m_pkthdr.csum_flags & CSUM_IP & ~if_hwassist_flags) {
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 198928
: 154834