summaryrefslogtreecommitdiffstats
path: root/sys/dev/e1000
diff options
context:
space:
mode:
authorjfv <jfv@FreeBSD.org>2010-10-28 00:16:54 +0000
committerjfv <jfv@FreeBSD.org>2010-10-28 00:16:54 +0000
commit4457d701ab035088aeb591b69d648d30aa92a040 (patch)
treee6fe40386371acd15ccc1c061a21b78146202e3d /sys/dev/e1000
parente7b4c436b0e84b9116c4478f656c25deecf756b1 (diff)
downloadFreeBSD-src-4457d701ab035088aeb591b69d648d30aa92a040.zip
FreeBSD-src-4457d701ab035088aeb591b69d648d30aa92a040.tar.gz
In the data setup code for doing offloads the
ip and tcp pointers were not reset after some pullups. In practice this led to an NFS mount failure when using UDP reported by Kevin Lo, thanks Kevin. Fix from yongari, thank you!
Diffstat (limited to 'sys/dev/e1000')
-rw-r--r--sys/dev/e1000/if_em.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/e1000/if_em.c b/sys/dev/e1000/if_em.c
index 97d07db..1ce3956 100644
--- a/sys/dev/e1000/if_em.c
+++ b/sys/dev/e1000/if_em.c
@@ -93,7 +93,7 @@ int em_display_debug_stats = 0;
/*********************************************************************
* Driver version:
*********************************************************************/
-char em_driver_version[] = "7.1.6";
+char em_driver_version[] = "7.1.7";
/*********************************************************************
* PCI Device ID Table
@@ -1848,6 +1848,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp)
*m_headp = NULL;
return (ENOBUFS);
}
+ ip = (struct ip *)(mtod(m_head, char *) + ip_off);
ip->ip_len = 0;
ip->ip_sum = 0;
/*
@@ -1856,6 +1857,7 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp)
* what hardware expect to see. This is adherence of
* Microsoft's Large Send specification.
*/
+ tp = (struct tcphdr *)(mtod(m_head, char *) + poff);
tp->th_sum = in_pseudo(ip->ip_src.s_addr,
ip->ip_dst.s_addr, htons(IPPROTO_TCP));
} else if (m_head->m_pkthdr.csum_flags & CSUM_TCP) {
@@ -1865,12 +1867,15 @@ em_xmit(struct tx_ring *txr, struct mbuf **m_headp)
*m_headp = NULL;
return (ENOBUFS);
}
+ ip = (struct ip *)(mtod(m_head, char *) + ip_off);
+ tp = (struct tcphdr *)(mtod(m_head, char *) + poff);
} else if (m_head->m_pkthdr.csum_flags & CSUM_UDP) {
m_head = m_pullup(m_head, poff + sizeof(struct udphdr));
if (m_head == NULL) {
*m_headp = NULL;
return (ENOBUFS);
}
+ ip = (struct ip *)(mtod(m_head, char *) + ip_off);
}
*m_headp = m_head;
}
OpenPOWER on IntegriCloud