pf-ring: Mark emitted traffic as non checksummed

The traffic sent by an interface is potentially offloaded. This
patch adds detection of TX packets and set the corresponding flag.
remotes/origin/master-1.2.x
Eric Leblond 14 years ago committed by Victor Julien
parent 81bc6f5518
commit 5dc46ae7c7

@ -182,6 +182,12 @@ static inline void PfringProcessPacket(void *user, struct pfring_pkthdr *h, Pack
* so that is what we do here. */
p->datalink = LINKTYPE_ETHERNET;
/* Packet is being sent */
if (h->extended_hdr.rx_direction == 0) {
/* Checksum can be offloaded */
p->flags |= PKT_IGNORE_CHECKSUM;
}
SET_PKT_LEN(p, h->caplen);
}

Loading…
Cancel
Save