HomeFreeBSD

bridge: Don't share broadcast packets

Description

bridge: Don't share broadcast packets

if_bridge duplicates broadcast packets with m_copypacket(), which
creates shared packets. In certain circumstances these packets can be
processed by udp_usrreq.c:udp_input() first, which modifies the mbuf as
part of the checksum verification. That may lead to incorrect packets
being transmitted.

Use m_dup() to create independent mbufs instead.

Reported by: Richard Russo <toast@ruka.org>
Reviewed by: donner, afedorov
MFC after: 2 weeks
Differential Revision: https://reviews.freebsd.org/D34319

(cherry picked from commit 36637dd19dba79088e53c6f2aa026415eae9f8f0)

Details

Provenance
kpAuthored on Feb 19 2022, 3:34 PM
Reviewer
donner
Differential Revision
D34319: bridge: Don't share broadcast packets
Parents
rG2af412767144: netinet: allow UDP tunnels to be removed
Branches
Unknown
Tags
Unknown