{
    "mode": "man",
    "parameter": "tc-csum",
    "section": "8",
    "url": "https://www.chedong.com/phpMan.php/man/tc-csum/8/json",
    "generated": "2026-06-14T07:36:22Z",
    "synopsis": "tc ... action csum UPDATE\nUPDATE := TARGET [ UPDATE ]\nTARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS }\nSWEETS := { and | or | + }",
    "sections": {
        "NAME": {
            "content": "csum - checksum update action\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "tc ... action csum UPDATE\n\nUPDATE := TARGET [ UPDATE ]\n\nTARGET := { ip4h | icmp | igmp | tcp | udp | udplite | sctp | SWEETS }\n\nSWEETS := { and | or | + }\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "The  csum  action triggers checksum recalculation of specified packet headers. It is commonly\nused to fix incorrect checksums after the pedit action has modified the packet content.\n",
            "subsections": []
        },
        "OPTIONS": {
            "content": "TARGET Specify which headers to update: IPv4 header (ip4h), ICMP header (icmp),  IGMP  header\n(igmp),  TCP  header  (tcp), UDP header (udp), UDPLite header (udplite) or SCTP header\n(sctp).\n\nSWEETS These are merely syntactic sugar and ignored internally.\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "The following performs stateless NAT for incoming packets from 192.0.2.100 to new destination\n198.51.100.1.  Assuming  these are UDP packets, both IP and UDP checksums have to be recalcu‐\nlated:\n\n# tc qdisc add dev eth0 ingress handle ffff:\n# tc filter add dev eth0 prio 1 protocol ip parent ffff: \\\nu32 match ip src 192.0.2.100/32 flowid :1 \\\naction pedit munge ip dst set 198.51.100.1 pipe \\\ncsum ip and udp\n\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "tc(8), tc-pedit(8)\n\n\n\niproute2                                     11 Jan 2015                    Checksum action in tc(8)",
            "subsections": []
        }
    },
    "summary": "csum - checksum update action",
    "flags": [],
    "examples": [
        "The following performs stateless NAT for incoming packets from 192.0.2.100 to new destination",
        "198.51.100.1.  Assuming  these are UDP packets, both IP and UDP checksums have to be recalcu‐",
        "lated:",
        "# 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": [
        {
            "name": "tc",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
        },
        {
            "name": "tc-pedit",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc-pedit/8/json"
        },
        {
            "name": "tc",
            "section": "8",
            "url": "https://www.chedong.com/phpMan.php/man/tc/8/json"
        }
    ]
}