HomeFreeBSD

tcp: improve mbuf handling when processing SYN segments

Description

tcp: improve mbuf handling when processing SYN segments

When the sysctl-variable net.inet.ip.accept_sourceroute is non-zero,
an mbuf would be leaked when processing a SYN-segment containing an
IPv4 strict or loose source routing option, when the on-stack
syncache entry is used or there is an error related to processing
TCP MD5 options.
Fix this by freeing the mbuf whenever an error occurred or the
on-stack syncache entry is used.

Reviewed by: markj, rscheff
MFC after: 1 week
Sponsored by: Netflix, Inc.
Differential Revision: https://reviews.freebsd.org/D46839

Details

Provenance
tuexenAuthored on Sep 30 2024, 6:00 PM
Parents
rGa2e4f45480c2: tcp: whitespace cleanup
Branches
Unknown
Tags
Unknown