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

Details

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