FreeBSD Bugzilla – Attachment 211135 Details for
Bug 243675
netinet6: Incorrect IPv6 checksum output packets with extension headers
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
fix
freebsd-bug.diff (text/plain), 1.56 KB, created by
Francis Dupont
on 2020-01-28 17:05:18 UTC
(
hide
)
Description:
fix
Filename:
MIME Type:
Creator:
Francis Dupont
Created:
2020-01-28 17:05:18 UTC
Size:
1.56 KB
patch
obsolete
>--- sys/netinet6/ip6_output.c-orig 2020-01-28 18:02:49.000000000 +0100 >+++ sys/netinet6/ip6_output.c 2020-01-28 18:03:05.000000000 +0100 >@@ -998,14 +998,15 @@ > * with ext. hdrs. > */ > if (sw_csum & CSUM_DELAY_DATA_IPV6) { >- sw_csum &= ~CSUM_DELAY_DATA_IPV6; >+ m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; > m = mb_unmapped_to_ext(m); > if (m == NULL) { > error = ENOBUFS; > IP6STAT_INC(ip6s_odropped); > goto bad; > } >- in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); >+ in6_delayed_cksum(m, plen - optlen, >+ sizeof(struct ip6_hdr) + optlen); > } else if ((ifp->if_capenable & IFCAP_NOMAP) == 0) { > m = mb_unmapped_to_ext(m); > if (m == NULL) { >@@ -1016,14 +1017,14 @@ > } > #ifdef SCTP > if (sw_csum & CSUM_SCTP_IPV6) { >- sw_csum &= ~CSUM_SCTP_IPV6; >+ m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; > m = mb_unmapped_to_ext(m); > if (m == NULL) { > error = ENOBUFS; > IP6STAT_INC(ip6s_odropped); > goto bad; > } >- sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); >+ sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); > } > #endif > m->m_pkthdr.csum_flags &= ifp->if_hwassist; >@@ -1116,7 +1117,9 @@ > error = ENOBUFS; > goto bad; > } >- in6_delayed_cksum(m, plen, hlen); >+ in6_delayed_cksum(m, plen - optlen, >+ sizeof(struct ip6_hdr) + optlen); >+ > m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; > } > #ifdef SCTP >@@ -1127,7 +1130,7 @@ > error = ENOBUFS; > goto bad; > } >- sctp_delayed_cksum(m, hlen); >+ sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); > m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; > } > #endif
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 243675
: 211135 |
211136