CVSROOT: /cvs Module name: src Changes by: d...@cvs.openbsd.org 2016/02/22 18:39:14
Modified files: sys/netinet : ip_carp.c sys/sys : mbuf.h sys/kern : uipc_mbuf.c Log message: 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@