HomeFreeBSD

pf: add SCTP NAT support

Description

pf: add SCTP NAT support

Support NAT-ing SCTP connections.

This is mostly similar to UDP and TCP, but we refuse to change ports for
SCTP, to avoid interfering with multihomed connections.

As a result we also never copy the SCTP header back or recalculate
checksums as we'd do for TCP or UDP (because we don't modify the header
for SCTP).

We do use the existing pf_change_ap() function to modify the packet,
because we may still need to update the IPv4 header checksum.

Reviewed by: tuexen
MFC after: 3 weeks
Sponsored by: Orange Business Services
Differential Revision: https://reviews.freebsd.org/D40866

(cherry picked from commit 6053adafaa54204f91c43939fa334bde835403cb)

Details

Provenance
kpAuthored on Jun 1 2023, 1:04 PM
Reviewer
tuexen
Differential Revision
D40866: pf: add SCTP NAT support
Parents
rGdc9da87bd334: pf tests: test SCTP 'return'
Branches
Unknown
Tags
Unknown