diff options
author | Roger Pau Monné <royger@FreeBSD.org> | 2017-03-21 08:30:06 +0000 |
---|---|---|
committer | Roger Pau Monné <royger@FreeBSD.org> | 2017-03-21 08:30:06 +0000 |
commit | 76467a1c57e265788a621058601e7b2982c47dfc (patch) | |
tree | 6dc7bbb60eaef8cc7e5991a0f2c7d70c104ef830 | |
parent | 1c383bc11e2cd5f7c28d26d5b44af554efb21152 (diff) |
Notes
-rw-r--r-- | sys/dev/xen/netfront/netfront.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 3c080ef817f7..c2e320049a80 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -1178,15 +1178,17 @@ xn_rxeof(struct netfront_rxq *rxq) m->m_pkthdr.rcvif = ifp; if ( rx->flags & NETRXF_data_validated ) { - /* Tell the stack the checksums are okay */ /* - * XXX this isn't necessarily the case - need to add - * check + * According to mbuf(9) the correct way to tell + * the stack that the checksum of an inbound + * packet is correct, without it actually being + * present (because the underlying interface + * doesn't provide it), is to set the + * CSUM_DATA_VALID and CSUM_PSEUDO_HDR flags, + * and the csum_data field to 0xffff. */ - - m->m_pkthdr.csum_flags |= - (CSUM_IP_CHECKED | CSUM_IP_VALID | CSUM_DATA_VALID - | CSUM_PSEUDO_HDR); + m->m_pkthdr.csum_flags |= (CSUM_DATA_VALID + | CSUM_PSEUDO_HDR); m->m_pkthdr.csum_data = 0xffff; } if ((rx->flags & NETRXF_extra_info) != 0 && |