TC-CSUM(8)
โจ NAME โจ
Checksum action in tc(8) ๐
csum - checksum update action ๐
๐ SYNOPSIS ๐
tc ... action csum UPDATE
UPDATE := TARGET [ UPDATE ]
TARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS }
SWEETS := { and | or | + }
๐ฆ DESCRIPTION ๐ฆ
okay so the csum action is basically your checksum fixer-upper ๐ง it recalculates checksums for the packet headers you pick. it's giving "clean up after yourself" energy, and it's super commonly used to repair wrong checksums after the pedit action has messed with the packet contents ๐ญ๐ฅ
๐ธ OPTIONS ๐ธ
TARGETโ pick which header(s) get updated โจ your choices are the IPv4 header (ip4h), the ICMP header (icmp), the IGMP header (igmp), the TCP header (tcp), the UDP header (udp), the UDPLite header (udplite) or the SCTP header (sctp) ๐SWEETSโ these are justand,orand+๐ purely syntactic sugar, so they're literally ignored internally. no cap ๐
๐ EXAMPLES ๐
okay this one is iconic ๐ it does stateless NAT for incoming packets coming from 192.0.2.100 and sends them to the new destination 198.51.100.1. assuming these are UDP packets, both the IP and UDP checksums need recalculating, so we slap csum ip and udp on the end ๐
# tc qdisc add dev eth0 ingress handle ffff:
# tc filter add dev eth0 prio 1 protocol ip parent ffff: \
u32 match ip src 192.0.2.100/32 flowid :1 \
action pedit munge ip dst set 198.51.100.1 pipe \
csum ip and udp
๐ง SEE ALSO ๐ง
tc(8), tc-pedit(8) ๐ฆ
bestie that's the whole tea ๐ซถ this page is from iproute2, last updated 11 Jan 2015, and it's all about the Checksum action in tc(8) ๐ธ๐ stay fabulous and keep your checksums fresh โจ๐
๐ฆ where this page comes from
- alpine 3.22: iproute2-doc 6.15.0-r0 ยท GPL-2.0-or-later
- alpine 3.23: iproute2-doc 6.17.0-r0 ยท GPL-2.0-or-later
- alpine 3.24: iproute2-doc 7.0.0-r0 ยท GPL-2.0-or-later
- arch rolling: iproute2 7.2.0-1
- arch rolling: iproute2 7.3.0-1 ยท GPL-2.0-or-later
- centos-stream 10: iproute-tc 7.0.0-2.el10 ยท GPL-2.0-or-later
- centos-stream 9: iproute-tc 6.17.0-3.el9 ยท GPL-2.0-or-later
- debian bookworm: iproute2 6.1.0-3 ยท GPL-2.0-only
- debian trixie: iproute2 6.15.0-1 ยท GPL-2.0-only
- fedora 43: iproute-tc 6.14.0-2.fc43 ยท GPL-2.0-or-later
- fedora 44: iproute-tc 6.17.0-2.fc44 ยท GPL-2.0-or-later
- nixos 26.05: iproute2 7.0.0
- nixpkgs unstable: iproute2 7.2.0
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- opensuse-leap 16.0: iproute2 6.12-160000.4.1 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2 ยท GPL-2.0-only
- ubuntu jammy: iproute2 5.15.0-1ubuntu2.2 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6 ยท GPL-2.0-only
- ubuntu noble: iproute2 6.1.0-1ubuntu6.4 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2
- ubuntu questing: iproute2 6.16.0-1ubuntu2.1 ยท GPL-2.0-only
- ubuntu questing: iproute2 6.16.0-1ubuntu2.2
- ubuntu resolute: iproute2 6.19.0-1ubuntu1 ยท GPL-2.0-only
- ubuntu resolute: iproute2 6.19.0-1ubuntu1.1 ยท GPL-2.0-only
- ubuntu stonking: iproute2 7.2.0-1ubuntu1 ยท GPL-2.0-only
- ๐ girlified by anthropic/claude-haiku-5.5 on : a language model's rewrite of the original, under its terms