tools/pktgen: Setup link header length properly
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 2 Aug 2012 01:27:09 +0000 (09:27 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Thu, 2 Aug 2012 01:27:09 +0000 (09:27 +0800)
tools/tools/netrate/pktgen/pktgen.c

index 1d1dde2..fa72d1d 100644 (file)
@@ -404,6 +404,7 @@ pktgen_udp_thread1(void *arg)
                m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
                m->m_pkthdr.csum_iphlen = sizeof(struct ip);
                m->m_pkthdr.csum_thlen = sizeof(struct udphdr);
                m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
                m->m_pkthdr.csum_iphlen = sizeof(struct ip);
                m->m_pkthdr.csum_thlen = sizeof(struct udphdr);
+               m->m_pkthdr.csum_lhlen = sizeof(struct ether_header);
 
                ip = (struct ip *)ui;
                ip->ip_len = ip_len;
 
                ip = (struct ip *)ui;
                ip->ip_len = ip_len;