mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
genet: add another case where headers need pullup
Wake On LAN packets sent by wake(8) via BPF are lost if txcsum is enabled. These fall into the "other protocol" case where gen_parse_tx did nothing. Add code to shift up to gen_tx_hdr_min bytes of the packet along with the Ethernet header in this case.
This commit is contained in:
parent
6b69465efb
commit
234c1463a7
|
@ -1302,9 +1302,12 @@ gen_parse_tx(struct mbuf *m, int csum_flags)
|
|||
offset += sizeof(struct ip6_hdr);
|
||||
} else {
|
||||
/*
|
||||
* Unknown whether other cases require moving a header;
|
||||
* ARP works without.
|
||||
* Unknown whether most other cases require moving a header;
|
||||
* ARP works without. However, Wake On LAN packets sent
|
||||
* by wake(8) via BPF need something like this.
|
||||
*/
|
||||
COPY(MIN(gen_tx_hdr_min, m->m_len));
|
||||
offset += MIN(gen_tx_hdr_min, m->m_len);
|
||||
}
|
||||
return (offset);
|
||||
#undef COPY
|
||||
|
|
Loading…
Reference in a new issue