Correct frame length argument of in_cksum_skip. While I'm here
remove intermediate variable csum. Reported by: Kim Culhan < w8hdkim <> gmail DOT com > Tested by: Kim Culhan < w8hdkim <> gmail DOT com >
This commit is contained in:
parent
6fd63a5dbf
commit
f9ad2b2f3c
@ -2608,17 +2608,14 @@ msk_encap(struct msk_if_softc *sc_if, struct mbuf **m_head)
|
|||||||
*/
|
*/
|
||||||
if (m->m_pkthdr.len < MSK_MIN_FRAMELEN &&
|
if (m->m_pkthdr.len < MSK_MIN_FRAMELEN &&
|
||||||
(m->m_pkthdr.csum_flags & CSUM_TCP) != 0) {
|
(m->m_pkthdr.csum_flags & CSUM_TCP) != 0) {
|
||||||
uint16_t csum;
|
|
||||||
|
|
||||||
m = m_pullup(m, offset + sizeof(struct tcphdr));
|
m = m_pullup(m, offset + sizeof(struct tcphdr));
|
||||||
if (m == NULL) {
|
if (m == NULL) {
|
||||||
*m_head = NULL;
|
*m_head = NULL;
|
||||||
return (ENOBUFS);
|
return (ENOBUFS);
|
||||||
}
|
}
|
||||||
csum = in_cksum_skip(m, ntohs(ip->ip_len) + offset -
|
|
||||||
(ip->ip_hl << 2), offset);
|
|
||||||
*(uint16_t *)(m->m_data + offset +
|
*(uint16_t *)(m->m_data + offset +
|
||||||
m->m_pkthdr.csum_data) = csum;
|
m->m_pkthdr.csum_data) = in_cksum_skip(m,
|
||||||
|
m->m_pkthdr.len, offset);
|
||||||
m->m_pkthdr.csum_flags &= ~CSUM_TCP;
|
m->m_pkthdr.csum_flags &= ~CSUM_TCP;
|
||||||
}
|
}
|
||||||
if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) {
|
if ((m->m_pkthdr.csum_flags & CSUM_TSO) != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user