MCPcopy Create free account
hub / github.com/celzero/firestack / UpdateSrcAddr

Function UpdateSrcAddr

intra/core/wire/xsum.go:27–49  ·  view source on GitHub ↗

UpdateSrcAddr updates the source address in the packet buffer (e.g. during SNAT). It also updates the checksum. Currently (2023-09-22) only TCP/UDP/ICMP is supported. It panics if provided with an address in a different family to the parsed packet.

(q *Parsed, src netip.Addr)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 5

updateV6PacketChecksumsFunction · 0.85
updateV4PacketChecksumsFunction · 0.85
AddrMethod · 0.80
BufferMethod · 0.80
PortMethod · 0.45

Tested by

no test coverage detected