pktgen: Fix csum_data setting for in_delayed_csum()
authorSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 9 Dec 2012 10:42:25 +0000 (18:42 +0800)
committerSepherosa Ziehau <sephe@dragonflybsd.org>
Sun, 9 Dec 2012 10:43:58 +0000 (18:43 +0800)
tools/tools/netrate/pktgen/pktgen.c

index 6d70277..3339d88 100644 (file)
@@ -430,6 +430,7 @@ pktgen_start(struct pktgen *pktg)
                ui->ui_ulen = ulen;
                ui->ui_sum = in_pseudo(ui->ui_src.s_addr, ui->ui_dst.s_addr,
                    psum);
+               m->m_pkthdr.csum_data = offsetof(struct udphdr, uh_sum);
 
                ip = (struct ip *)ui;
                ip->ip_len = ip_len;