|
Lines 998-1011
Link Here
|
| 998 |
* with ext. hdrs. |
998 |
* with ext. hdrs. |
| 999 |
*/ |
999 |
*/ |
| 1000 |
if (sw_csum & CSUM_DELAY_DATA_IPV6) { |
1000 |
if (sw_csum & CSUM_DELAY_DATA_IPV6) { |
| 1001 |
sw_csum &= ~CSUM_DELAY_DATA_IPV6; |
1001 |
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; |
| 1002 |
m = mb_unmapped_to_ext(m); |
1002 |
m = mb_unmapped_to_ext(m); |
| 1003 |
if (m == NULL) { |
1003 |
if (m == NULL) { |
| 1004 |
error = ENOBUFS; |
1004 |
error = ENOBUFS; |
| 1005 |
IP6STAT_INC(ip6s_odropped); |
1005 |
IP6STAT_INC(ip6s_odropped); |
| 1006 |
goto bad; |
1006 |
goto bad; |
| 1007 |
} |
1007 |
} |
| 1008 |
in6_delayed_cksum(m, plen, sizeof(struct ip6_hdr)); |
1008 |
in6_delayed_cksum(m, plen - optlen, |
|
|
1009 |
sizeof(struct ip6_hdr) + optlen); |
| 1009 |
} else if ((ifp->if_capenable & IFCAP_NOMAP) == 0) { |
1010 |
} else if ((ifp->if_capenable & IFCAP_NOMAP) == 0) { |
| 1010 |
m = mb_unmapped_to_ext(m); |
1011 |
m = mb_unmapped_to_ext(m); |
| 1011 |
if (m == NULL) { |
1012 |
if (m == NULL) { |
|
Lines 1016-1029
Link Here
|
| 1016 |
} |
1017 |
} |
| 1017 |
#ifdef SCTP |
1018 |
#ifdef SCTP |
| 1018 |
if (sw_csum & CSUM_SCTP_IPV6) { |
1019 |
if (sw_csum & CSUM_SCTP_IPV6) { |
| 1019 |
sw_csum &= ~CSUM_SCTP_IPV6; |
1020 |
m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; |
| 1020 |
m = mb_unmapped_to_ext(m); |
1021 |
m = mb_unmapped_to_ext(m); |
| 1021 |
if (m == NULL) { |
1022 |
if (m == NULL) { |
| 1022 |
error = ENOBUFS; |
1023 |
error = ENOBUFS; |
| 1023 |
IP6STAT_INC(ip6s_odropped); |
1024 |
IP6STAT_INC(ip6s_odropped); |
| 1024 |
goto bad; |
1025 |
goto bad; |
| 1025 |
} |
1026 |
} |
| 1026 |
sctp_delayed_cksum(m, sizeof(struct ip6_hdr)); |
1027 |
sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); |
| 1027 |
} |
1028 |
} |
| 1028 |
#endif |
1029 |
#endif |
| 1029 |
m->m_pkthdr.csum_flags &= ifp->if_hwassist; |
1030 |
m->m_pkthdr.csum_flags &= ifp->if_hwassist; |
|
Lines 1116-1122
Link Here
|
| 1116 |
error = ENOBUFS; |
1117 |
error = ENOBUFS; |
| 1117 |
goto bad; |
1118 |
goto bad; |
| 1118 |
} |
1119 |
} |
| 1119 |
in6_delayed_cksum(m, plen, hlen); |
1120 |
in6_delayed_cksum(m, plen - optlen, |
|
|
1121 |
sizeof(struct ip6_hdr) + optlen); |
| 1122 |
|
| 1120 |
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; |
1123 |
m->m_pkthdr.csum_flags &= ~CSUM_DELAY_DATA_IPV6; |
| 1121 |
} |
1124 |
} |
| 1122 |
#ifdef SCTP |
1125 |
#ifdef SCTP |
|
Lines 1127-1133
Link Here
|
| 1127 |
error = ENOBUFS; |
1130 |
error = ENOBUFS; |
| 1128 |
goto bad; |
1131 |
goto bad; |
| 1129 |
} |
1132 |
} |
| 1130 |
sctp_delayed_cksum(m, hlen); |
1133 |
sctp_delayed_cksum(m, sizeof(struct ip6_hdr) + optlen); |
| 1131 |
m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; |
1134 |
m->m_pkthdr.csum_flags &= ~CSUM_SCTP_IPV6; |
| 1132 |
} |
1135 |
} |
| 1133 |
#endif |
1136 |
#endif |