diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2016-02-23 01:39:15 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2016-02-23 01:39:15 +0000 |
commit | 81bb00ffadf24cf9c79f1bf44beb85970ba903de (patch) | |
tree | c474f170883ba6a0233ce2fb3d980bc8d72b3321 /distrib | |
parent | b8eba1cd37b767985708a1447a8df9d296f27e34 (diff) |
provide m_dup_pkt() for doing fast deep mbuf copies with a specified alignment
if a physical interface receives a multicast/broadcast packet and
has carp interfaces on it, that packet needs to be copied for
reception by each of those carp interfaces.
previously it was using m_copym2, but that doesn't respect the
alignment of the source packet. this meant the ip header in the
copies were aligned incorrectly for the network stack, which breaks
strict alignment archs.
m_dup_pkt lets carp specify that the payload needs an ETHER_ALIGN
adjustment, so the ip header inside will be aligned correctly.
reported and tested by anthony eden who hit this on armv7
i reproduced the problem on sparc64 and verified the fix on amd64
and sparc64
ok mpi@ mikeb@ deraadt@
Diffstat (limited to 'distrib')
0 files changed, 0 insertions, 0 deletions