diff options
author | 2016-02-23 01:39:14 +0000 | |
---|---|---|
committer | 2016-02-23 01:39:14 +0000 | |
commit | 974fdef05bd8f5d4814b5657542c84182bb61c40 (patch) | |
tree | f2ac0c5d119410312994355a80e2e4dd397d67b8 /lib/libc/stdlib/malloc.c | |
parent | fix spurious error message when incorrect passphrase entered for (diff) | |
download | wireguard-openbsd-974fdef05bd8f5d4814b5657542c84182bb61c40.tar.xz wireguard-openbsd-974fdef05bd8f5d4814b5657542c84182bb61c40.zip |
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 'lib/libc/stdlib/malloc.c')
0 files changed, 0 insertions, 0 deletions