[roll] Roll fuchsia [netstack3] Only rewrite port if necessary to avoid clash
In the case of implicit SNAT, where a connection is being NATed not
because the user has configured a NAT rule that applied to the first
packet of the flow, but only in order to prevent conflicts with other
tracked connections, only rewrite the source port if necessary to avoid
a tuple clash.
For connections that have NAT explicitly configured, such as through
Redirect or Masquerade NAT, we continue to ensure the reply tuple's port
falls in the specified range (if one is specified).
This makes implicit SNAT less invasive and also fixes an issue where UDP
packets with a source port of 0 are always rewritten, even when
unnecessary to avoid a conflict, because the default port ranges are
nonzero and thus never include the 0 port.
Test: netstack3-filter-test
netstack3_udp_raw_syscall
udp(-v6)_ns3_full_anvl_suite.sh -cases 2.3
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1145313
Original-Revision: 203b0a579fa1f48da2231042de9fb83fdffe76cf
GitOrigin-RevId: 17b74d70b22b6217fbe47af290ec9b3dc1c97156
Change-Id: I360951b128918b13eb573c354cbad321e79ebee1
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party.