From b7fb54d8aeb1742819cabef81203335d7a8984ed Mon Sep 17 00:00:00 2001 From: Gleb Smirnoff Date: Mon, 8 Oct 2012 07:21:32 +0000 Subject: [PATCH] No reason to play with IP header before calling sctp_delayed_cksum() with offset beyond the IP header. --- sys/netinet/ip_divert.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c index b366a65b8b7..99d598cc1ee 100644 --- a/sys/netinet/ip_divert.c +++ b/sys/netinet/ip_divert.c @@ -215,10 +215,8 @@ divert_packet(struct mbuf *m, int incoming) } #ifdef SCTP if (m->m_pkthdr.csum_flags & CSUM_SCTP) { - ip->ip_len = ntohs(ip->ip_len); sctp_delayed_cksum(m, (uint32_t)(ip->ip_hl << 2)); m->m_pkthdr.csum_flags &= ~CSUM_SCTP; - ip->ip_len = htons(ip->ip_len); } #endif bzero(&divsrc, sizeof(divsrc));